@fluentui-react-native/focus-zone 0.12.10 → 0.13.1

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,37 @@
2
2
  "name": "@fluentui-react-native/focus-zone",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 29 Aug 2023 22:51:54 GMT",
5
+ "date": "Wed, 25 Oct 2023 20:45:34 GMT",
6
+ "version": "0.13.1",
7
+ "tag": "@fluentui-react-native/focus-zone_v0.13.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui-react-native/focus-zone",
13
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.24.9",
14
+ "commit": "not available"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 17 Oct 2023 19:21:23 GMT",
21
+ "version": "0.13.0",
22
+ "tag": "@fluentui-react-native/focus-zone_v0.13.0",
23
+ "comments": {
24
+ "minor": [
25
+ {
26
+ "author": "safreibe@microsoft.com",
27
+ "package": "@fluentui-react-native/focus-zone",
28
+ "commit": "8f8c60c46ed91076bde2e5a00c88a2a63de9861b",
29
+ "comment": "Adding prop in FocusZone to configure tab key navigation"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Tue, 29 Aug 2023 22:56:32 GMT",
6
36
  "version": "0.12.10",
7
37
  "tag": "@fluentui-react-native/focus-zone_v0.12.10",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @fluentui-react-native/focus-zone
2
2
 
3
- This log was last generated on Tue, 29 Aug 2023 22:51:54 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 25 Oct 2023 20:45:34 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.13.1
8
+
9
+ Wed, 25 Oct 2023 20:45:34 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/interactive-hooks to v0.24.9
14
+
15
+ ## 0.13.0
16
+
17
+ Tue, 17 Oct 2023 19:21:23 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - Adding prop in FocusZone to configure tab key navigation (safreibe@microsoft.com)
22
+
7
23
  ## 0.12.10
8
24
 
9
- Tue, 29 Aug 2023 22:51:54 GMT
25
+ Tue, 29 Aug 2023 22:56:32 GMT
10
26
 
11
27
  ### Patches
12
28
 
@@ -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,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,IAAI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AQ,CAAC,EAAE,OAAO,CAAC;IAGnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAE1C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAC/E,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CAC3C;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/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"}
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;AAYlD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,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,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAC/E,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;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,kBAAk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CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAC/E,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CAC3C;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"}
@@ -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;AAYtB,yCAAwC;AAA/B,sGAAA,SAAS,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/focus-zone",
3
- "version": "0.12.10",
3
+ "version": "0.13.1",
4
4
  "description": "A cross-platform FocusZone component using the Fluent Design System",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@fluentui-react-native/component-cache": "^1.5.1",
26
- "@fluentui-react-native/interactive-hooks": ">=0.24.8 <1.0.0",
26
+ "@fluentui-react-native/interactive-hooks": ">=0.24.9 <1.0.0",
27
27
  "@uifabricshared/foundation-composable": ">=0.12.2 <1.0.0",
28
28
  "@uifabricshared/foundation-settings": ">=0.13.2 <1.0.0"
29
29
  },
@@ -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 {
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ export type {
5
5
  FocusZoneRenderData,
6
6
  FocusZoneSlotProps,
7
7
  FocusZoneState,
8
+ FocusZoneTabNavigation,
8
9
  FocusZoneTokens,
9
10
  FocusZoneType,
10
11
  NativeProps,