@office-iss/react-native-win32 0.72.0-preview.3 → 0.72.0-preview.5

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.
Files changed (46) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -4
  3. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  4. package/Libraries/Components/Text/TextWin32.Props.d.ts +1 -1
  5. package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
  6. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  7. package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +5 -0
  8. package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +1 -1
  9. package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
  10. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  11. package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
  12. package/Libraries/Components/View/ViewAccessibility.d.ts +158 -4
  13. package/Libraries/Components/View/ViewPropTypes.d.ts +146 -6
  14. package/Libraries/Components/View/ViewWin32.d.ts +1 -1
  15. package/Libraries/Core/ReactNativeVersion.js +1 -1
  16. package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -8
  17. package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -8
  18. package/Libraries/NativeComponent/BaseViewConfig.win32.js +0 -8
  19. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +0 -7
  20. package/Libraries/StyleSheet/StyleSheetTypes.js +0 -74
  21. package/Libraries/Text/TextNativeComponent.win32.js +31 -5
  22. package/Libraries/platform-types.d.ts +5 -5
  23. package/overrides.json +5 -13
  24. package/package.json +10 -11
  25. package/src/Libraries/Components/Button/ButtonWin32.tsx +1 -1
  26. package/src/Libraries/Components/Text/TextWin32.Props.ts +1 -1
  27. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +1 -1
  28. package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +1 -1
  29. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
  30. package/{Libraries/Components/View/ViewPropTypes.win32.d.ts → src/Libraries/Components/View/ViewPropTypes.d.ts} +14 -1
  31. package/src/Libraries/Components/View/ViewWin32.d.ts +1 -1
  32. package/src/Libraries/platform-types.d.ts +5 -5
  33. package/types/index.d.ts +4 -0
  34. package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -8
  35. package/Libraries/Components/Text/Tests/TextWin32Test.js +0 -120
  36. package/Libraries/Components/Text/Tests/TextWin32Test.js.map +0 -1
  37. package/Libraries/Components/View/Tests/ViewWin32Test.d.ts +0 -8
  38. package/Libraries/Components/View/Tests/ViewWin32Test.js +0 -233
  39. package/Libraries/Components/View/Tests/ViewWin32Test.js.map +0 -1
  40. package/src/Libraries/Components/Text/Tests/TextWin32Test.tsx +0 -164
  41. package/src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts +0 -119
  42. package/src/Libraries/Components/View/Tests/ViewWin32Test.tsx +0 -333
  43. package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +0 -527
  44. package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +0 -372
  45. /package/{Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts → src/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts} +0 -0
  46. /package/{Libraries/Components/View/ViewAccessibility.win32.d.ts → src/Libraries/Components/View/ViewAccessibility.d.ts} +0 -0
