@fluentui-react-native/focus-zone 0.12.10 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/FocusZone.types.d.ts +23 -0
- package/lib/FocusZone.types.d.ts.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/FocusZone.types.d.ts +23 -0
- package/lib-commonjs/FocusZone.types.d.ts.map +1 -1
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +1 -1
- package/src/FocusZone.types.ts +29 -0
- package/src/index.ts +1 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/focus-zone",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Tue,
|
|
5
|
+
"date": "Tue, 17 Oct 2023 19:20:08 GMT",
|
|
6
|
+
"version": "0.13.0",
|
|
7
|
+
"tag": "@fluentui-react-native/focus-zone_v0.13.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "safreibe@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
13
|
+
"commit": "8f8c60c46ed91076bde2e5a00c88a2a63de9861b",
|
|
14
|
+
"comment": "Adding prop in FocusZone to configure tab key navigation"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 29 Aug 2023 22:56:32 GMT",
|
|
6
21
|
"version": "0.12.10",
|
|
7
22
|
"tag": "@fluentui-react-native/focus-zone_v0.12.10",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/focus-zone
|
|
2
2
|
|
|
3
|
-
This log was last generated on Tue,
|
|
3
|
+
This log was last generated on Tue, 17 Oct 2023 19:20:08 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.13.0
|
|
8
|
+
|
|
9
|
+
Tue, 17 Oct 2023 19:20:08 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Adding prop in FocusZone to configure tab key navigation (safreibe@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 0.12.10
|
|
8
16
|
|
|
9
|
-
Tue, 29 Aug 2023 22:
|
|
17
|
+
Tue, 29 Aug 2023 22:56:32 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
package/lib/FocusZone.types.d.ts
CHANGED
|
@@ -27,6 +27,27 @@ export type FocusZoneProps = React.PropsWithChildren<{
|
|
|
27
27
|
on screen, and navigates in the direction the user selects to the nearest element.
|
|
28
28
|
*/
|
|
29
29
|
use2DNavigation?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @platform win32
|
|
32
|
+
* By default, pressing Tab within a FocusZone moves focus out of the FocusZone.
|
|
33
|
+
* This prop allows you to change that behavior.
|
|
34
|
+
*
|
|
35
|
+
* "None" : Default
|
|
36
|
+
* "NavigateWrap" : Tab allowed within FZ with circular navigation behavior
|
|
37
|
+
* "NavigateStopAtEnds" : Tab allowed within FZ and stops at ends
|
|
38
|
+
* "Normal" : Tab allowed within FZ, and focus is not trapped. Tabbing at the last element bring you out of the FZ.
|
|
39
|
+
*
|
|
40
|
+
* Recommended Usage - Moving focus OUT of the FocusZone - Custom Key Handlers
|
|
41
|
+
* Example: Subscribe to key events. On the pressing of "Escape", move focus out of the FocusZone.
|
|
42
|
+
*
|
|
43
|
+
* Recommended Usage - Moving focus INTO the FocusZone
|
|
44
|
+
* Let's take a CardList, for example. If a user is navigating through elements of the List, we don't want
|
|
45
|
+
* focus to land within the FocusZone on initial focus. If it does, it will trap focus within the FocusZone and
|
|
46
|
+
* ruin the user's workflow.
|
|
47
|
+
* Instead, once focus lands on the parent of the FocusZone, implement a custom key handler that will enable
|
|
48
|
+
* the FocusZone.
|
|
49
|
+
*/
|
|
50
|
+
tabKeyNavigation?: FocusZoneTabNavigation;
|
|
30
51
|
/**
|
|
31
52
|
* Callback called when “focus” event triggered in FocusZone
|
|
32
53
|
*/
|
|
@@ -34,9 +55,11 @@ export type FocusZoneProps = React.PropsWithChildren<{
|
|
|
34
55
|
}>;
|
|
35
56
|
export interface NativeProps extends Omit<FocusZoneProps, 'isCircularNavigation'> {
|
|
36
57
|
navigateAtEnd?: NavigateAtEnd;
|
|
58
|
+
tabKeyNavigation?: FocusZoneTabNavigation;
|
|
37
59
|
}
|
|
38
60
|
export type FocusZoneDirection = 'bidirectional' /** React to all arrows. */ | 'vertical' /** Only react to up/down arrows. */ | 'horizontal' /** Only react to left/right arrows. */ | 'none'; /** Doesn't respond to any arrow keys. */
|
|
39
61
|
export type NavigateAtEnd = 'NavigateStopAtEnds' | 'NavigateWrap' | 'NavigateContinue';
|
|
62
|
+
export type FocusZoneTabNavigation = 'None' | 'NavigateWrap' | 'NavigateStopAtEnds' | 'Normal';
|
|
40
63
|
export interface FocusZoneTokens {
|
|
41
64
|
}
|
|
42
65
|
export interface FocusZoneSlotProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZone.types.d.ts","sourceRoot":"","sources":["../src/FocusZone.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,MAAM,WAAW,cAAc;CAAG;AAElC,MAA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usZoneSlotProps, FocusZoneState, FocusZoneTokens, FocusZoneType, NativeProps, NavigateAtEnd, } from './FocusZone.types';
|
|
2
|
+
export type { FocusZoneDirection, FocusZoneProps, FocusZoneRenderData, FocusZoneSlotProps, FocusZoneState, FocusZoneTabNavigation, FocusZoneTokens, FocusZoneType, NativeProps, NavigateAtEnd, } from './FocusZone.types';
|
|
3
3
|
export { FocusZone } from './FocusZone';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAalD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -27,6 +27,27 @@ export type FocusZoneProps = React.PropsWithChildren<{
|
|
|
27
27
|
on screen, and navigates in the direction the user selects to the nearest element.
|
|
28
28
|
*/
|
|
29
29
|
use2DNavigation?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @platform win32
|
|
32
|
+
* By default, pressing Tab within a FocusZone moves focus out of the FocusZone.
|
|
33
|
+
* This prop allows you to change that behavior.
|
|
34
|
+
*
|
|
35
|
+
* "None" : Default
|
|
36
|
+
* "NavigateWrap" : Tab allowed within FZ with circular navigation behavior
|
|
37
|
+
* "NavigateStopAtEnds" : Tab allowed within FZ and stops at ends
|
|
38
|
+
* "Normal" : Tab allowed within FZ, and focus is not trapped. Tabbing at the last element bring you out of the FZ.
|
|
39
|
+
*
|
|
40
|
+
* Recommended Usage - Moving focus OUT of the FocusZone - Custom Key Handlers
|
|
41
|
+
* Example: Subscribe to key events. On the pressing of "Escape", move focus out of the FocusZone.
|
|
42
|
+
*
|
|
43
|
+
* Recommended Usage - Moving focus INTO the FocusZone
|
|
44
|
+
* Let's take a CardList, for example. If a user is navigating through elements of the List, we don't want
|
|
45
|
+
* focus to land within the FocusZone on initial focus. If it does, it will trap focus within the FocusZone and
|
|
46
|
+
* ruin the user's workflow.
|
|
47
|
+
* Instead, once focus lands on the parent of the FocusZone, implement a custom key handler that will enable
|
|
48
|
+
* the FocusZone.
|
|
49
|
+
*/
|
|
50
|
+
tabKeyNavigation?: FocusZoneTabNavigation;
|
|
30
51
|
/**
|
|
31
52
|
* Callback called when “focus” event triggered in FocusZone
|
|
32
53
|
*/
|
|
@@ -34,9 +55,11 @@ export type FocusZoneProps = React.PropsWithChildren<{
|
|
|
34
55
|
}>;
|
|
35
56
|
export interface NativeProps extends Omit<FocusZoneProps, 'isCircularNavigation'> {
|
|
36
57
|
navigateAtEnd?: NavigateAtEnd;
|
|
58
|
+
tabKeyNavigation?: FocusZoneTabNavigation;
|
|
37
59
|
}
|
|
38
60
|
export type FocusZoneDirection = 'bidirectional' /** React to all arrows. */ | 'vertical' /** Only react to up/down arrows. */ | 'horizontal' /** Only react to left/right arrows. */ | 'none'; /** Doesn't respond to any arrow keys. */
|
|
39
61
|
export type NavigateAtEnd = 'NavigateStopAtEnds' | 'NavigateWrap' | 'NavigateContinue';
|
|
62
|
+
export type FocusZoneTabNavigation = 'None' | 'NavigateWrap' | 'NavigateStopAtEnds' | 'Normal';
|
|
40
63
|
export interface FocusZoneTokens {
|
|
41
64
|
}
|
|
42
65
|
export interface FocusZoneSlotProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZone.types.d.ts","sourceRoot":"","sources":["../src/FocusZone.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,MAAM,WAAW,cAAc;CAAG;AAElC,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnD;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAE3C;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAE1D;;OAEG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,CAA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AC3C;AAED,MAAM,MAAM,kBAAkB,GAC1B,eAAe,CAAC,2BAA2B,GAC3C,UAAU,CAAC,oCAAoC,GAC/C,YAAY,CAAC,uCAAuC,GACpD,MAAM,CAAC,CAAC,yCAAyC;AAErD,MAAM,MAAM,aAAa,GACrB,oBAAoB,GACpB,cAAc,GACd,kBAAkB,CAAC;AAEvB,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,cAAc,GACd,oBAAoB,GACpB,QAAQ,CAAC;AAEb,MAAM,WAAW,eAAe;CAAG;AAEnC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;AAElF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,KAAK,EAAE,cAAc,CAAC;CACvB"}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { focusZoneName } from './FocusZone.types';
|
|
2
|
-
export type { FocusZoneDirection, FocusZoneProps, FocusZoneRenderData, FocusZoneSlotProps, FocusZoneState, FocusZoneTokens, FocusZoneType, NativeProps, NavigateAtEnd, } from './FocusZone.types';
|
|
2
|
+
export type { FocusZoneDirection, FocusZoneProps, FocusZoneRenderData, FocusZoneSlotProps, FocusZoneState, FocusZoneTabNavigation, FocusZoneTokens, FocusZoneType, NativeProps, NavigateAtEnd, } from './FocusZone.types';
|
|
3
3
|
export { FocusZone } from './FocusZone';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AAatB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA"}
|
package/package.json
CHANGED
package/src/FocusZone.types.ts
CHANGED
|
@@ -37,6 +37,28 @@ export type FocusZoneProps = React.PropsWithChildren<{
|
|
|
37
37
|
*/
|
|
38
38
|
use2DNavigation?: boolean;
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* @platform win32
|
|
42
|
+
* By default, pressing Tab within a FocusZone moves focus out of the FocusZone.
|
|
43
|
+
* This prop allows you to change that behavior.
|
|
44
|
+
*
|
|
45
|
+
* "None" : Default
|
|
46
|
+
* "NavigateWrap" : Tab allowed within FZ with circular navigation behavior
|
|
47
|
+
* "NavigateStopAtEnds" : Tab allowed within FZ and stops at ends
|
|
48
|
+
* "Normal" : Tab allowed within FZ, and focus is not trapped. Tabbing at the last element bring you out of the FZ.
|
|
49
|
+
*
|
|
50
|
+
* Recommended Usage - Moving focus OUT of the FocusZone - Custom Key Handlers
|
|
51
|
+
* Example: Subscribe to key events. On the pressing of "Escape", move focus out of the FocusZone.
|
|
52
|
+
*
|
|
53
|
+
* Recommended Usage - Moving focus INTO the FocusZone
|
|
54
|
+
* Let's take a CardList, for example. If a user is navigating through elements of the List, we don't want
|
|
55
|
+
* focus to land within the FocusZone on initial focus. If it does, it will trap focus within the FocusZone and
|
|
56
|
+
* ruin the user's workflow.
|
|
57
|
+
* Instead, once focus lands on the parent of the FocusZone, implement a custom key handler that will enable
|
|
58
|
+
* the FocusZone.
|
|
59
|
+
*/
|
|
60
|
+
tabKeyNavigation?: FocusZoneTabNavigation;
|
|
61
|
+
|
|
40
62
|
/**
|
|
41
63
|
* Callback called when “focus” event triggered in FocusZone
|
|
42
64
|
*/
|
|
@@ -45,6 +67,7 @@ export type FocusZoneProps = React.PropsWithChildren<{
|
|
|
45
67
|
|
|
46
68
|
export interface NativeProps extends Omit<FocusZoneProps, 'isCircularNavigation'> {
|
|
47
69
|
navigateAtEnd?: NavigateAtEnd;
|
|
70
|
+
tabKeyNavigation?: FocusZoneTabNavigation;
|
|
48
71
|
}
|
|
49
72
|
|
|
50
73
|
export type FocusZoneDirection =
|
|
@@ -58,6 +81,12 @@ export type NavigateAtEnd =
|
|
|
58
81
|
| 'NavigateWrap' /* Circular Navigation Functionality */
|
|
59
82
|
| 'NavigateContinue'; /* At the last element of the FocusZone, focus will move to the first focusable element outside the FocusZone */
|
|
60
83
|
|
|
84
|
+
export type FocusZoneTabNavigation =
|
|
85
|
+
| 'None' /* Tab navigates you out of the FocusZone. This is Default */
|
|
86
|
+
| 'NavigateWrap' /* Navigate the FZ with Tab. Circular navigation at ends */
|
|
87
|
+
| 'NavigateStopAtEnds' /* Navigate the FZ with Tab. Stop navigation at ends */
|
|
88
|
+
| 'Normal'; /* Navigate the FZ with Tab. Don't trap focus, tabbing at ends moves you out */
|
|
89
|
+
|
|
61
90
|
export interface FocusZoneTokens {}
|
|
62
91
|
|
|
63
92
|
export interface FocusZoneSlotProps {
|