@fluentui/react-tabster 0.0.0-nightly-20220314-0419.1 → 0.0.0-nightly-20220315-0418.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,9 +2,9 @@
2
2
  "name": "@fluentui/react-tabster",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 14 Mar 2022 04:29:23 GMT",
6
- "tag": "@fluentui/react-tabster_v0.0.0-nightly-20220314-0419.1",
7
- "version": "0.0.0-nightly-20220314-0419.1",
5
+ "date": "Tue, 15 Mar 2022 04:28:24 GMT",
6
+ "tag": "@fluentui/react-tabster_v0.0.0-nightly-20220315-0418.1",
7
+ "version": "0.0.0-nightly-20220315-0418.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -19,23 +19,29 @@
19
19
  "commit": "829295c714ac9ff8063f5e086513574ad2e7990b",
20
20
  "comment": "fix styles in getFocusOutlineStyles()"
21
21
  },
22
+ {
23
+ "author": "jukapsia@microsoft.com",
24
+ "package": "@fluentui/react-tabster",
25
+ "commit": "dc1f7a2c0cb8e7a3cc51d69ce3327f44d29109d1",
26
+ "comment": "feat(react-tabster): Add grid navigation"
27
+ },
22
28
  {
23
29
  "author": "beachball",
24
30
  "package": "@fluentui/react-tabster",
25
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20220314-0419.1",
26
- "commit": "beb5c46f1c6605a128e9eecbeb156151afbfaebd"
31
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20220315-0418.1",
32
+ "commit": "9291b58a0772db7887ec0137edbcb40ced11bfda"
27
33
  },
28
34
  {
29
35
  "author": "beachball",
30
36
  "package": "@fluentui/react-tabster",
31
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220314-0419.1",
32
- "commit": "beb5c46f1c6605a128e9eecbeb156151afbfaebd"
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220315-0418.1",
38
+ "commit": "9291b58a0772db7887ec0137edbcb40ced11bfda"
33
39
  },
34
40
  {
35
41
  "author": "beachball",
36
42
  "package": "@fluentui/react-tabster",
37
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220314-0419.1",
38
- "commit": "beb5c46f1c6605a128e9eecbeb156151afbfaebd"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220315-0418.1",
44
+ "commit": "9291b58a0772db7887ec0137edbcb40ced11bfda"
39
45
  }
40
46
  ],
41
47
  "none": [
package/CHANGELOG.md CHANGED
@@ -1,21 +1,22 @@
1
1
  # Change Log - @fluentui/react-tabster
2
2
 
3
- This log was last generated on Mon, 14 Mar 2022 04:29:23 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 15 Mar 2022 04:28:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220314-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v0.0.0-nightly-20220314-0419.1)
7
+ ## [0.0.0-nightly-20220315-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v0.0.0-nightly-20220315-0418.1)
8
8
 
9
- Mon, 14 Mar 2022 04:29:23 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-rc.5..@fluentui/react-tabster_v0.0.0-nightly-20220314-0419.1)
9
+ Tue, 15 Mar 2022 04:28:24 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-rc.5..@fluentui/react-tabster_v0.0.0-nightly-20220315-0418.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
15
15
  - fix styles in getFocusOutlineStyles() ([PR #22070](https://github.com/microsoft/fluentui/pull/22070) by olfedias@microsoft.com)
16
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20220314-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/beb5c46f1c6605a128e9eecbeb156151afbfaebd) by beachball)
17
- - Bump @fluentui/react-theme to v0.0.0-nightly-20220314-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/beb5c46f1c6605a128e9eecbeb156151afbfaebd) by beachball)
18
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220314-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/beb5c46f1c6605a128e9eecbeb156151afbfaebd) by beachball)
16
+ - feat(react-tabster): Add grid navigation ([PR #22085](https://github.com/microsoft/fluentui/pull/22085) by jukapsia@microsoft.com)
17
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20220315-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/9291b58a0772db7887ec0137edbcb40ced11bfda) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20220315-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/9291b58a0772db7887ec0137edbcb40ced11bfda) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220315-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/9291b58a0772db7887ec0137edbcb40ced11bfda) by beachball)
19
20
 
20
21
  ## [9.0.0-rc.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.0.0-rc.5)
21
22
 
package/README.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  **Tabster components for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
4
4
 
