@fluentui/react-tabster 9.11.1 → 9.12.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 +34 -1
- package/CHANGELOG.md +14 -2
- package/dist/index.d.ts +4 -0
- package/lib/hooks/useFocusableGroup.js +3 -0
- package/lib/hooks/useFocusableGroup.js.map +1 -1
- package/lib-commonjs/hooks/useFocusableGroup.js +3 -0
- package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,40 @@
|
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Fri, 04 Aug 2023 08:48:22 GMT",
|
6
|
+
"tag": "@fluentui/react-tabster_v9.12.0",
|
7
|
+
"version": "9.12.0",
|
8
|
+
"comments": {
|
9
|
+
"minor": [
|
10
|
+
{
|
11
|
+
"author": "lingfangao@hotmail.com",
|
12
|
+
"package": "@fluentui/react-tabster",
|
13
|
+
"commit": "495a08579f2d16f082f2b18c299f1a647906b236",
|
14
|
+
"comment": "feat: Adds ignoreDefaultKeydown for useFocusableGroup"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-tabster",
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.7.1",
|
20
|
+
"commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-tabster",
|
25
|
+
"comment": "Bump @fluentui/react-theme to v9.1.10",
|
26
|
+
"commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-tabster",
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v9.11.0",
|
32
|
+
"commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"date": "Tue, 01 Aug 2023 10:17:21 GMT",
|
6
39
|
"tag": "@fluentui/react-tabster_v9.11.1",
|
7
40
|
"version": "9.11.1",
|
8
41
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
# Change Log - @fluentui/react-tabster
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 04 Aug 2023 08:48:22 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.12.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.12.0)
|
8
|
+
|
9
|
+
Fri, 04 Aug 2023 08:48:22 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.11.1..@fluentui/react-tabster_v9.12.0)
|
11
|
+
|
12
|
+
### Minor changes
|
13
|
+
|
14
|
+
- feat: Adds ignoreDefaultKeydown for useFocusableGroup ([PR #28660](https://github.com/microsoft/fluentui/pull/28660) by lingfangao@hotmail.com)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.7.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v9.1.10 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v9.11.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
|
18
|
+
|
7
19
|
## [9.11.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.11.1)
|
8
20
|
|
9
|
-
Tue, 01 Aug 2023 10:
|
21
|
+
Tue, 01 Aug 2023 10:17:21 GMT
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.11.0..@fluentui/react-tabster_v9.11.1)
|
11
23
|
|
12
24
|
### Patches
|
package/dist/index.d.ts
CHANGED
@@ -117,6 +117,10 @@ export declare interface UseFocusableGroupOptions {
|
|
117
117
|
* Behavior for the Tab key.
|
118
118
|
*/
|
119
119
|
tabBehavior?: 'unlimited' | 'limited' | 'limited-trap-focus';
|
120
|
+
/**
|
121
|
+
* Tabster can ignore default handling of keydown events
|
122
|
+
*/
|
123
|
+
ignoreDefaultKeydown?: Types.FocusableProps['ignoreKeydown'];
|
120
124
|
}
|
121
125
|
|
122
126
|
/**
|
@@ -12,6 +12,9 @@ import { useTabster } from './useTabster';
|
|
12
12
|
return useTabsterAttributes({
|
13
13
|
groupper: {
|
14
14
|
tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)
|
15
|
+
},
|
16
|
+
focusable: {
|
17
|
+
ignoreKeydown: options === null || options === void 0 ? void 0 : options.ignoreDefaultKeydown
|
15
18
|
}
|
16
19
|
});
|
17
20
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFocusableGroup.ts"],"sourcesContent":["import { Types, getGroupper } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseFocusableGroupOptions {\n /**\n * Behavior for the Tab key.\n */\n tabBehavior?: 'unlimited' | 'limited' | 'limited-trap-focus';\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support groupping.\n * @param options - Options to configure keyboard navigation\n */\nexport const useFocusableGroup = (options?: UseFocusableGroupOptions): Types.TabsterDOMAttribute => {\n const tabster = useTabster();\n\n if (tabster) {\n getGroupper(tabster);\n }\n\n return useTabsterAttributes({\n groupper: {\n tabbability: getTabbability(options?.tabBehavior),\n },\n });\n};\n\nconst getTabbability = (\n tabBehavior?: UseFocusableGroupOptions['tabBehavior'],\n): Types.GroupperTabbability | undefined => {\n switch (tabBehavior) {\n case 'unlimited':\n return Types.GroupperTabbabilities.Unlimited;\n case 'limited':\n return Types.GroupperTabbabilities.Limited;\n case 'limited-trap-focus':\n return Types.GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"names":["Types","getGroupper","useTabsterAttributes","useTabster","useFocusableGroup","options","tabster","groupper","tabbability","getTabbability","tabBehavior","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","undefined"],"mappings":"AAAA,SAASA,KAAK,EAAEC,WAAW,QAAQ,UAAU;AAC7C,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,UAAU,QAAQ,eAAe;
|
1
|
+
{"version":3,"sources":["useFocusableGroup.ts"],"sourcesContent":["import { Types, getGroupper } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n\nexport interface UseFocusableGroupOptions {\n /**\n * Behavior for the Tab key.\n */\n tabBehavior?: 'unlimited' | 'limited' | 'limited-trap-focus';\n\n /**\n * Tabster can ignore default handling of keydown events\n */\n ignoreDefaultKeydown?: Types.FocusableProps['ignoreKeydown'];\n}\n\n/**\n * A hook that returns the necessary tabster attributes to support groupping.\n * @param options - Options to configure keyboard navigation\n */\nexport const useFocusableGroup = (options?: UseFocusableGroupOptions): Types.TabsterDOMAttribute => {\n const tabster = useTabster();\n\n if (tabster) {\n getGroupper(tabster);\n }\n\n return useTabsterAttributes({\n groupper: {\n tabbability: getTabbability(options?.tabBehavior),\n },\n focusable: {\n ignoreKeydown: options?.ignoreDefaultKeydown,\n },\n });\n};\n\nconst getTabbability = (\n tabBehavior?: UseFocusableGroupOptions['tabBehavior'],\n): Types.GroupperTabbability | undefined => {\n switch (tabBehavior) {\n case 'unlimited':\n return Types.GroupperTabbabilities.Unlimited;\n case 'limited':\n return Types.GroupperTabbabilities.Limited;\n case 'limited-trap-focus':\n return Types.GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"names":["Types","getGroupper","useTabsterAttributes","useTabster","useFocusableGroup","options","tabster","groupper","tabbability","getTabbability","tabBehavior","focusable","ignoreKeydown","ignoreDefaultKeydown","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","undefined"],"mappings":"AAAA,SAASA,KAAK,EAAEC,WAAW,QAAQ,UAAU;AAC7C,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAc1C;;;CAGC,GACD,OAAO,MAAMC,oBAAoB,CAACC,UAAkE;IAClG,MAAMC,UAAUH;IAEhB,IAAIG,SAAS;QACXL,YAAYK;IACd,CAAC;IAED,OAAOJ,qBAAqB;QAC1BK,UAAU;YACRC,aAAaC,eAAeJ,oBAAAA,qBAAAA,KAAAA,IAAAA,QAASK,WAAW;QAClD;QACAC,WAAW;YACTC,eAAeP,oBAAAA,qBAAAA,KAAAA,IAAAA,QAASQ,oBAAoB;QAC9C;IACF;AACF,EAAE;AAEF,MAAMJ,iBAAiB,CACrBC,cAC0C;IAC1C,OAAQA;QACN,KAAK;YACH,OAAOV,MAAMc,qBAAqB,CAACC,SAAS;QAC9C,KAAK;YACH,OAAOf,MAAMc,qBAAqB,CAACE,OAAO;QAC5C,KAAK;YACH,OAAOhB,MAAMc,qBAAqB,CAACG,gBAAgB;QACrD;YACE,OAAOC;IACX;AACF"}
|
@@ -17,6 +17,9 @@ const useFocusableGroup = (options)=>{
|
|
17
17
|
return (0, _useTabsterAttributes.useTabsterAttributes)({
|
18
18
|
groupper: {
|
19
19
|
tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)
|
20
|
+
},
|
21
|
+
focusable: {
|
22
|
+
ignoreKeydown: options === null || options === void 0 ? void 0 : options.ignoreDefaultKeydown
|
20
23
|
}
|
21
24
|
});
|
22
25
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useFocusableGroup.js"],"sourcesContent":["import { Types, getGroupper } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n/**\n * A hook that returns the necessary tabster attributes to support groupping.\n * @param options - Options to configure keyboard navigation\n */ export const useFocusableGroup = (options)=>{\n const tabster = useTabster();\n if (tabster) {\n getGroupper(tabster);\n }\n return useTabsterAttributes({\n groupper: {\n tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)\n }\n });\n};\nconst getTabbability = (tabBehavior)=>{\n switch(tabBehavior){\n case 'unlimited':\n return Types.GroupperTabbabilities.Unlimited;\n case 'limited':\n return Types.GroupperTabbabilities.Limited;\n case 'limited-trap-focus':\n return Types.GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"names":["useFocusableGroup","options","tabster","useTabster","getGroupper","useTabsterAttributes","groupper","tabbability","getTabbability","tabBehavior","Types","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","undefined"],"mappings":";;;;+BAMiBA;;aAAAA;;yBANkB;sCACE;4BACV;AAIhB,MAAMA,oBAAoB,CAACC,UAAU;IAC5C,MAAMC,UAAUC,IAAAA,sBAAU;IAC1B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB,CAAC;IACD,OAAOG,IAAAA,0CAAoB,EAAC;QACxBC,UAAU;YACNC,aAAaC,eAAeP,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQQ,WAAW;QACrG;IACJ;AACJ;AACA,
|
1
|
+
{"version":3,"sources":["useFocusableGroup.js"],"sourcesContent":["import { Types, getGroupper } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n/**\n * A hook that returns the necessary tabster attributes to support groupping.\n * @param options - Options to configure keyboard navigation\n */ export const useFocusableGroup = (options)=>{\n const tabster = useTabster();\n if (tabster) {\n getGroupper(tabster);\n }\n return useTabsterAttributes({\n groupper: {\n tabbability: getTabbability(options === null || options === void 0 ? void 0 : options.tabBehavior)\n },\n focusable: {\n ignoreKeydown: options === null || options === void 0 ? void 0 : options.ignoreDefaultKeydown\n }\n });\n};\nconst getTabbability = (tabBehavior)=>{\n switch(tabBehavior){\n case 'unlimited':\n return Types.GroupperTabbabilities.Unlimited;\n case 'limited':\n return Types.GroupperTabbabilities.Limited;\n case 'limited-trap-focus':\n return Types.GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"names":["useFocusableGroup","options","tabster","useTabster","getGroupper","useTabsterAttributes","groupper","tabbability","getTabbability","tabBehavior","focusable","ignoreKeydown","ignoreDefaultKeydown","Types","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","undefined"],"mappings":";;;;+BAMiBA;;aAAAA;;yBANkB;sCACE;4BACV;AAIhB,MAAMA,oBAAoB,CAACC,UAAU;IAC5C,MAAMC,UAAUC,IAAAA,sBAAU;IAC1B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB,CAAC;IACD,OAAOG,IAAAA,0CAAoB,EAAC;QACxBC,UAAU;YACNC,aAAaC,eAAeP,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQQ,WAAW;QACrG;QACAC,WAAW;YACPC,eAAeV,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQW,oBAAoB;QACjG;IACJ;AACJ;AACA,MAAMJ,iBAAiB,CAACC,cAAc;IAClC,OAAOA;QACH,KAAK;YACD,OAAOI,cAAK,CAACC,qBAAqB,CAACC,SAAS;QAChD,KAAK;YACD,OAAOF,cAAK,CAACC,qBAAqB,CAACE,OAAO;QAC9C,KAAK;YACD,OAAOH,cAAK,CAACC,qBAAqB,CAACG,gBAAgB;QACvD;YACI,OAAOC;IACf;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tabster",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.12.0",
|
4
4
|
"description": "Utilities for focus management and facade for tabster",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -31,9 +31,9 @@
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
|
-
"@fluentui/react-shared-contexts": "^9.7.
|
35
|
-
"@fluentui/react-theme": "^9.1.
|
36
|
-
"@fluentui/react-utilities": "^9.
|
34
|
+
"@fluentui/react-shared-contexts": "^9.7.1",
|
35
|
+
"@fluentui/react-theme": "^9.1.10",
|
36
|
+
"@fluentui/react-utilities": "^9.11.0",
|
37
37
|
"@griffel/react": "^1.5.7",
|
38
38
|
"@swc/helpers": "^0.4.14",
|
39
39
|
"keyborg": "^2.0.0",
|