@office-iss/react-native-win32 0.72.12 → 0.72.13

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 CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 08 Feb 2024 21:49:33 GMT",
5
+ "date": "Fri, 15 Mar 2024 22:27:59 GMT",
6
+ "tag": "@office-iss/react-native-win32_v0.72.13",
7
+ "version": "0.72.13",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "30809111+acoates-ms@users.noreply.github.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "6a915591746c71b0ecbf7cb96bc3d0f1d704c03e",
14
+ "comment": "TextProps from rn-win32 should include win32 properties"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Thu, 08 Feb 2024 21:50:06 GMT",
6
21
  "tag": "@office-iss/react-native-win32_v0.72.12",
7
22
  "version": "0.72.12",
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 Feb 2024 21:49:33 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 15 Mar 2024 22:27:59 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.72.12
7
+ ## 0.72.13
8
8
 
9
- Thu, 08 Feb 2024 21:49:33 GMT
9
+ Fri, 15 Mar 2024 22:27:59 GMT
10
10
 
11
11
  ### Patches
12
12
 
13
- - [Win32] view.focus sometimes skips setting focus (30809111+acoates-ms@users.noreply.github.com)
13
+ - TextProps from rn-win32 should include win32 properties (30809111+acoates-ms@users.noreply.github.com)
14
14
 
15
+ ## 0.72.12
16
+
17
+ Thu, 08 Feb 2024 21:50:06 GMT
18
+
19
+ ### Patches
20
+
21
+ - [Win32] view.focus sometimes skips setting focus (30809111+acoates-ms@users.noreply.github.com)
22
+
15
23
  ## 0.72.11
16
24
 