@@ -1,527 +0,0 @@
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 {NativeSyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes';
11
-
12
- /**
13
- * @see https://reactnative.dev/docs/accessibility#accessibility-properties
14
- */
15
- export interface AccessibilityProps
16
- extends AccessibilityPropsAndroid,
17
- AccessibilityPropsIOS,
18
- AccessibilityPropsWin32 {
19
- /**
20
- * When true, indicates that the view is an accessibility element.
21
- * By default, all the touchable elements are accessible.
22
- */
23
- accessible?: boolean | undefined;
24
-
25
- /**
26
- * Provides an array of custom actions available for accessibility.
27
- */
28
- accessibilityActions?: ReadonlyArray<AccessibilityActionInfo> | undefined;
29
-
30
- /**
31
- * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the
32
- * label is constructed by traversing all the children and accumulating all the Text nodes separated by space.
33
- */
34
- accessibilityLabel?: string | undefined;
35
-
36
- /**
37
- * Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel
38
- * https://github.com/facebook/react-native/issues/34424
39
- */
40
- 'aria-label'?: string | undefined;
41
-
42
- /**
43
- * Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.
44
- */
45
- accessibilityRole?: AccessibilityRole | undefined;
46
- /**
47
- * Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.
48
- */
49
- accessibilityState?: AccessibilityState | undefined;
50
-
51
- /**
52
- * alias for accessibilityState
53
- *
54
- * see https://reactnative.dev/docs/accessibility#accessibilitystate
55
- */
56
- 'aria-busy'?: boolean | undefined;
57
- 'aria-checked'?: boolean | 'mixed' | undefined;
58
- 'aria-disabled'?: boolean | undefined;
59
- 'aria-expanded'?: boolean | undefined;
60
- 'aria-selected'?: boolean | undefined;
61
-
62
- /**
63
- * Represents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
64
- *
65
- * @platform android
66
- */
67
- 'aria-labelledby'?: string | undefined;
68
-
69
- /**
70
- * An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.
71
- */
72
- accessibilityHint?: string | undefined;
73
- /**
74
- * Represents the current value of a component. It can be a textual description of a component's value, or for range-based components, such as sliders and progress bars,
75
- * it contains range information (minimum, current, and maximum).
76
- */
77
- accessibilityValue?: AccessibilityValue | undefined;
78
-
79
- 'aria-valuemax'?: AccessibilityValue['max'] | undefined;
80
- 'aria-valuemin'?: AccessibilityValue['min'] | undefined;
81
- 'aria-valuenow'?: AccessibilityValue['now'] | undefined;
82
- 'aria-valuetext'?: AccessibilityValue['text'] | undefined;
83
- /**
84
- * When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom action.
85
- */
86
- onAccessibilityAction?:
87
- | ((event: AccessibilityActionEvent) => void)
88
- | undefined;
89
-
90
- /**
91
- * [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services.
92
- */
93
- importantForAccessibility?:
94
- | ('auto' | 'yes' | 'no' | 'no-hide-descendants')
95
- | undefined;
96
-
97
- /**
98
- * A value indicating whether the accessibility elements contained within
99
- * this accessibility element are hidden.
100
- */
101
- 'aria-hidden'?: boolean | undefined;
102
-
103
- 'aria-live'?: ('polite' | 'assertive' | 'off') | undefined;
104
- 'aria-modal'?: boolean | undefined;
105
-
106
- /**
107
- * Indicates to accessibility services to treat UI component like a specific role.
108
- */
109
- role?: Role | undefined;
110
- }
111
-
112
- export type AccessibilityActionInfo = Readonly<{
113
- name: AccessibilityActionName | string;
114
- label?: string | undefined;
115
- }>;
116
-
117
- export type AccessibilityActionName =
118
- /**
119
- * Generated when a screen reader user double taps the component.
120
- */
121
- | 'activate'
122
- /**
123
- * Generated when a screen reader user increments an adjustable component.
124
- */
125
- | 'increment'
126
- /**
127
- * Generated when a screen reader user decrements an adjustable component.
128
- */
129
- | 'decrement'
130
- /**
131
- * Generated when a TalkBack user places accessibility focus on the component and double taps and holds one finger on the screen.
132
- * @platform android
133
- */
134
- | 'longpress'
135
- /**
136
- * Generated when a VoiceOver user places focus on or inside the component and double taps with two fingers.
137
- * @platform ios
138
- * */
139
- | 'magicTap'
140
- /**
141
- * Generated when a VoiceOver user places focus on or inside the component and performs a two finger scrub gesture (left, right, left).
142
- * @platform ios
143
- * */
144
- | 'escape'
145
- /**
146
- * @platform win32
147
- * */
148
- | 'AddToSelection' // Win32
149
- /**
150
- * @platform win32
151
- * */
152
- | 'RemoveFromSelection' // Win32
153
- /**
154
- * @platform win32
155
- * */
156
- | 'Select' // Win32
157
- /**
158
- * @platform win32
159
- * */
160
- | 'Expand' // Win32
161
- /**
162
- * @platform win32
163
- * */
164
- | 'Collapse' // Win32
165
- /**
166
- * @platform win32
167
- * */
168
- | 'Toggle'; // Win32
169
-
170
- export type AccessibilityActionEvent = NativeSyntheticEvent<
171
- Readonly<{
172
- actionName: string;
173
- }>
174
- >;
175
-
176
- export interface AccessibilityState {
177
- /**
178
- * When true, informs accessible tools if the element is disabled
179
- */
180
- disabled?: boolean | undefined;
181
- /**
182
- * When true, informs accessible tools if the element is selected
183
- */
184
- selected?: boolean | undefined;
185
- /**
186
- * For items like Checkboxes and Toggle switches, reports their state to accessible tools
187
- */
188
- checked?: boolean | 'mixed' | undefined;
189
- /**
190
- * When present, informs accessible tools if the element is busy
191
- */
192
- busy?: boolean | undefined;
193
- /**
194
- * When present, informs accessible tools the element is expanded or collapsed
195
- */
196
- expanded?: boolean | undefined;
197
-
198
- /**
199
- * @platform win32
200
- */
201
- multiselectable?: boolean | undefined; // Win32
202
-
203
- /**
204
- * @platform win32
205
- */
206
- required?: boolean | undefined; // Win32
207
- }
208
-
209
- export interface AccessibilityValue {
210
- /**
211
- * The minimum value of this component's range. (should be an integer)
212
- */
213
- min?: number | undefined;
214
-
215
- /**
216
- * The maximum value of this component's range. (should be an integer)
217
- */
218
- max?: number | undefined;
219
-
220
- /**
221
- * The current value of this component's range. (should be an integer)
222
- */
223
- now?: number | undefined;
224
-
225
- /**
226
- * A textual description of this component's value. (will override minimum, current, and maximum if set)
227
- */
228
- text?: string | undefined;
229
- }
230
-
231
- export type AccessibilityRole =
232
- | 'none'
233
- | 'alertdialog' // Win32
234
- | 'application' // Win32
235
- | 'dialog' // Win32
236
- | 'group' // Win32
237
- | 'listitem' // Win32
238
- | 'presentation' // Win32
239
- | 'tabpanel' // Win32
240
- | 'textbox' // Win32
241
- | 'tree' // Win32
242
- | 'treeitem' // Win32
243
- | 'button'
244
- | 'togglebutton'
245
- | 'link'
246
- | 'search'
247
- | 'image'
248
- | 'keyboardkey'
249
- | 'text'
250
- | 'adjustable'
251
- | 'imagebutton'
252
- | 'header'
253
- | 'summary'
254
- | 'alert'
255
- | 'checkbox'
256
- | 'combobox'
257
- | 'menu'
258
- | 'menubar'
259
- | 'menuitem'
260
- | 'progressbar'
261
- | 'radio'
262
- | 'radiogroup'
263
- | 'scrollbar'
264
- | 'spinbutton'
265
- | 'switch'
266
- | 'tab'
267
- | 'tabbar'
268
- | 'tablist'
269
- | 'timer'
270
- | 'list'
271
- | 'toolbar';
272
-
273
- export interface AccessibilityPropsAndroid {
274
- /**
275
- * Indicates to accessibility services whether the user should be notified when this view changes.
276
- * Works for Android API >= 19 only.
277
- * See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion for references.
278
- * @platform android
279
- */
280
- accessibilityLiveRegion?: 'none' | 'polite' | 'assertive' | undefined;
281
-
282
- /**
283
- * Controls how view is important for accessibility which is if it fires accessibility events
284
- * and if it is reported to accessibility services that query the screen.
285
- * Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references.
286
- *
287
- * Possible values:
288
- * 'auto' - The system determines whether the view is important for accessibility - default (recommended).
289
- * 'yes' - The view is important for accessibility.
290
- * 'no' - The view is not important for accessibility.
291
- * 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.
292
- */
293
- importantForAccessibility?:
294
- | 'auto'
295
- | 'yes'
296
- | 'no'
297
- | 'no-hide-descendants'
298
- | undefined;
299
-
300
- /**
301
- * A reference to another element `nativeID` used to build complex forms. The value of `accessibilityLabelledBy` should match the `nativeID` of the related element.
302
- * @platform android
303
- */
304
- accessibilityLabelledBy?: string | string[] | undefined;
305
- }
306
-
307
- export interface AccessibilityPropsIOS {
308
- /**
309
- * A Boolean value indicating whether the accessibility elements contained within this accessibility element
310
- * are hidden to the screen reader.
311
- * @platform ios
312
- */
313
- accessibilityElementsHidden?: boolean | undefined;
314
-
315
- /**
316
- * A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.
317
- * @platform ios
318
- */
319
- accessibilityViewIsModal?: boolean | undefined;
320
-
321
- /**
322
- * When accessibile is true, the system will invoke this function when the user performs the escape gesture (scrub with two fingers).
323
- * @platform ios
324
- */
325
- onAccessibilityEscape?: (() => void) | undefined;
326
-
327
- /**
328
- * When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture.
329
- * @platform ios
330
- */
331
- onAccessibilityTap?: (() => void) | undefined;
332
-
333
- /**
334
- * When accessible is true, the system will invoke this function when the user performs the magic tap gesture.
335
- * @platform ios
336
- */
337
- onMagicTap?: (() => void) | undefined;
338
-
339
- /**
340
- * https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios
341
- * @platform ios
342
- */
343
- accessibilityIgnoresInvertColors?: boolean | undefined;
344
-
345
- /**
346
- * By using the accessibilityLanguage property, the screen reader will understand which language to use while reading the element's label, value and hint. The provided string value must follow the BCP 47 specification (https://www.rfc-editor.org/info/bcp47).
347
- * https://reactnative.dev/docs/accessibility#accessibilitylanguage-ios
348
- * @platform ios
349
- */
350
- accessibilityLanguage?: string | undefined;
351
- }
352
-
353
- // [Win32]
354
- export type AnnotationType =
355
- | 'AdvanceProofingIssue'
356
- | 'Author'
357
- | 'CircularReferenceError'
358
- | 'Comment'
359
- | 'ConflictingChange'
360
- | 'DataValidationError'
361
- | 'DeletionChange'
362
- | 'EditingLockedChange'
363
- | 'Endnote'
364
- | 'ExternalChange'
365
- | 'Footer'
366
- | 'Footnote'
367
- | 'FormatChange'
368
- | 'FormulaError'
369
- | 'GrammarError'
370
- | 'Header'
371
- | 'Highlighted'
372
- | 'InsertionChange'
373
- | 'Mathematics'
374
- | 'MoveChange'
375
- | 'SpellingError'
376
- | 'TrackChanges'
377
- | 'Unknown'
378
- | 'UnsyncedChange';
379
-
380
- // [Win32]
381
- export type AccessibilityAnnotationInfo = Readonly<{
382
- typeID: AnnotationType;
383
- typeName?: string;
384
- author?: string;
385
- dateTime?: string;
386
- target?: string;
387
- }>;
388
-
389
- // [Win32]
390
- export interface AccessibilityPropsWin32 {
391
- /**
392
- * accessibilityPositionInSet
393
- * @platform win32
394
- */
395
- accessibilityPositionInSet?: number;
396
- /**
397
- * accessibilitySetSize
398
- * @platform win32
399
- */
400
- accessibilitySetSize?: ?number;
401
-
402
- /**
403
- * accessibilityDescription provides more detailed information specific to the element (i.e. last edit date, full location for a file)
404
- * while accessibilityHint provides infomation on what will happen when they perform an action.
405
- * @platform win32
406
- *
407
- */
408
- accessibilityDescription?: string;
409
-
410
- /**
411
- * Tells a person using a screen reader what kind of annotation they
412
- * have selected. If available, it will also tell a person the author of the annotation and
413
- * the date and time the annotation was posted.
414
- *
415
- * Note: If typeID is 'Unknown', a typeName must be provided.
416
- * @platform win32
417
- */
418
- accessibilityAnnotation?: AccessibilityAnnotationInfo;
419
-
420
- /**
421
- * An access key to hook up to the UIA_AccessKey_Property.
422
- * Access keys are used in keyboard navigation to allow quick navigation to UI in an application.
423
- * @platform win32
424
- */
425
- accessibilityAccessKey?: string;
426
-
427
- /**
428
- * Defines the level of an element in a hierarchical structure or the heading level of a text element.
429
- * Note: accessibilityRole="header" must be used if using this property to define a heading level.
430
- * @platform win32
431
- */
432
- accessibilityLevel?: number;
433
-
434
- /**
435
- * Identifies the ItemType property, which is a text string describing the type of the automation element.
436
- * ItemType is used to obtain information about items in a list, tree view, or data grid. For example, an item in a file directory view might be a "Document File" or a "Folder".
437
- * @platform win32
438
- */
439
- accessibilityItemType?: string;
440
-
441
- /**
442
- * Identifies the element whose contents or presence are controlled by another element.
443
- *
444
- * This is mainly used for a Textbox with a Dropdown PeoplePicker-type list. This allows an
445
- * accessibility tool to query those other providers for properties and listen to their events.
446
- *
447
- * The value should match the nativeID of the target element.
448
- * @platform win32
449
- */
450
- accessibilityControls?: string | undefined;
451
-
452
- /**
453
- * Windows Accessibility extensions for allowing other DOM elements to label or describe a given element.
454
- *
455
- * The value should match the nativeID of the target element.
456
- * @platform win32
457
- */
458
- accessibilityDescribedBy?: string | undefined;
459
- }
460
-
461
- export type Role =
462
- | 'alert'
463
- | 'alertdialog'
464
- | 'application'
465
- | 'article'
466
- | 'banner'
467
- | 'button'
468
- | 'cell'
469
- | 'checkbox'
470
- | 'columnheader'
471
- | 'combobox'
472
- | 'complementary'
473
- | 'contentinfo'
474
- | 'definition'
475
- | 'dialog'
476
- | 'directory'
477
- | 'document'
478
- | 'feed'
479
- | 'figure'
480
- | 'form'
481
- | 'grid'
482
- | 'group'
483
- | 'heading'
484
- | 'img'
485
- | 'link'
486
- | 'list'
487
- | 'listitem'
488
- | 'log'
489
- | 'main'
490
- | 'marquee'
491
- | 'math'
492
- | 'menu'
493
- | 'menubar'
494
- | 'menuitem'
495
- | 'meter'
496
- | 'navigation'
497
- | 'none'
498
- | 'note'
499
- | 'option'
500
- | 'presentation'
501
- | 'progressbar'
502
- | 'radio'
503
- | 'radiogroup'
504
- | 'region'
505
- | 'row'
506
- | 'rowgroup'
507
- | 'rowheader'
508
- | 'scrollbar'
509
- | 'searchbox'
510
- | 'separator'
511
- | 'slider'
512
- | 'spinbutton'
513
- | 'status'
514
- | 'summary'
515
- | 'switch'
516
- | 'tab'
517
- | 'table'
518
- | 'tablist'
519
- | 'tabpanel'
520
- | 'term'
521
- | 'textbox' // Win32
522
- | 'timer'
523
- | 'toolbar'
524
- | 'tooltip'
525
- | 'tree'
526
- | 'treegrid'
527
- | 'treeitem';