Skip to content

Commit 1a277b9

Browse files
jurokapsiarJuraj Kapsiar
andauthored
useArrowNavigationGroup grid-linear axis (#28253)
* useArrowNavigationGroup grid-linear axis * changelog * fix --------- Co-authored-by: Juraj Kapsiar <jukapsia@microsoft.com>
1 parent 4e3460b commit 1a277b9

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "useArrowNavigationGroup grid-linear axis",
4+
"packageName": "@fluentui/react-tabster",
5+
"email": "jukapsia@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-tabster/etc/react-tabster.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const useArrowNavigationGroup: (options?: UseArrowNavigationGroupOptions)
4949

5050
// @public (undocumented)
5151
export interface UseArrowNavigationGroupOptions {
52-
axis?: 'vertical' | 'horizontal' | 'grid' | 'both';
52+
axis?: 'vertical' | 'horizontal' | 'grid' | 'grid-linear' | 'both';
5353
circular?: boolean;
5454
ignoreDefaultKeydown?: Types.FocusableProps['ignoreKeydown'];
5555
memorizeCurrent?: boolean;

packages/react-components/react-tabster/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@griffel/react": "^1.5.7",
3838
"@swc/helpers": "^0.4.14",
3939
"keyborg": "^2.0.0",
40-
"tabster": "^4.4.2"
40+
"tabster": "^4.5.1"
4141
},
4242
"peerDependencies": {
4343
"@types/react": ">=16.8.0 <19.0.0",

packages/react-components/react-tabster/src/hooks/useArrowNavigationGroup.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface UseArrowNavigationGroupOptions {
77
* Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally
88
* @defaultValue vertical
99
*/
10-
axis?: 'vertical' | 'horizontal' | 'grid' | 'both';
10+
axis?: 'vertical' | 'horizontal' | 'grid' | 'grid-linear' | 'both';
1111
/**
1212
* Focus will cycle to the first/last elements of the group without stopping
1313
*/
@@ -76,6 +76,8 @@ function axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Typ
7676
return Types.MoverDirections.Horizontal;
7777
case 'grid':
7878
return Types.MoverDirections.Grid;
79+
case 'grid-linear':
80+
return Types.MoverDirections.GridLinear;
7981
case 'both':
8082
return Types.MoverDirections.Both;
8183

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24928,10 +24928,10 @@ table@^6.0.4, table@^6.0.7:
2492824928
string-width "^4.2.3"
2492924929
strip-ansi "^6.0.1"
2493024930

24931-
tabster@^4.4.2:
24932-
version "4.4.2"
24933-
resolved "https://registry.yarnpkg.com/tabster/-/tabster-4.4.2.tgz#df6a8990ed826301133531adb389267b7f8106dd"
24934-
integrity sha512-prscUoHg9WfWw2R0+LAlyBjtr0937qfC/s6/0/jO+sJls5pufLueazqHZC13fEV7fUPsGzTDbqchsq3TJLyPfA==
24931+
tabster@^4.5.1:
24932+
version "4.5.1"
24933+
resolved "https://registry.yarnpkg.com/tabster/-/tabster-4.5.1.tgz#15540f07f7f5ad43c53224fa22f7f701a86bd372"
24934+
integrity sha512-Zbvy4RN308q2siLBuzAFbx4LbCjeU6EnKcxAoEYhVSu8buZcrPFeUlcwfU5AvkrwYU/rq3lNl5E7millpuWITw==
2493524935
dependencies:
2493624936
keyborg "^2.0.0"
2493724937
tslib "^2.3.1"

0 commit comments

Comments
 (0)