17
25
  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":"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","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { IViewWin32Props } from '../View/ViewPropTypes';\nimport type { ITextWin32Props } from '../Text/TextWin32.Props';\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: ITextWin32Props = {\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
+ {"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":"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","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 { ITextWin32Props } from './TextWin32.Props';
3
- export declare class TextWin32 extends React.Component<ITextWin32Props, {}> {
4
- constructor(props: ITextWin32Props);
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,SAA8B;IACjE,YAAY,KAAsB;QAChC,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 { ITextWin32Props } from './TextWin32.Props';\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<ITextWin32Props, RN.TextProps, 'accessibilityRole'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityState'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityActions'>;\nexport class TextWin32 extends React.Component<ITextWin32Props, {}> {\n constructor(props: ITextWin32Props) {\n super(props);\n }\n\n public render() {\n return <RN.Text {...(this.props as InnerViewProps)} />;\n }\n}\n"]}
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"]}
@@ -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
  /**
@@ -43,11 +47,6 @@ export interface TextPropsIOS {
43
47
  | 'largeTitle'
44
48
  | undefined;
45
49
 
46
- /**
47
- * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).
48
- */
49
- minimumFontScale?: number | undefined;
50
-
51
50
  /**
52
51
  * When `true`, no visual change is made when text is pressed down. By
53
52
  * default, a gray oval highlights the text on press down.
@@ -106,10 +105,91 @@ export interface TextPropsAndroid {
106
105
  android_hyphenationFrequency?: 'normal' | 'none' | 'full' | undefined;
107
106
  }
108
107
 
108
+ /**
109
+ * Role-based text style names.
110
+ */
111
+ export type TextWin32TextStyle =
112
+ | 'None'
113
+ | 'SmallStandard'
114
+ | 'SmallSecondary'
115
+ | 'MediumStandard'
116
+ | 'MediumSecondary'
117
+ | 'MediumApp'
118
+ | 'MediumBold'
119
+ | 'MediumBoldApp'
120
+ | 'LargeStandard'
121
+ | 'LargePlusStandard'
122
+ | 'ExtraLargeStandard'
123
+ | 'HugeStandard';
124
+
125
+ export interface TextPropsWin32 {
126
+ onKeyDown?: (args: IKeyboardEvent) => void;
127
+ onKeyDownCapture?: (args: IKeyboardEvent) => void;
128
+ onKeyUp?: (args: IKeyboardEvent) => void;
129
+ onKeyUpCapture?: (args: IKeyboardEvent) => void;
130
+
131
+ keyDownEvents?: IHandledKeyboardEvent[];
132
+ keyUpEvents?: IHandledKeyboardEvent[];
133
+
134
+ /** Enables a focusable label with copyability but without character selectability (property:selectable) */
135
+ focusable?: boolean;
136
+
137
+ /**
138
+ * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
139
+ * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
140
+ *
141
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
142
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
143
+ */
144
+ onBlur?: (ev: NativeSyntheticEvent<{}>) => void;
145
+ /**
146
+ * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
147
+ * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
148
+ *
149
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
150
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
151
+ */
152
+ onBlurCapture?: (ev: NativeSyntheticEvent<{}>) => void;
153
+ /**
154
+ * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
155
+ * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
156
+ *
157
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
158
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
159
+ */
160
+ onFocus?: (ev: NativeSyntheticEvent<{}>) => void;
161
+ /**
162
+ * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
163
+ * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
164
+ *
165
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
166
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
167
+ */
168
+ onFocusCapture?: (ev: NativeSyntheticEvent<{}>) => void;
169
+
170
+ /**
171
+ * Role-based styling of the text control. The styles applied include
172
+ * font face, size, weight and color. These styles take precedence over
173
+ * the `style` property.
174
+ *
175
+ * @remarks
176
+ * The default value is `MediumStandard`.
177
+ *
178
+ * When set to `None`, role-based styling is disabled.
179
+ *
180
+ * @deprecated Use `style` instead.
181
+ */
182
+ textStyle?: TextWin32TextStyle;
183
+
184
+ /** Tooltip displayed on mouse hover of this element */
185
+ tooltip?: string;
186
+ }
187
+
109
188
  // https://reactnative.dev/docs/text#props
110
189
  export interface TextProps
111
190
  extends TextPropsIOS,
112
191
  TextPropsAndroid,
192
+ TextPropsWin32,
113
193
  AccessibilityProps {
114
194
  /**
115
195
  * 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 {ITextWin32Props as ITextWin32PropsOnly} from './Components/Text/TextWin32.Props';
14
+ import {TextPropsWin32 as ITextWin32PropsOnly} from './Text/Text';
15
15
  export type ITextWin32Props = ITextWin32PropsOnly & AccessibilityPropsWin32;
16
- export {TextWin32TextStyle } from './Components/Text/TextWin32.Props';
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-iss/react-native-win32",
3
- "version": "0.72.12",
3
+ "version": "0.72.13",
4
4
  "description": "Implementation of react native on top of Office's Win32 platform.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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 { ITextWin32Props } from '../Text/TextWin32.Props';
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: ITextWin32Props = {
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 { ITextWin32Props } from './TextWin32.Props';
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<ITextWin32Props, RN.TextProps, 'accessibilityRole'> &
15
- UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityState'> &
16
- UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityActions'>;
17
- export class TextWin32 extends React.Component<ITextWin32Props, {}> {
18
- constructor(props: ITextWin32Props) {
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,299 @@
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
+ * When `true`, no visual change is made when text is pressed down. By
52
+ * default, a gray oval highlights the text on press down.
53
+ */
54
+ suppressHighlighting?: boolean | undefined;
55
+
56
+ /**
57
+ * Set line break strategy on iOS.
58
+ */
59
+ lineBreakStrategyIOS?:
60
+ | 'none'
61
+ | 'standard'
62
+ | 'hangul-word'
63
+ | 'push-out'
64
+ | undefined;
65
+ }
66
+
67
+ export interface TextPropsAndroid {
68
+ /**
69
+ * Specifies the disabled state of the text view for testing purposes.
70
+ */
71
+ disabled?: boolean | undefined;
72
+
73
+ /**
74
+ * Lets the user select text, to use the native copy and paste functionality.
75
+ */
76
+ selectable?: boolean | undefined;
77
+
78
+ /**
79
+ * The highlight color of the text.
80
+ */
81
+ selectionColor?: ColorValue | undefined;
82
+
83
+ /**
84
+ * Set text break strategy on Android API Level 23+
85
+ * default is `highQuality`.
86
+ */
87
+ textBreakStrategy?: 'simple' | 'highQuality' | 'balanced' | undefined;
88
+
89
+ /**
90
+ * Determines the types of data converted to clickable URLs in the text element.
91
+ * By default no data types are detected.
92
+ */
93
+ dataDetectorType?:
94
+ | null
95
+ | 'phoneNumber'
96
+ | 'link'
97
+ | 'email'
98
+ | 'none'
99
+ | 'all'
100
+ | undefined;
101
+
102
+ /**
103
+ * Hyphenation strategy
104
+ */
105
+ android_hyphenationFrequency?: 'normal' | 'none' | 'full' | undefined;
106
+ }
107
+
108
+ /**
109
+ * Role-based text style names.
110
+ */
111
+ export type TextWin32TextStyle =
112
+ | 'None'
113
+ | 'SmallStandard'
114
+ | 'SmallSecondary'
115
+ | 'MediumStandard'
116
+ | 'MediumSecondary'
117
+ | 'MediumApp'
118
+ | 'MediumBold'
119
+ | 'MediumBoldApp'
120
+ | 'LargeStandard'
121
+ | 'LargePlusStandard'
122
+ | 'ExtraLargeStandard'
123
+ | 'HugeStandard';
124
+
125
+ export interface TextPropsWin32 {
126
+ onKeyDown?: (args: IKeyboardEvent) => void;
127
+ onKeyDownCapture?: (args: IKeyboardEvent) => void;
128
+ onKeyUp?: (args: IKeyboardEvent) => void;
129
+ onKeyUpCapture?: (args: IKeyboardEvent) => void;
130
+
131
+ keyDownEvents?: IHandledKeyboardEvent[];
132
+ keyUpEvents?: IHandledKeyboardEvent[];
133
+
134
+ /** Enables a focusable label with copyability but without character selectability (property:selectable) */
135
+ focusable?: boolean;
136
+
137
+ /**
138
+ * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
139
+ * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
140
+ *
141
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
142
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
143
+ */
144
+ onBlur?: (ev: NativeSyntheticEvent<{}>) => void;
145
+ /**
146
+ * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React
147
+ * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).
148
+ *
149
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
150
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
151
+ */
152
+ onBlurCapture?: (ev: NativeSyntheticEvent<{}>) => void;
153
+ /**
154
+ * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
155
+ * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
156
+ *
157
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
158
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
159
+ */
160
+ onFocus?: (ev: NativeSyntheticEvent<{}>) => void;
161
+ /**
162
+ * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React
163
+ * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).
164
+ *
165
+ * `ev.target === ev.currentTarget` when the focus is being lost from this component.
166
+ * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.
167
+ */
168
+ onFocusCapture?: (ev: NativeSyntheticEvent<{}>) => void;
169
+
170
+ /**
171
+ * Role-based styling of the text control. The styles applied include
172
+ * font face, size, weight and color. These styles take precedence over
173
+ * the `style` property.
174
+ *
175
+ * @remarks
176
+ * The default value is `MediumStandard`.
177
+ *
178
+ * When set to `None`, role-based styling is disabled.
179
+ *
180
+ * @deprecated Use `style` instead.
181
+ */
182
+ textStyle?: TextWin32TextStyle;
183
+
184
+ /** Tooltip displayed on mouse hover of this element */
185
+ tooltip?: string;
186
+ }
187
+
188
+ // https://reactnative.dev/docs/text#props
189
+ export interface TextProps
190
+ extends TextPropsIOS,
191
+ TextPropsAndroid,
192
+ TextPropsWin32,
193
+ AccessibilityProps {
194
+ /**
195
+ * Specifies whether fonts should scale to respect Text Size accessibility settings.
196
+ * The default is `true`.
197
+ */
198
+ allowFontScaling?: boolean | undefined;
199
+
200
+ children?: React.ReactNode | undefined;
201
+
202
+ /**
203
+ * This can be one of the following values:
204
+ *
205
+ * - `head` - The line is displayed so that the end fits in the container and the missing text
206
+ * at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz"
207
+ * - `middle` - The line is displayed so that the beginning and end fit in the container and the
208
+ * missing text in the middle is indicated by an ellipsis glyph. "ab...yz"
209
+ * - `tail` - The line is displayed so that the beginning fits in the container and the
210
+ * missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..."
211
+ * - `clip` - Lines are not drawn past the edge of the text container.
212
+ *
213
+ * The default is `tail`.
214
+ *
215
+ * `numberOfLines` must be set in conjunction with this prop.
216
+ *
217
+ * > `clip` is working only for iOS
218
+ */
219
+ ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip' | undefined;
220
+
221
+ /**
222
+ * Used to reference react managed views from native code.
223
+ */
224
+ id?: string | undefined;
225
+
226
+ /**
227
+ * Line Break mode. Works only with numberOfLines.
228
+ * clip is working only for iOS
229
+ */
230
+ lineBreakMode?: 'head' | 'middle' | 'tail' | 'clip' | undefined;
231
+
232
+ /**
233
+ * Used to truncate the text with an ellipsis after computing the text
234
+ * layout, including line wrapping, such that the total number of lines
235
+ * does not exceed this number.
236
+ *
237
+ * This prop is commonly used with `ellipsizeMode`.
238
+ */
239
+ numberOfLines?: number | undefined;
240
+
241
+ /**
242
+ * Invoked on mount and layout changes with
243
+ *
244
+ * {nativeEvent: { layout: {x, y, width, height}}}.
245
+ */
246
+ onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
247
+
248
+ /**
249
+ * Invoked on Text layout
250
+ */
251
+ onTextLayout?:
252
+ | ((event: NativeSyntheticEvent<TextLayoutEventData>) => void)
253
+ | undefined;
254
+
255
+ /**
256
+ * This function is called on press.
257
+ * Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting).
258
+ */
259
+ onPress?: ((event: GestureResponderEvent) => void) | undefined;
260
+
261
+ onPressIn?: ((event: GestureResponderEvent) => void) | undefined;
262
+ onPressOut?: ((event: GestureResponderEvent) => void) | undefined;
263
+
264
+ /**
265
+ * This function is called on long press.
266
+ * e.g., `onLongPress={this.increaseSize}>``
267
+ */
268
+ onLongPress?: ((event: GestureResponderEvent) => void) | undefined;
269
+
270
+ /**
271
+ * @see https://reactnative.dev/docs/text#style
272
+ */
273
+ style?: StyleProp<TextStyle> | undefined;
274
+
275
+ /**
276
+ * Used to locate this view in end-to-end tests.
277
+ */
278
+ testID?: string | undefined;
279
+
280
+ /**
281
+ * Used to reference react managed views from native code.
282
+ */
283
+ nativeID?: string | undefined;
284
+
285
+ /**
286
+ * Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:
287
+ * - null/undefined (default): inherit from the parent node or the global default (0)
288
+ * - 0: no max, ignore parent/global default
289
+ * - >= 1: sets the maxFontSizeMultiplier of this node to this value
290
+ */
291
+ maxFontSizeMultiplier?: number | null | undefined;
292
+ }
293
+
294
+ /**
295
+ * A React component for displaying text which supports nesting, styling, and touch handling.
296
+ */
297
+ declare class TextComponent extends React.Component<TextProps> {}
298
+ declare const TextBase: Constructor<NativeMethods> & typeof TextComponent;
299
+ 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 {ITextWin32Props as ITextWin32PropsOnly} from './Components/Text/TextWin32.Props';
14
+ import {TextPropsWin32 as ITextWin32PropsOnly} from './Text/Text';
15
15
  export type ITextWin32Props = ITextWin32PropsOnly & AccessibilityPropsWin32;
16
- export {TextWin32TextStyle } from './Components/Text/TextWin32.Props';
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,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=TextWin32.Props.js.map
@@ -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
- }