5
- Experimental library for focus management that leverages [tabster](https://github.com/microsoft/tabster).
6
-
7
- These library is not production-ready and **should never be used in product**. This space is useful for testing new features whose APIs might change before final release.
5
+ Library for focus management that leverages [tabster](https://github.com/microsoft/tabster).
8
6
 
9
7
  The provider needs to be wrapped around your application:
10
8
 
@@ -47,10 +47,10 @@ export declare const useArrowNavigationGroup: (options?: UseArrowNavigationGroup
47
47
 
48
48
  export declare interface UseArrowNavigationGroupOptions {
49
49
  /**
50
- * Focus will navigate vertically or horizontally, defaults to horizontally
50
+ * Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally
51
51
  * @defaultValue vertical
52
52
  */
53
- axis?: 'vertical' | 'horizontal';
53
+ axis?: 'vertical' | 'horizontal' | 'grid';
54
54
  /**
55
55
  * Focus will cycle to the first/last elements of the group without stopping
56
56
  */
@@ -1,10 +1,10 @@
1
1
  import { Types } from 'tabster';
2
2
  export interface UseArrowNavigationGroupOptions {
3
3
  /**
4
- * Focus will navigate vertically or horizontally, defaults to horizontally
4
+ * Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally
5
5
  * @defaultValue vertical
6
6
  */
7
- axis?: 'vertical' | 'horizontal';
7
+ axis?: 'vertical' | 'horizontal' | 'grid';
8
8
  /**
9
9
  * Focus will cycle to the first/last elements of the group without stopping
10
10
  */
@@ -29,6 +29,9 @@ function axisToMoverDirection(axis) {
29
29
  case 'horizontal':
30
30
  return Types.MoverDirections.Horizontal;
31
31
 
32
+ case 'grid':
33
+ return Types.MoverDirections.Grid;
34
+
32
35
  case 'vertical':
33
36
  default:
34
37
  return Types.MoverDirections.Vertical;
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks/useArrowNavigationGroup.ts"],"names":[],"mappings":"AAAA,SAAS,KAAT,EAAgB,QAAhB,QAAgC,SAAhC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,UAAT,QAA2B,cAA3B;AAmBA;;;AAGG;;AACH,OAAO,MAAM,uBAAuB,GAAI,OAAD,IAA6C;;;AAClF,QAAM,OAAO,GAAG,UAAU,EAA1B;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,QAAQ,CAAC,OAAD,CAAR;AACD;;AAED,SAAO,oBAAoB,CAAC;AAC1B,IAAA,KAAK,EAAE;AACL,MAAA,MAAM,EAAE,CAAC,EAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,QAAV,CADJ;AAEL,MAAA,SAAS,EAAE,oBAAoB,CAAC,CAAA,EAAA,GAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,IAAT,MAAa,IAAb,IAAa,EAAA,KAAA,KAAA,CAAb,GAAa,EAAb,GAAiB,UAAlB,CAF1B;AAGL,MAAA,eAAe,EAAE,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE;AAHrB;AADmB,GAAD,CAA3B;AAOD,CAdM;;AAgBP,SAAS,oBAAT,CAA8B,IAA9B,EAA0E;AACxE,UAAQ,IAAR;AACE,SAAK,YAAL;AACE,aAAO,KAAK,CAAC,eAAN,CAAsB,UAA7B;;AAEF,SAAK,UAAL;AACA;AACE,aAAO,KAAK,CAAC,eAAN,CAAsB,QAA7B;AANJ;AAQD","sourcesContent":["import { Types, getMover } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseArrowNavigationGroupOptions {\n /**\n * Focus will navigate vertically or horizontally, defaults to horizontally\n * @defaultValue vertical\n */\n axis?: 'vertical' | 'horizontal';\n /**\n * Focus will cycle to the first/last elements of the group without stopping\n */\n circular?: boolean;\n /**\n * Last focused element in the group will be remembered and focused (if still\n * available) when tabbing from outside of the group\n */\n memorizeCurrent?: boolean;\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support arrow key navigation\n * @param options - Options to configure keyboard navigation\n */\nexport const useArrowNavigationGroup = (options?: UseArrowNavigationGroupOptions) => {\n const tabster = useTabster();\n\n if (tabster) {\n getMover(tabster);\n }\n\n return useTabsterAttributes({\n mover: {\n cyclic: !!options?.circular,\n direction: axisToMoverDirection(options?.axis ?? 'vertical'),\n memorizeCurrent: options?.memorizeCurrent,\n },\n });\n};\n\nfunction axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Types.MoverDirection {\n switch (axis) {\n case 'horizontal':\n return Types.MoverDirections.Horizontal;\n\n case 'vertical':\n default:\n return Types.MoverDirections.Vertical;\n }\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["hooks/useArrowNavigationGroup.ts"],"names":[],"mappings":"AAAA,SAAS,KAAT,EAAgB,QAAhB,QAAgC,SAAhC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,UAAT,QAA2B,cAA3B;AAmBA;;;AAGG;;AACH,OAAO,MAAM,uBAAuB,GAAI,OAAD,IAA6C;;;AAClF,QAAM,OAAO,GAAG,UAAU,EAA1B;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,QAAQ,CAAC,OAAD,CAAR;AACD;;AAED,SAAO,oBAAoB,CAAC;AAC1B,IAAA,KAAK,EAAE;AACL,MAAA,MAAM,EAAE,CAAC,EAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,QAAV,CADJ;AAEL,MAAA,SAAS,EAAE,oBAAoB,CAAC,CAAA,EAAA,GAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,IAAT,MAAa,IAAb,IAAa,EAAA,KAAA,KAAA,CAAb,GAAa,EAAb,GAAiB,UAAlB,CAF1B;AAGL,MAAA,eAAe,EAAE,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE;AAHrB;AADmB,GAAD,CAA3B;AAOD,CAdM;;AAgBP,SAAS,oBAAT,CAA8B,IAA9B,EAA0E;AACxE,UAAQ,IAAR;AACE,SAAK,YAAL;AACE,aAAO,KAAK,CAAC,eAAN,CAAsB,UAA7B;;AACF,SAAK,MAAL;AACE,aAAO,KAAK,CAAC,eAAN,CAAsB,IAA7B;;AAEF,SAAK,UAAL;AACA;AACE,aAAO,KAAK,CAAC,eAAN,CAAsB,QAA7B;AARJ;AAUD","sourcesContent":["import { Types, getMover } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseArrowNavigationGroupOptions {\n /**\n * Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally\n * @defaultValue vertical\n */\n axis?: 'vertical' | 'horizontal' | 'grid';\n /**\n * Focus will cycle to the first/last elements of the group without stopping\n */\n circular?: boolean;\n /**\n * Last focused element in the group will be remembered and focused (if still\n * available) when tabbing from outside of the group\n */\n memorizeCurrent?: boolean;\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support arrow key navigation\n * @param options - Options to configure keyboard navigation\n */\nexport const useArrowNavigationGroup = (options?: UseArrowNavigationGroupOptions) => {\n const tabster = useTabster();\n\n if (tabster) {\n getMover(tabster);\n }\n\n return useTabsterAttributes({\n mover: {\n cyclic: !!options?.circular,\n direction: axisToMoverDirection(options?.axis ?? 'vertical'),\n memorizeCurrent: options?.memorizeCurrent,\n },\n });\n};\n\nfunction axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Types.MoverDirection {\n switch (axis) {\n case 'horizontal':\n return Types.MoverDirections.Horizontal;\n case 'grid':\n return Types.MoverDirections.Grid;\n\n case 'vertical':\n default:\n return Types.MoverDirections.Vertical;\n }\n}\n"],"sourceRoot":"../src/"}
@@ -1,10 +1,10 @@
1
1
  import { Types } from 'tabster';
2
2
  export interface UseArrowNavigationGroupOptions {
3
3
  /**
4
- * Focus will navigate vertically or horizontally, defaults to horizontally
4
+ * Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally
5
5
  * @defaultValue vertical
6
6
  */
7
- axis?: 'vertical' | 'horizontal';
7
+ axis?: 'vertical' | 'horizontal' | 'grid';
8
8
  /**
9
9
  * Focus will cycle to the first/last elements of the group without stopping
10
10
  */
@@ -41,6 +41,9 @@ function axisToMoverDirection(axis) {
41
41
  case 'horizontal':
42
42
  return tabster_1.Types.MoverDirections.Horizontal;
43
43
 
44
+ case 'grid':
45
+ return tabster_1.Types.MoverDirections.Grid;
46
+
44
47
  case 'vertical':
45
48
  default:
46
49
  return tabster_1.Types.MoverDirections.Vertical;
@@ -1 +1 @@
1
- {"version":3,"sources":["hooks/useArrowNavigationGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAmBA;;;AAGG;;;AACI,MAAM,uBAAuB,GAAI,OAAD,IAA6C;;;AAClF,QAAM,OAAO,GAAG,YAAA,CAAA,UAAA,EAAhB;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,SAAA,CAAA,QAAA,CAAS,OAAT;AACD;;AAED,SAAO,sBAAA,CAAA,oBAAA,CAAqB;AAC1B,IAAA,KAAK,EAAE;AACL,MAAA,MAAM,EAAE,CAAC,EAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,QAAV,CADJ;AAEL,MAAA,SAAS,EAAE,oBAAoB,CAAC,CAAA,EAAA,GAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,IAAT,MAAa,IAAb,IAAa,EAAA,KAAA,KAAA,CAAb,GAAa,EAAb,GAAiB,UAAlB,CAF1B;AAGL,MAAA,eAAe,EAAE,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE;AAHrB;AADmB,GAArB,CAAP;AAOD,CAdM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB;;AAgBb,SAAS,oBAAT,CAA8B,IAA9B,EAA0E;AACxE,UAAQ,IAAR;AACE,SAAK,YAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,eAAN,CAAsB,UAA7B;;AAEF,SAAK,UAAL;AACA;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,eAAN,CAAsB,QAA7B;AANJ;AAQD","sourcesContent":["import { Types, getMover } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseArrowNavigationGroupOptions {\n /**\n * Focus will navigate vertically or horizontally, defaults to horizontally\n * @defaultValue vertical\n */\n axis?: 'vertical' | 'horizontal';\n /**\n * Focus will cycle to the first/last elements of the group without stopping\n */\n circular?: boolean;\n /**\n * Last focused element in the group will be remembered and focused (if still\n * available) when tabbing from outside of the group\n */\n memorizeCurrent?: boolean;\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support arrow key navigation\n * @param options - Options to configure keyboard navigation\n */\nexport const useArrowNavigationGroup = (options?: UseArrowNavigationGroupOptions) => {\n const tabster = useTabster();\n\n if (tabster) {\n getMover(tabster);\n }\n\n return useTabsterAttributes({\n mover: {\n cyclic: !!options?.circular,\n direction: axisToMoverDirection(options?.axis ?? 'vertical'),\n memorizeCurrent: options?.memorizeCurrent,\n },\n });\n};\n\nfunction axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Types.MoverDirection {\n switch (axis) {\n case 'horizontal':\n return Types.MoverDirections.Horizontal;\n\n case 'vertical':\n default:\n return Types.MoverDirections.Vertical;\n }\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["hooks/useArrowNavigationGroup.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAmBA;;;AAGG;;;AACI,MAAM,uBAAuB,GAAI,OAAD,IAA6C;;;AAClF,QAAM,OAAO,GAAG,YAAA,CAAA,UAAA,EAAhB;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,SAAA,CAAA,QAAA,CAAS,OAAT;AACD;;AAED,SAAO,sBAAA,CAAA,oBAAA,CAAqB;AAC1B,IAAA,KAAK,EAAE;AACL,MAAA,MAAM,EAAE,CAAC,EAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,QAAV,CADJ;AAEL,MAAA,SAAS,EAAE,oBAAoB,CAAC,CAAA,EAAA,GAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,IAAT,MAAa,IAAb,IAAa,EAAA,KAAA,KAAA,CAAb,GAAa,EAAb,GAAiB,UAAlB,CAF1B;AAGL,MAAA,eAAe,EAAE,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE;AAHrB;AADmB,GAArB,CAAP;AAOD,CAdM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB;;AAgBb,SAAS,oBAAT,CAA8B,IAA9B,EAA0E;AACxE,UAAQ,IAAR;AACE,SAAK,YAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,eAAN,CAAsB,UAA7B;;AACF,SAAK,MAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,eAAN,CAAsB,IAA7B;;AAEF,SAAK,UAAL;AACA;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,eAAN,CAAsB,QAA7B;AARJ;AAUD","sourcesContent":["import { Types, getMover } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseArrowNavigationGroupOptions {\n /**\n * Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally\n * @defaultValue vertical\n */\n axis?: 'vertical' | 'horizontal' | 'grid';\n /**\n * Focus will cycle to the first/last elements of the group without stopping\n */\n circular?: boolean;\n /**\n * Last focused element in the group will be remembered and focused (if still\n * available) when tabbing from outside of the group\n */\n memorizeCurrent?: boolean;\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support arrow key navigation\n * @param options - Options to configure keyboard navigation\n */\nexport const useArrowNavigationGroup = (options?: UseArrowNavigationGroupOptions) => {\n const tabster = useTabster();\n\n if (tabster) {\n getMover(tabster);\n }\n\n return useTabsterAttributes({\n mover: {\n cyclic: !!options?.circular,\n direction: axisToMoverDirection(options?.axis ?? 'vertical'),\n memorizeCurrent: options?.memorizeCurrent,\n },\n });\n};\n\nfunction axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Types.MoverDirection {\n switch (axis) {\n case 'horizontal':\n return Types.MoverDirections.Horizontal;\n case 'grid':\n return Types.MoverDirections.Grid;\n\n case 'vertical':\n default:\n return Types.MoverDirections.Vertical;\n }\n}\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tabster",
3
- "version": "0.0.0-nightly-20220314-0419.1",
3
+ "version": "0.0.0-nightly-20220315-0418.1",
4
4
  "description": "Utilities for focus management and facade for tabster",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@griffel/react": "1.0.0",
33
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20220314-0419.1",
34
- "@fluentui/react-theme": "0.0.0-nightly-20220314-0419.1",
35
- "@fluentui/react-utilities": "0.0.0-nightly-20220314-0419.1",
33
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20220315-0418.1",
34
+ "@fluentui/react-theme": "0.0.0-nightly-20220315-0418.1",
35
+ "@fluentui/react-utilities": "0.0.0-nightly-20220315-0418.1",
36
36
  "keyborg": "^1.1.0",
37
37
  "tabster": "^1.1.1",
38
38
  "tslib": "^2.1.0"