@fluentui/react-tabster 0.0.0-nightlybc5ff01fb020211104.1 → 0.0.0-nightlyc9ccb6f37d20211122.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 +66 -13
- package/CHANGELOG.md +23 -9
- package/dist/react-tabster.d.ts +2 -17
- package/lib/hooks/useFocusableGroup.d.ts +2 -16
- package/lib/hooks/useFocusableGroup.js +17 -20
- package/lib/hooks/useFocusableGroup.js.map +1 -1
- package/lib/hooks/useTabster.js +2 -1
- package/lib/hooks/useTabster.js.map +1 -1
- package/lib-commonjs/hooks/useFocusableGroup.d.ts +2 -16
- package/lib-commonjs/hooks/useFocusableGroup.js +18 -21
- package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
- package/lib-commonjs/hooks/useTabster.js +2 -1
- package/lib-commonjs/hooks/useTabster.js.map +1 -1
- package/package.json +7 -8
package/CHANGELOG.json
CHANGED
@@ -2,17 +2,62 @@
|
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-tabster_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Mon, 22 Nov 2021 04:15:09 GMT",
|
6
|
+
"tag": "@fluentui/react-tabster_v0.0.0-nightlyc9ccb6f37d20211122.1",
|
7
|
+
"version": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-tabster",
|
13
|
-
"commit": "
|
13
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-tabster",
|
19
|
+
"comment": "Bump @fluentui/make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
20
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-tabster",
|
25
|
+
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
26
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-tabster",
|
31
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
32
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-tabster",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
38
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"date": "Fri, 12 Nov 2021 13:25:07 GMT",
|
45
|
+
"tag": "@fluentui/react-tabster_v9.0.0-beta.4",
|
46
|
+
"version": "9.0.0-beta.4",
|
47
|
+
"comments": {
|
48
|
+
"prerelease": [
|
49
|
+
{
|
50
|
+
"author": "andredias@microsoft.com",
|
51
|
+
"package": "@fluentui/react-tabster",
|
52
|
+
"commit": "bdd19e2bb827fc1d8eb329e6ed48cd0542048358",
|
53
|
+
"comment": "Add useFocusableGroup hook"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "lingfangao@hotmail.com",
|
57
|
+
"package": "@fluentui/react-tabster",
|
58
|
+
"commit": "ed2d7c8d638535c89e24e3c3de3534c4fae30172",
|
59
|
+
"comment": "Use uncontrolled tabbing by default"
|
60
|
+
},
|
16
61
|
{
|
17
62
|
"author": "gcox@microsoft.com",
|
18
63
|
"package": "@fluentui/react-tabster",
|
@@ -20,28 +65,36 @@
|
|
20
65
|
"comment": "Updated beta and RC components to ES2019"
|
21
66
|
},
|
22
67
|
{
|
23
|
-
"author": "
|
68
|
+
"author": "lingfangao@hotmail.com",
|
24
69
|
"package": "@fluentui/react-tabster",
|
25
|
-
"
|
26
|
-
"
|
70
|
+
"commit": "da10ba8b6cca0c4cf921dc176bb9b7ea57fde9fa",
|
71
|
+
"comment": "Bump tabster and keyborg to 1.0.7"
|
27
72
|
},
|
28
73
|
{
|
29
74
|
"author": "beachball",
|
30
75
|
"package": "@fluentui/react-tabster",
|
31
|
-
"comment": "Bump @fluentui/react-make-styles to
|
32
|
-
"commit": "
|
76
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
|
77
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
33
78
|
},
|
34
79
|
{
|
35
80
|
"author": "beachball",
|
36
81
|
"package": "@fluentui/react-tabster",
|
37
|
-
"comment": "Bump @fluentui/react-shared-contexts to
|
38
|
-
"commit": "
|
82
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.3",
|
83
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
39
84
|
},
|
40
85
|
{
|
41
86
|
"author": "beachball",
|
42
87
|
"package": "@fluentui/react-tabster",
|
43
|
-
"comment": "Bump @fluentui/react-utilities to
|
44
|
-
"commit": "
|
88
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
|
89
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
90
|
+
}
|
91
|
+
],
|
92
|
+
"none": [
|
93
|
+
{
|
94
|
+
"author": "lingfangao@hotmail.com",
|
95
|
+
"package": "@fluentui/react-tabster",
|
96
|
+
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
|
97
|
+
"comment": "Remove beta release tag"
|
45
98
|
}
|
46
99
|
]
|
47
100
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,22 +1,36 @@
|
|
1
1
|
# Change Log - @fluentui/react-tabster
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 22 Nov 2021 04:15:09 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyc9ccb6f37d20211122.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v0.0.0-nightlyc9ccb6f37d20211122.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-beta.
|
9
|
+
Mon, 22 Nov 2021 04:15:09 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-beta.4..@fluentui/react-tabster_v0.0.0-nightlyc9ccb6f37d20211122.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by email not defined)
|
15
|
+
- Bump @fluentui/make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
16
|
+
- Bump @fluentui/react-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
17
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
19
|
+
|
20
|
+
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.0.0-beta.4)
|
21
|
+
|
22
|
+
Fri, 12 Nov 2021 13:25:07 GMT
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-beta.3..@fluentui/react-tabster_v9.0.0-beta.4)
|
24
|
+
|
25
|
+
### Changes
|
26
|
+
|
27
|
+
- Add useFocusableGroup hook ([PR #20132](https://github.com/microsoft/fluentui/pull/20132) by andredias@microsoft.com)
|
28
|
+
- Use uncontrolled tabbing by default ([PR #20571](https://github.com/microsoft/fluentui/pull/20571) by lingfangao@hotmail.com)
|
15
29
|
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
|
16
|
-
- Bump
|
17
|
-
- Bump @fluentui/react-make-styles to
|
18
|
-
- Bump @fluentui/react-shared-contexts to
|
19
|
-
- Bump @fluentui/react-utilities to
|
30
|
+
- Bump tabster and keyborg to 1.0.7 ([PR #20593](https://github.com/microsoft/fluentui/pull/20593) by lingfangao@hotmail.com)
|
31
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
32
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
33
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
20
34
|
|
21
35
|
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.0.0-beta.3)
|
22
36
|
|
package/dist/react-tabster.d.ts
CHANGED
@@ -28,21 +28,6 @@ export declare const createFocusOutlineStyle: (theme: Theme, options?: {
|
|
28
28
|
style: Partial<FocusOutlineStyleOptions>;
|
29
29
|
} & CreateFocusIndicatorStyleRuleOptions) => MakeStyles;
|
30
30
|
|
31
|
-
export declare enum FocusableGroupTabBehavior {
|
32
|
-
/**
|
33
|
-
* Tab will cycle into and out of the groupper content.
|
34
|
-
*/
|
35
|
-
Unlimited,
|
36
|
-
/**
|
37
|
-
* Tab will cycle out of the container, but not into it.
|
38
|
-
*/
|
39
|
-
Limited,
|
40
|
-
/**
|
41
|
-
* Tab only cycles the inner elements.
|
42
|
-
*/
|
43
|
-
LimitedTrapFocus
|
44
|
-
}
|
45
|
-
|
46
31
|
export declare type FocusOutlineOffset = Record<'top' | 'bottom' | 'left' | 'right', string>;
|
47
32
|
|
48
33
|
export declare type FocusOutlineStyleOptions = {
|
@@ -87,9 +72,9 @@ export declare const useFocusableGroup: (options?: UseFocusableGroupOptions | un
|
|
87
72
|
|
88
73
|
export declare interface UseFocusableGroupOptions {
|
89
74
|
/**
|
90
|
-
*
|
75
|
+
* Behavior for the Tab key.
|
91
76
|
*/
|
92
|
-
tabBehavior?:
|
77
|
+
tabBehavior?: 'unlimited' | 'limited' | 'limitedTrapFocus';
|
93
78
|
}
|
94
79
|
|
95
80
|
/**
|
@@ -1,23 +1,9 @@
|
|
1
1
|
import { Types } from 'tabster';
|
2
|
-
export declare enum FocusableGroupTabBehavior {
|
3
|
-
/**
|
4
|
-
* Tab will cycle into and out of the groupper content.
|
5
|
-
*/
|
6
|
-
Unlimited,
|
7
|
-
/**
|
8
|
-
* Tab will cycle out of the container, but not into it.
|
9
|
-
*/
|
10
|
-
Limited,
|
11
|
-
/**
|
12
|
-
* Tab only cycles the inner elements.
|
13
|
-
*/
|
14
|
-
LimitedTrapFocus
|
15
|
-
}
|
16
2
|
export interface UseFocusableGroupOptions {
|
17
3
|
/**
|
18
|
-
*
|
4
|
+
* Behavior for the Tab key.
|
19
5
|
*/
|
20
|
-
tabBehavior?:
|
6
|
+
tabBehavior?: 'unlimited' | 'limited' | 'limitedTrapFocus';
|
21
7
|
}
|
22
8
|
/**
|
23
9
|
* A hook that returns the necessary tabster attributes to support groupping.
|
@@ -1,30 +1,11 @@
|
|
1
1
|
import { Types, getGroupper } from 'tabster';
|
2
2
|
import { useTabsterAttributes } from './useTabsterAttributes';
|
3
3
|
import { useTabster } from './useTabster';
|
4
|
-
export var FocusableGroupTabBehavior;
|
5
|
-
|
6
|
-
(function (FocusableGroupTabBehavior) {
|
7
|
-
/**
|
8
|
-
* Tab will cycle into and out of the groupper content.
|
9
|
-
*/
|
10
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["Unlimited"] = Types.GroupperTabbabilities.Unlimited] = "Unlimited";
|
11
|
-
/**
|
12
|
-
* Tab will cycle out of the container, but not into it.
|
13
|
-
*/
|
14
|
-
|
15
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["Limited"] = Types.GroupperTabbabilities.Limited] = "Limited";
|
16
|
-
/**
|
17
|
-
* Tab only cycles the inner elements.
|
18
|
-
*/
|
19
|
-
|
20
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["LimitedTrapFocus"] = Types.GroupperTabbabilities.LimitedTrapFocus] = "LimitedTrapFocus";
|
21
|
-
})(FocusableGroupTabBehavior || (FocusableGroupTabBehavior = {}));
|
22
4
|
/**
|
23
5
|
* A hook that returns the necessary tabster attributes to support groupping.
|
24
6
|
* @param options - Options to configure keyboard navigation
|
25
7
|
*/
|
26
8
|
|
27
|
-
|
28
9
|
export const useFocusableGroup = options => {
|
29
10
|
const tabster = useTabster();
|
30
11
|
|
@@ -34,8 +15,24 @@ export const useFocusableGroup = options => {
|
|
34
15
|
|
35
16
|
return useTabsterAttributes({
|
36
17
|
groupper: {
|
37
|
-
tabbability: options === null || options === void 0 ? void 0 : options.tabBehavior
|
18
|
+
tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)
|
38
19
|
}
|
39
20
|
});
|
40
21
|
};
|
22
|
+
|
23
|
+
const getTabbability = tabBehavior => {
|
24
|
+
switch (tabBehavior) {
|
25
|
+
case 'unlimited':
|
26
|
+
return Types.GroupperTabbabilities.Unlimited;
|
27
|
+
|
28
|
+
case 'limited':
|
29
|
+
return Types.GroupperTabbabilities.Limited;
|
30
|
+
|
31
|
+
case 'limitedTrapFocus':
|
32
|
+
return Types.GroupperTabbabilities.LimitedTrapFocus;
|
33
|
+
|
34
|
+
default:
|
35
|
+
return undefined;
|
36
|
+
}
|
37
|
+
};
|
41
38
|
//# sourceMappingURL=useFocusableGroup.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useFocusableGroup.ts"],"names":[],"mappings":"AAAA,SAAS,KAAT,EAAgB,WAAhB,QAAmC,SAAnC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,UAAT,QAA2B,cAA3B;
|
1
|
+
{"version":3,"sources":["../../src/hooks/useFocusableGroup.ts"],"names":[],"mappings":"AAAA,SAAS,KAAT,EAAgB,WAAhB,QAAmC,SAAnC;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,UAAT,QAA2B,cAA3B;AASA;;;AAGG;;AACH,OAAO,MAAM,iBAAiB,GAAI,OAAD,IAAuC;AACtE,QAAM,OAAO,GAAG,UAAU,EAA1B;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,WAAW,CAAC,OAAD,CAAX;AACD;;AAED,SAAO,oBAAoB,CAAC;AAC1B,IAAA,QAAQ,EAAE;AACR,MAAA,WAAW,EAAE,cAAc,CAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,WAAV;AADnB;AADgB,GAAD,CAA3B;AAKD,CAZM;;AAcP,MAAM,cAAc,GAClB,WADqB,IAEoB;AACzC,UAAQ,WAAR;AACE,SAAK,WAAL;AACE,aAAO,KAAK,CAAC,qBAAN,CAA4B,SAAnC;;AACF,SAAK,SAAL;AACE,aAAO,KAAK,CAAC,qBAAN,CAA4B,OAAnC;;AACF,SAAK,kBAAL;AACE,aAAO,KAAK,CAAC,qBAAN,CAA4B,gBAAnC;;AACF;AACE,aAAO,SAAP;AARJ;AAUD,CAbD","sourceRoot":""}
|
package/lib/hooks/useTabster.js
CHANGED
@@ -16,7 +16,8 @@ export const useTabster = () => {
|
|
16
16
|
} = useFluent();
|
17
17
|
const defaultView = (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) || undefined;
|
18
18
|
const tabsterOptions = {
|
19
|
-
autoRoot: {}
|
19
|
+
autoRoot: {},
|
20
|
+
controlTab: false
|
20
21
|
};
|
21
22
|
|
22
23
|
if (!defaultView) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useTabster.ts"],"names":[],"mappings":"AAAA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,iBAAT,EAA4B,aAA5B,QAAwE,SAAxE;AAEA;;;;;;AAMG;;AACH,OAAO,MAAM,UAAU,GAAG,MAAsC;;;AAC9D,QAAM;AAAE,IAAA;AAAF,MAAqB,SAAS,EAApC;AAEA,QAAM,WAAW,GAAG,CAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,WAAhB,KAA+B,SAAnD;AACA,QAAM,cAAc,
|
1
|
+
{"version":3,"sources":["../../src/hooks/useTabster.ts"],"names":[],"mappings":"AAAA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,iBAAT,EAA4B,aAA5B,QAAwE,SAAxE;AAEA;;;;;;AAMG;;AACH,OAAO,MAAM,UAAU,GAAG,MAAsC;;;AAC9D,QAAM;AAAE,IAAA;AAAF,MAAqB,SAAS,EAApC;AAEA,QAAM,WAAW,GAAG,CAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,WAAhB,KAA+B,SAAnD;AACA,QAAM,cAAc,GAAkC;AAAE,IAAA,QAAQ,EAAE,EAAZ;AAAgB,IAAA,UAAU,EAAE;AAA5B,GAAtD;;AAEA,MAAI,CAAC,WAAL,EAAkB;AAChB,WAAO,IAAP;AACD,GAR6D,CAU9D;;;AACA,SAAA,CAAA,EAAA,GAAO,iBAAiB,CAAC,WAAD,CAAxB,MAAqC,IAArC,IAAqC,EAAA,KAAA,KAAA,CAArC,GAAqC,EAArC,GAAyC,aAAa,CAAC,WAAD,EAAc,cAAd,CAAtD;AACD,CAZM","sourceRoot":""}
|
@@ -1,23 +1,9 @@
|
|
1
1
|
import { Types } from 'tabster';
|
2
|
-
export declare enum FocusableGroupTabBehavior {
|
3
|
-
/**
|
4
|
-
* Tab will cycle into and out of the groupper content.
|
5
|
-
*/
|
6
|
-
Unlimited,
|
7
|
-
/**
|
8
|
-
* Tab will cycle out of the container, but not into it.
|
9
|
-
*/
|
10
|
-
Limited,
|
11
|
-
/**
|
12
|
-
* Tab only cycles the inner elements.
|
13
|
-
*/
|
14
|
-
LimitedTrapFocus
|
15
|
-
}
|
16
2
|
export interface UseFocusableGroupOptions {
|
17
3
|
/**
|
18
|
-
*
|
4
|
+
* Behavior for the Tab key.
|
19
5
|
*/
|
20
|
-
tabBehavior?:
|
6
|
+
tabBehavior?: 'unlimited' | 'limited' | 'limitedTrapFocus';
|
21
7
|
}
|
22
8
|
/**
|
23
9
|
* A hook that returns the necessary tabster attributes to support groupping.
|
@@ -3,32 +3,13 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.useFocusableGroup =
|
6
|
+
exports.useFocusableGroup = void 0;
|
7
7
|
|
8
8
|
const tabster_1 = /*#__PURE__*/require("tabster");
|
9
9
|
|
10
10
|
const useTabsterAttributes_1 = /*#__PURE__*/require("./useTabsterAttributes");
|
11
11
|
|
12
12
|
const useTabster_1 = /*#__PURE__*/require("./useTabster");
|
13
|
-
|
14
|
-
var FocusableGroupTabBehavior;
|
15
|
-
|
16
|
-
(function (FocusableGroupTabBehavior) {
|
17
|
-
/**
|
18
|
-
* Tab will cycle into and out of the groupper content.
|
19
|
-
*/
|
20
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["Unlimited"] = tabster_1.Types.GroupperTabbabilities.Unlimited] = "Unlimited";
|
21
|
-
/**
|
22
|
-
* Tab will cycle out of the container, but not into it.
|
23
|
-
*/
|
24
|
-
|
25
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["Limited"] = tabster_1.Types.GroupperTabbabilities.Limited] = "Limited";
|
26
|
-
/**
|
27
|
-
* Tab only cycles the inner elements.
|
28
|
-
*/
|
29
|
-
|
30
|
-
FocusableGroupTabBehavior[FocusableGroupTabBehavior["LimitedTrapFocus"] = tabster_1.Types.GroupperTabbabilities.LimitedTrapFocus] = "LimitedTrapFocus";
|
31
|
-
})(FocusableGroupTabBehavior = exports.FocusableGroupTabBehavior || (exports.FocusableGroupTabBehavior = {}));
|
32
13
|
/**
|
33
14
|
* A hook that returns the necessary tabster attributes to support groupping.
|
34
15
|
* @param options - Options to configure keyboard navigation
|
@@ -44,10 +25,26 @@ const useFocusableGroup = options => {
|
|
44
25
|
|
45
26
|
return useTabsterAttributes_1.useTabsterAttributes({
|
46
27
|
groupper: {
|
47
|
-
tabbability: options === null || options === void 0 ? void 0 : options.tabBehavior
|
28
|
+
tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)
|
48
29
|
}
|
49
30
|
});
|
50
31
|
};
|
51
32
|
|
52
33
|
exports.useFocusableGroup = useFocusableGroup;
|
34
|
+
|
35
|
+
const getTabbability = tabBehavior => {
|
36
|
+
switch (tabBehavior) {
|
37
|
+
case 'unlimited':
|
38
|
+
return tabster_1.Types.GroupperTabbabilities.Unlimited;
|
39
|
+
|
40
|
+
case 'limited':
|
41
|
+
return tabster_1.Types.GroupperTabbabilities.Limited;
|
42
|
+
|
43
|
+
case 'limitedTrapFocus':
|
44
|
+
return tabster_1.Types.GroupperTabbabilities.LimitedTrapFocus;
|
45
|
+
|
46
|
+
default:
|
47
|
+
return undefined;
|
48
|
+
}
|
49
|
+
};
|
53
50
|
//# sourceMappingURL=useFocusableGroup.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useFocusableGroup.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
|
1
|
+
{"version":3,"sources":["../../src/hooks/useFocusableGroup.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;AASA;;;AAGG;;;AACI,MAAM,iBAAiB,GAAI,OAAD,IAAuC;AACtE,QAAM,OAAO,GAAG,YAAA,CAAA,UAAA,EAAhB;;AAEA,MAAI,OAAJ,EAAa;AACX,IAAA,SAAA,CAAA,WAAA,CAAY,OAAZ;AACD;;AAED,SAAO,sBAAA,CAAA,oBAAA,CAAqB;AAC1B,IAAA,QAAQ,EAAE;AACR,MAAA,WAAW,EAAE,cAAc,CAAC,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,WAAV;AADnB;AADgB,GAArB,CAAP;AAKD,CAZM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB;;AAcb,MAAM,cAAc,GAClB,WADqB,IAEoB;AACzC,UAAQ,WAAR;AACE,SAAK,WAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,qBAAN,CAA4B,SAAnC;;AACF,SAAK,SAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,qBAAN,CAA4B,OAAnC;;AACF,SAAK,kBAAL;AACE,aAAO,SAAA,CAAA,KAAA,CAAM,qBAAN,CAA4B,gBAAnC;;AACF;AACE,aAAO,SAAP;AARJ;AAUD,CAbD","sourceRoot":""}
|
@@ -25,7 +25,8 @@ const useTabster = () => {
|
|
25
25
|
} = react_shared_contexts_1.useFluent();
|
26
26
|
const defaultView = (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView) || undefined;
|
27
27
|
const tabsterOptions = {
|
28
|
-
autoRoot: {}
|
28
|
+
autoRoot: {},
|
29
|
+
controlTab: false
|
29
30
|
};
|
30
31
|
|
31
32
|
if (!defaultView) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useTabster.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;AAEA;;;;;;AAMG;;;AACI,MAAM,UAAU,GAAG,MAAsC;;;AAC9D,QAAM;AAAE,IAAA;AAAF,MAAqB,uBAAA,CAAA,SAAA,EAA3B;AAEA,QAAM,WAAW,GAAG,CAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,WAAhB,KAA+B,SAAnD;AACA,QAAM,cAAc,
|
1
|
+
{"version":3,"sources":["../../src/hooks/useTabster.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,SAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;AAEA;;;;;;AAMG;;;AACI,MAAM,UAAU,GAAG,MAAsC;;;AAC9D,QAAM;AAAE,IAAA;AAAF,MAAqB,uBAAA,CAAA,SAAA,EAA3B;AAEA,QAAM,WAAW,GAAG,CAAA,cAAc,KAAA,IAAd,IAAA,cAAc,KAAA,KAAA,CAAd,GAAc,KAAA,CAAd,GAAA,cAAc,CAAE,WAAhB,KAA+B,SAAnD;AACA,QAAM,cAAc,GAAkC;AAAE,IAAA,QAAQ,EAAE,EAAZ;AAAgB,IAAA,UAAU,EAAE;AAA5B,GAAtD;;AAEA,MAAI,CAAC,WAAL,EAAkB;AAChB,WAAO,IAAP;AACD,GAR6D,CAU9D;;;AACA,SAAA,CAAA,EAAA,GAAO,SAAA,CAAA,iBAAA,CAAkB,WAAlB,CAAP,MAAqC,IAArC,IAAqC,EAAA,KAAA,KAAA,CAArC,GAAqC,EAArC,GAAyC,SAAA,CAAA,aAAA,CAAc,WAAd,EAA2B,cAA3B,CAAzC;AACD,CAZM;;AAAM,OAAA,CAAA,UAAA,GAAU,UAAV","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyc9ccb6f37d20211122.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",
|
@@ -34,12 +34,12 @@
|
|
34
34
|
"react-test-renderer": "^16.3.0"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@fluentui/make-styles": "0.0.0-
|
38
|
-
"@fluentui/react-make-styles": "0.0.0-
|
39
|
-
"@fluentui/react-shared-contexts": "0.0.0-
|
40
|
-
"@fluentui/react-utilities": "0.0.0-
|
41
|
-
"keyborg": "^1.0.
|
42
|
-
"tabster": "^1.0.
|
37
|
+
"@fluentui/make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
38
|
+
"@fluentui/react-make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
39
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
40
|
+
"@fluentui/react-utilities": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
41
|
+
"keyborg": "^1.0.7",
|
42
|
+
"tabster": "^1.0.7",
|
43
43
|
"tslib": "^2.1.0"
|
44
44
|
},
|
45
45
|
"peerDependencies": {
|
@@ -49,7 +49,6 @@
|
|
49
49
|
"react-dom": ">=16.8.0 <18.0.0"
|
50
50
|
},
|
51
51
|
"beachball": {
|
52
|
-
"tag": "beta",
|
53
52
|
"disallowedChangeTypes": [
|
54
53
|
"major",
|
55
54
|
"minor",
|