@fluentui/react-tabster 9.21.4 → 9.22.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +24 -2
  2. package/dist/index.d.ts +30 -30
  3. package/lib/hooks/useArrowNavigationGroup.js +6 -6
  4. package/lib/hooks/useArrowNavigationGroup.js.map +1 -1
  5. package/lib/hooks/useFocusableGroup.js +4 -4
  6. package/lib/hooks/useFocusableGroup.js.map +1 -1
  7. package/lib/hooks/useMergeTabsterAttributes.js +3 -3
  8. package/lib/hooks/useMergeTabsterAttributes.js.map +1 -1
  9. package/lib/hooks/useModalAttributes.js +3 -3
  10. package/lib/hooks/useModalAttributes.js.map +1 -1
  11. package/lib/hooks/useRestoreFocus.js +3 -3
  12. package/lib/hooks/useRestoreFocus.js.map +1 -1
  13. package/lib/hooks/useTabsterAttributes.js +2 -2
  14. package/lib/hooks/useTabsterAttributes.js.map +1 -1
  15. package/lib/index.js +5 -9
  16. package/lib/index.js.map +1 -1
  17. package/lib/tabster-types-6.0.1-do-not-use.js.map +1 -1
  18. package/lib-commonjs/hooks/useArrowNavigationGroup.js +5 -5
  19. package/lib-commonjs/hooks/useArrowNavigationGroup.js.map +1 -1
  20. package/lib-commonjs/hooks/useFocusableGroup.js +3 -3
  21. package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
  22. package/lib-commonjs/hooks/useMergeTabsterAttributes.js +2 -2
  23. package/lib-commonjs/hooks/useMergeTabsterAttributes.js.map +1 -1
  24. package/lib-commonjs/hooks/useModalAttributes.js +2 -2
  25. package/lib-commonjs/hooks/useModalAttributes.js.map +1 -1
  26. package/lib-commonjs/hooks/useRestoreFocus.js +2 -2
  27. package/lib-commonjs/hooks/useRestoreFocus.js.map +1 -1
  28. package/lib-commonjs/hooks/useTabsterAttributes.js +1 -1
  29. package/lib-commonjs/hooks/useTabsterAttributes.js.map +1 -1
  30. package/lib-commonjs/index.js +14 -16
  31. package/lib-commonjs/index.js.map +1 -1
  32. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,12 +1,34 @@
1
1
  # Change Log - @fluentui/react-tabster
2
2
 
3
- This log was last generated on Thu, 23 May 2024 07:58:01 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 17 Jun 2024 07:31:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.22.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.22.0)
8
+
9
+ Mon, 17 Jun 2024 07:31:07 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.21.5..@fluentui/react-tabster_v9.22.0)
11
+
12
+ ### Minor changes
13
+
14
+ - Exposing TabsterMoveFocusEvent. ([PR #31393](https://github.com/microsoft/fluentui/pull/31393) by marata@microsoft.com)
15
+
16
+ ### Patches
17
+
18
+ - chore: Pulling Tabster 8.0.0 for the tree-shakeability improvements to reduce the bundle size. ([PR #31441](https://github.com/microsoft/fluentui/pull/31441) by marata@microsoft.com)
19
+
20
+ ## [9.21.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.21.5)
21
+
22
+ Thu, 06 Jun 2024 15:26:40 GMT
23
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.21.4..@fluentui/react-tabster_v9.21.5)
24
+
25
+ ### Patches
26
+
27
+ - Bump @fluentui/react-utilities to v9.18.10 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
28
+
7
29
  ## [9.21.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.21.4)
8
30
 
9
- Thu, 23 May 2024 07:58:01 GMT
31
+ Thu, 23 May 2024 08:02:49 GMT
10
32
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.21.3..@fluentui/react-tabster_v9.21.4)
11
33
 
12
34
  ### Patches
package/dist/index.d.ts CHANGED
@@ -1,12 +1,22 @@
1
1
  import { dispatchGroupperMoveFocusEvent } from 'tabster';
2
2
  import { dispatchMoverMoveFocusEvent } from 'tabster';
3
- import { Events } from 'tabster';
3
+ import { EventsTypes } from 'tabster';
4
4
  import type { GriffelStyle } from '@griffel/react';
5
+ import { GroupperMoveFocusActions } from 'tabster';
6
+ import { GroupperMoveFocusEvent } from 'tabster';
7
+ import { GroupperMoveFocusEventName } from 'tabster';
5
8
  import { KEYBORG_FOCUSIN } from 'keyborg';
6
9
  import { KeyborgFocusInEvent } from 'keyborg';
7
10
  import { makeResetStyles } from '@griffel/react';
11
+ import { MoverKeys } from 'tabster';
12
+ import { MoverMemorizedElementEvent } from 'tabster';
13
+ import { MoverMemorizedElementEventName } from 'tabster';
14
+ import { MoverMoveFocusEvent } from 'tabster';
15
+ import { MoverMoveFocusEventName } from 'tabster';
8
16
  import * as React_2 from 'react';
9
17
  import type { RefObject } from 'react';
18
+ import { TabsterMoveFocusEvent } from 'tabster';
19
+ import { TabsterMoveFocusEventName } from 'tabster';
10
20
  import { Types } from 'tabster';
11
21
 
12
22
  /**
@@ -493,10 +503,7 @@ declare type GroupperConstructor = (tabster: TabsterCore, element: HTMLElement,
493
503
 
494
504
  declare type GroupperMoveFocusAction = GroupperMoveFocusActions_2[keyof GroupperMoveFocusActions_2];
495
505
 
496
- export declare const GroupperMoveFocusActions: {
497
- readonly Enter: 1;
498
- readonly Escape: 2;
499
- };
506
+ export { GroupperMoveFocusActions }
500
507
 
501
508
  declare interface GroupperMoveFocusActions_2 {
502
509
  Enter: 1;
@@ -505,15 +512,15 @@ declare interface GroupperMoveFocusActions_2 {
505
512
 
506
513
  declare const GroupperMoveFocusActions_2: GroupperMoveFocusActions_2;
507
514
 
508
- export declare const GroupperMoveFocusEvent: typeof Events.GroupperMoveFocusEvent;
515
+ export { GroupperMoveFocusEvent }
509
516
 
510
517
  declare type GroupperMoveFocusEvent_2 = CustomEvent<{
511
518
  action: GroupperMoveFocusAction;
512
519
  } | undefined>;
513
520
 
514
- export declare type GroupperMoveFocusEventDetail = Events.GroupperMoveFocusEventDetail;
521
+ export declare type GroupperMoveFocusEventDetail = EventsTypes.GroupperMoveFocusEventDetail;
515
522
 
516
- export declare const GroupperMoveFocusEventName: "tabster:groupper:movefocus";
523
+ export { GroupperMoveFocusEventName }
517
524
 
518
525
  declare const GroupperMoveFocusEventName_2 = "tabster:groupper:movefocus";
519
526
 
@@ -693,16 +700,7 @@ declare const MoverEventName = "tabster:mover";
693
700
 
694
701
  declare type MoverKey = MoverKeys_2[keyof MoverKeys_2];
695
702
 
696
- export declare const MoverKeys: {
697
- readonly ArrowUp: 1;
698
- readonly ArrowDown: 2;
699
- readonly ArrowLeft: 3;
700
- readonly ArrowRight: 4;
701
- readonly PageUp: 5;
702
- readonly PageDown: 6;
703
- readonly Home: 7;
704
- readonly End: 8;
705
- };
703
+ export { MoverKeys }
706
704
 
707
705
  declare interface MoverKeys_2 {
708
706
  ArrowUp: 1;
@@ -717,25 +715,21 @@ declare interface MoverKeys_2 {
717
715
 
718
716
  declare const MoverKeys_2: MoverKeys_2;
719
717
 
720
- export declare const MoverMemorizedElementEvent: typeof Events.MoverMemorizedElementEvent;
718
+ export { MoverMemorizedElementEvent }
721
719
 
722
- export declare type MoverMemorizedElementEventDetail = Events.MoverMemorizedElementEventDetail;
720
+ export declare type MoverMemorizedElementEventDetail = EventsTypes.MoverMemorizedElementEventDetail;
723
721
 
724
- export declare const MoverMemorizedElementEventName: "tabster:mover:memorized-element";
722
+ export { MoverMemorizedElementEventName }
725
723
 
726
- export declare const MoverMoveFocusEvent: typeof Events.MoverMoveFocusEvent;
724
+ export { MoverMoveFocusEvent }
727
725
 
728
726
  declare type MoverMoveFocusEvent_2 = CustomEvent<{
729
727
  key: MoverKey;
730
728
  } | undefined>;
731
729
 
732
- export declare type MoverMoveFocusEventDetail = Events.MoverMoveFocusEventDetail;
730
+ export declare type MoverMoveFocusEventDetail = EventsTypes.MoverMoveFocusEventDetail;
733
731
 
734
- /**
735
- * For all exports below, we don't do wildcard exports to keep Tabster API flexible. We export only required
736
- * parts when they are needed.
737
- */
738
- export declare const MoverMoveFocusEventName: "tabster:mover:movefocus";
732
+ export { MoverMoveFocusEventName }
739
733
 
740
734
  declare const MoverMoveFocusEventName_2 = "tabster:mover:movefocus";
741
735
 
@@ -1151,7 +1145,11 @@ declare interface TabsterElementStorageEntry {
1151
1145
 
1152
1146
  declare type TabsterEventWithDetails<D> = CustomEvent<D | undefined>;
1153
1147
 
1154
- declare type TabsterMoveFocusEvent = TabsterEventWithDetails<TabsterMoveFocusEventDetails>;
1148
+ export { TabsterMoveFocusEvent }
1149
+
1150
+ declare type TabsterMoveFocusEvent_2 = TabsterEventWithDetails<TabsterMoveFocusEventDetails>;
1151
+
1152
+ export declare type TabsterMoveFocusEventDetail = EventsTypes.TabsterMoveFocusEventDetail;
1155
1153
 
1156
1154
  declare interface TabsterMoveFocusEventDetails {
1157
1155
  by: 'mover' | 'groupper' | 'modalizer' | 'root';
@@ -1160,6 +1158,8 @@ declare interface TabsterMoveFocusEventDetails {
1160
1158
  relatedEvent?: KeyboardEvent;
1161
1159
  }
1162
1160
 
1161
+ export { TabsterMoveFocusEventName }
1162
+
1163
1163
  declare type TabsterOnElement = Partial<RootOnElement & DeloserOnElement & ModalizerOnElement & FocusableOnElement & MoverOnElement & GroupperOnElement & ObservedOnElement & OutlineOnElement & UncontrolledOnElement & SysOnElement & RestorerOnElement>;
1164
1164
 
1165
1165
  declare interface TabsterPart<P> {
@@ -1200,7 +1200,7 @@ declare namespace TabsterTypes {
1200
1200
  GroupperMoveFocusEvent_2 as GroupperMoveFocusEvent,
1201
1201
  TabsterEventWithDetails,
1202
1202
  TabsterMoveFocusEventDetails,
1203
- TabsterMoveFocusEvent,
1203
+ TabsterMoveFocusEvent_2 as TabsterMoveFocusEvent,
1204
1204
  TabsterDOMAttribute_2 as TabsterDOMAttribute,
1205
1205
  TabsterCoreProps,
1206
1206
  DOMAPI,
@@ -1,4 +1,4 @@
1
- import { Types, getMover } from 'tabster';
1
+ import { getMover, MoverDirections } from 'tabster';
2
2
  import { useTabsterAttributes } from './useTabsterAttributes';
3
3
  import { useTabster } from './useTabster';
4
4
  /**
@@ -29,15 +29,15 @@ import { useTabster } from './useTabster';
29
29
  function axisToMoverDirection(axis) {
30
30
  switch(axis){
31
31
  case 'horizontal':
32
- return Types.MoverDirections.Horizontal;
32
+ return MoverDirections.Horizontal;
33
33
  case 'grid':
34
- return Types.MoverDirections.Grid;
34
+ return MoverDirections.Grid;
35
35
  case 'grid-linear':
36
- return Types.MoverDirections.GridLinear;
36
+ return MoverDirections.GridLinear;
37
37
  case 'both':
38
- return Types.MoverDirections.Both;
38
+ return MoverDirections.Both;
39
39
  case 'vertical':
40
40
  default:
41
- return Types.MoverDirections.Vertical;
41
+ return MoverDirections.Vertical;
42
42
  }
43
43
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useArrowNavigationGroup.ts"],"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' | 'grid-linear' | 'both';\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 * @default true\n */\n memorizeCurrent?: boolean;\n /**\n * Allow tabbing within the arrow navigation group items.\n */\n tabbable?: boolean;\n /**\n * Tabster should ignore default handling of keydown events\n */\n ignoreDefaultKeydown?: Types.FocusableProps['ignoreKeydown'];\n /**\n * The default focusable item in the group will be an element with Focusable.isDefault property.\n * Note that there is no way in \\@fluentui/react-tabster to set default focusable element,\n * and this option is currently for internal testing purposes only.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault?: 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 = {}): Types.TabsterDOMAttribute => {\n const {\n circular,\n axis,\n memorizeCurrent = true,\n tabbable,\n ignoreDefaultKeydown,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault,\n } = options;\n const tabster = useTabster();\n\n if (tabster) {\n getMover(tabster);\n }\n\n return useTabsterAttributes({\n mover: {\n cyclic: !!circular,\n direction: axisToMoverDirection(axis ?? 'vertical'),\n memorizeCurrent,\n tabbable,\n hasDefault: unstable_hasDefault,\n },\n ...(ignoreDefaultKeydown && {\n focusable: {\n ignoreKeydown: ignoreDefaultKeydown,\n },\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 case 'grid-linear':\n return Types.MoverDirections.GridLinear;\n case 'both':\n return Types.MoverDirections.Both;\n\n case 'vertical':\n default:\n return Types.MoverDirections.Vertical;\n }\n}\n"],"names":["Types","getMover","useTabsterAttributes","useTabster","useArrowNavigationGroup","options","circular","axis","memorizeCurrent","tabbable","ignoreDefaultKeydown","unstable_hasDefault","tabster","mover","cyclic","direction","axisToMoverDirection","hasDefault","focusable","ignoreKeydown","MoverDirections","Horizontal","Grid","GridLinear","Both","Vertical"],"mappings":"AAAA,SAASA,KAAK,EAAEC,QAAQ,QAAQ,UAAU;AAC1C,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAmC1C;;;CAGC,GACD,OAAO,MAAMC,0BAA0B,CAACC,UAA0C,CAAC,CAAC;IAClF,MAAM,EACJC,QAAQ,EACRC,IAAI,EACJC,kBAAkB,IAAI,EACtBC,QAAQ,EACRC,oBAAoB,EACpB,gEAAgE;IAChEC,mBAAmB,EACpB,GAAGN;IACJ,MAAMO,UAAUT;IAEhB,IAAIS,SAAS;QACXX,SAASW;IACX;IAEA,OAAOV,qBAAqB;QAC1BW,OAAO;YACLC,QAAQ,CAAC,CAACR;YACVS,WAAWC,qBAAqBT,iBAAAA,kBAAAA,OAAQ;YACxCC;YACAC;YACAQ,YAAYN;QACd;QACA,GAAID,wBAAwB;YAC1BQ,WAAW;gBACTC,eAAeT;YACjB;QACF,CAAC;IACH;AACF,EAAE;AAEF,SAASM,qBAAqBT,IAA4C;IACxE,OAAQA;QACN,KAAK;YACH,OAAOP,MAAMoB,eAAe,CAACC,UAAU;QACzC,KAAK;YACH,OAAOrB,MAAMoB,eAAe,CAACE,IAAI;QACnC,KAAK;YACH,OAAOtB,MAAMoB,eAAe,CAACG,UAAU;QACzC,KAAK;YACH,OAAOvB,MAAMoB,eAAe,CAACI,IAAI;QAEnC,KAAK;QACL;YACE,OAAOxB,MAAMoB,eAAe,CAACK,QAAQ;IACzC;AACF"}
1
+ {"version":3,"sources":["useArrowNavigationGroup.ts"],"sourcesContent":["import { Types, getMover, MoverDirections } 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' | 'grid-linear' | 'both';\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 * @default true\n */\n memorizeCurrent?: boolean;\n /**\n * Allow tabbing within the arrow navigation group items.\n */\n tabbable?: boolean;\n /**\n * Tabster should ignore default handling of keydown events\n */\n ignoreDefaultKeydown?: Types.FocusableProps['ignoreKeydown'];\n /**\n * The default focusable item in the group will be an element with Focusable.isDefault property.\n * Note that there is no way in \\@fluentui/react-tabster to set default focusable element,\n * and this option is currently for internal testing purposes only.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault?: 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 = {}): Types.TabsterDOMAttribute => {\n const {\n circular,\n axis,\n memorizeCurrent = true,\n tabbable,\n ignoreDefaultKeydown,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault,\n } = options;\n const tabster = useTabster();\n\n if (tabster) {\n getMover(tabster);\n }\n\n return useTabsterAttributes({\n mover: {\n cyclic: !!circular,\n direction: axisToMoverDirection(axis ?? 'vertical'),\n memorizeCurrent,\n tabbable,\n hasDefault: unstable_hasDefault,\n },\n ...(ignoreDefaultKeydown && {\n focusable: {\n ignoreKeydown: ignoreDefaultKeydown,\n },\n }),\n });\n};\n\nfunction axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Types.MoverDirection {\n switch (axis) {\n case 'horizontal':\n return MoverDirections.Horizontal;\n case 'grid':\n return MoverDirections.Grid;\n case 'grid-linear':\n return MoverDirections.GridLinear;\n case 'both':\n return MoverDirections.Both;\n\n case 'vertical':\n default:\n return MoverDirections.Vertical;\n }\n}\n"],"names":["getMover","MoverDirections","useTabsterAttributes","useTabster","useArrowNavigationGroup","options","circular","axis","memorizeCurrent","tabbable","ignoreDefaultKeydown","unstable_hasDefault","tabster","mover","cyclic","direction","axisToMoverDirection","hasDefault","focusable","ignoreKeydown","Horizontal","Grid","GridLinear","Both","Vertical"],"mappings":"AAAA,SAAgBA,QAAQ,EAAEC,eAAe,QAAQ,UAAU;AAC3D,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAmC1C;;;CAGC,GACD,OAAO,MAAMC,0BAA0B,CAACC,UAA0C,CAAC,CAAC;IAClF,MAAM,EACJC,QAAQ,EACRC,IAAI,EACJC,kBAAkB,IAAI,EACtBC,QAAQ,EACRC,oBAAoB,EACpB,gEAAgE;IAChEC,mBAAmB,EACpB,GAAGN;IACJ,MAAMO,UAAUT;IAEhB,IAAIS,SAAS;QACXZ,SAASY;IACX;IAEA,OAAOV,qBAAqB;QAC1BW,OAAO;YACLC,QAAQ,CAAC,CAACR;YACVS,WAAWC,qBAAqBT,iBAAAA,kBAAAA,OAAQ;YACxCC;YACAC;YACAQ,YAAYN;QACd;QACA,GAAID,wBAAwB;YAC1BQ,WAAW;gBACTC,eAAeT;YACjB;QACF,CAAC;IACH;AACF,EAAE;AAEF,SAASM,qBAAqBT,IAA4C;IACxE,OAAQA;QACN,KAAK;YACH,OAAON,gBAAgBmB,UAAU;QACnC,KAAK;YACH,OAAOnB,gBAAgBoB,IAAI;QAC7B,KAAK;YACH,OAAOpB,gBAAgBqB,UAAU;QACnC,KAAK;YACH,OAAOrB,gBAAgBsB,IAAI;QAE7B,KAAK;QACL;YACE,OAAOtB,gBAAgBuB,QAAQ;IACnC;AACF"}
@@ -1,4 +1,4 @@
1
- import { Types, getGroupper } from 'tabster';
1
+ import { getGroupper, GroupperTabbabilities } from 'tabster';
2
2
  import { useTabsterAttributes } from './useTabsterAttributes';
3
3
  import { useTabster } from './useTabster';
4
4
  /**
@@ -21,11 +21,11 @@ import { useTabster } from './useTabster';
21
21
  const getTabbability = (tabBehavior)=>{
22
22
  switch(tabBehavior){
23
23
  case 'unlimited':
24
- return Types.GroupperTabbabilities.Unlimited;
24
+ return GroupperTabbabilities.Unlimited;
25
25
  case 'limited':
26
- return Types.GroupperTabbabilities.Limited;
26
+ return GroupperTabbabilities.Limited;
27
27
  case 'limited-trap-focus':
28
- return Types.GroupperTabbabilities.LimitedTrapFocus;
28
+ return GroupperTabbabilities.LimitedTrapFocus;
29
29
  default:
30
30
  return undefined;
31
31
  }
@@ -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 * 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;IAChC,MAAMC,UAAUH;IAEhB,IAAIG,SAAS;QACXL,YAAYK;IACd;IAEA,OAAOJ,qBAAqB;QAC1BK,UAAU;YACRC,aAAaC,eAAeJ,oBAAAA,8BAAAA,QAASK,WAAW;QAClD;QACAC,WAAW;YACTC,aAAa,EAAEP,oBAAAA,8BAAAA,QAASQ,oBAAoB;QAC9C;IACF;AACF,EAAE;AAEF,MAAMJ,iBAAiB,CACrBC;IAEA,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"}
1
+ {"version":3,"sources":["useFocusableGroup.ts"],"sourcesContent":["import { Types, getGroupper, GroupperTabbabilities } 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 GroupperTabbabilities.Unlimited;\n case 'limited':\n return GroupperTabbabilities.Limited;\n case 'limited-trap-focus':\n return GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"names":["getGroupper","GroupperTabbabilities","useTabsterAttributes","useTabster","useFocusableGroup","options","tabster","groupper","tabbability","getTabbability","tabBehavior","focusable","ignoreKeydown","ignoreDefaultKeydown","Unlimited","Limited","LimitedTrapFocus","undefined"],"mappings":"AAAA,SAAgBA,WAAW,EAAEC,qBAAqB,QAAQ,UAAU;AACpE,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAc1C;;;CAGC,GACD,OAAO,MAAMC,oBAAoB,CAACC;IAChC,MAAMC,UAAUH;IAEhB,IAAIG,SAAS;QACXN,YAAYM;IACd;IAEA,OAAOJ,qBAAqB;QAC1BK,UAAU;YACRC,aAAaC,eAAeJ,oBAAAA,8BAAAA,QAASK,WAAW;QAClD;QACAC,WAAW;YACTC,aAAa,EAAEP,oBAAAA,8BAAAA,QAASQ,oBAAoB;QAC9C;IACF;AACF,EAAE;AAEF,MAAMJ,iBAAiB,CACrBC;IAEA,OAAQA;QACN,KAAK;YACH,OAAOT,sBAAsBa,SAAS;QACxC,KAAK;YACH,OAAOb,sBAAsBc,OAAO;QACtC,KAAK;YACH,OAAOd,sBAAsBe,gBAAgB;QAC/C;YACE,OAAOC;IACX;AACF"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Types } from 'tabster';
2
+ import { TABSTER_ATTRIBUTE_NAME } from 'tabster';
3
3
  /**
4
4
  * Merges a collection of tabster attributes.
5
5
  *
@@ -8,7 +8,7 @@ import { Types } from 'tabster';
8
8
  * @param attributes - collection of tabster attributes from other react-tabster hooks
9
9
  * @returns single merged tabster attribute
10
10
  */ export const useMergedTabsterAttributes_unstable = (...attributes)=>{
11
- const stringAttributes = attributes.map((attribute)=>attribute[Types.TabsterAttributeName]).filter(Boolean);
11
+ const stringAttributes = attributes.map((attribute)=>attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean);
12
12
  return React.useMemo(()=>{
13
13
  let attribute = stringAttributes[0];
14
14
  attributes.shift();
@@ -16,7 +16,7 @@ import { Types } from 'tabster';
16
16
  attribute = mergeAttributes(attribute, attr);
17
17
  }
18
18
  return {
19
- [Types.TabsterAttributeName]: attribute
19
+ [TABSTER_ATTRIBUTE_NAME]: attribute
20
20
  };
21
21
  // eslint-disable-next-line react-hooks/exhaustive-deps
22
22
  }, stringAttributes);
@@ -1 +1 @@
1
- {"version":3,"sources":["useMergeTabsterAttributes.ts"],"sourcesContent":["import * as React from 'react';\nimport { Types } from 'tabster';\n\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */\nexport const useMergedTabsterAttributes_unstable: (\n ...attributes: Types.TabsterDOMAttribute[]\n) => Types.TabsterDOMAttribute = (...attributes) => {\n const stringAttributes = attributes\n .map(attribute => attribute[Types.TabsterAttributeName])\n .filter(Boolean) as string[];\n\n return React.useMemo(() => {\n let attribute = stringAttributes[0];\n attributes.shift();\n\n for (const attr of stringAttributes) {\n attribute = mergeAttributes(attribute, attr);\n }\n\n return { [Types.TabsterAttributeName]: attribute };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\n\nfunction mergeAttributes(a: string, b?: string): string {\n if (!b) {\n return a;\n }\n\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n return JSON.stringify({ ...aParsed, ...bParsed });\n}\n"],"names":["React","Types","useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","TabsterAttributeName","filter","Boolean","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,QAAQ,UAAU;AAEhC;;;;;;;CAOC,GACD,OAAO,MAAMC,sCAEoB,CAAC,GAAGC;IACnC,MAAMC,mBAAmBD,WACtBE,GAAG,CAACC,CAAAA,YAAaA,SAAS,CAACL,MAAMM,oBAAoB,CAAC,EACtDC,MAAM,CAACC;IAEV,OAAOT,MAAMU,OAAO,CAAC;QACnB,IAAIJ,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWQ,KAAK;QAEhB,KAAK,MAAMC,QAAQR,iBAAkB;YACnCE,YAAYO,gBAAgBP,WAAWM;QACzC;QAEA,OAAO;YAAE,CAACX,MAAMM,oBAAoB,CAAC,EAAED;QAAU;IACjD,uDAAuD;IACzD,GAAGF;AACL,EAAE;AAEF,SAASS,gBAAgBC,CAAS,EAAEC,CAAU;IAC5C,IAAI,CAACA,GAAG;QACN,OAAOD;IACT;IAEA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACL,IAAI;YACFE,UAAUE,KAAKC,KAAK,CAACL;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,IAAIC,GAAG;QACL,IAAI;YACFE,UAAUC,KAAKC,KAAK,CAACJ;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,OAAOG,KAAKE,SAAS,CAAC;QAAE,GAAGJ,OAAO;QAAE,GAAGC,OAAO;IAAC;AACjD"}
1
+ {"version":3,"sources":["useMergeTabsterAttributes.ts"],"sourcesContent":["import * as React from 'react';\nimport { Types, TABSTER_ATTRIBUTE_NAME } from 'tabster';\n\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */\nexport const useMergedTabsterAttributes_unstable: (\n ...attributes: Types.TabsterDOMAttribute[]\n) => Types.TabsterDOMAttribute = (...attributes) => {\n const stringAttributes = attributes.map(attribute => attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean) as string[];\n\n return React.useMemo(() => {\n let attribute = stringAttributes[0];\n attributes.shift();\n\n for (const attr of stringAttributes) {\n attribute = mergeAttributes(attribute, attr);\n }\n\n return { [TABSTER_ATTRIBUTE_NAME]: attribute };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\n\nfunction mergeAttributes(a: string, b?: string): string {\n if (!b) {\n return a;\n }\n\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n\n return JSON.stringify({ ...aParsed, ...bParsed });\n}\n"],"names":["React","TABSTER_ATTRIBUTE_NAME","useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","filter","Boolean","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAAgBC,sBAAsB,QAAQ,UAAU;AAExD;;;;;;;CAOC,GACD,OAAO,MAAMC,sCAEoB,CAAC,GAAGC;IACnC,MAAMC,mBAAmBD,WAAWE,GAAG,CAACC,CAAAA,YAAaA,SAAS,CAACL,uBAAuB,EAAEM,MAAM,CAACC;IAE/F,OAAOR,MAAMS,OAAO,CAAC;QACnB,IAAIH,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWO,KAAK;QAEhB,KAAK,MAAMC,QAAQP,iBAAkB;YACnCE,YAAYM,gBAAgBN,WAAWK;QACzC;QAEA,OAAO;YAAE,CAACV,uBAAuB,EAAEK;QAAU;IAC7C,uDAAuD;IACzD,GAAGF;AACL,EAAE;AAEF,SAASQ,gBAAgBC,CAAS,EAAEC,CAAU;IAC5C,IAAI,CAACA,GAAG;QACN,OAAOD;IACT;IAEA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACL,IAAI;YACFE,UAAUE,KAAKC,KAAK,CAACL;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,IAAIC,GAAG;QACL,IAAI;YACFE,UAAUC,KAAKC,KAAK,CAACJ;QACrB,oCAAoC;QACtC,EAAE,OAAM,CAAC;IACX;IAEA,OAAOG,KAAKE,SAAS,CAAC;QAAE,GAAGJ,OAAO;QAAE,GAAGC,OAAO;IAAC;AACjD"}
@@ -1,6 +1,6 @@
1
1
  import { useId } from '@fluentui/react-utilities';
2
2
  import { useTabsterAttributes } from './useTabsterAttributes';
3
- import { getModalizer, getRestorer, Types as TabsterTypes } from 'tabster';
3
+ import { getModalizer, getRestorer, RestorerTypes } from 'tabster';
4
4
  import { useTabster } from './useTabster';
5
5
  /**
6
6
  * Applies modal dialog behaviour through DOM attributes
@@ -19,7 +19,7 @@ import { useTabster } from './useTabster';
19
19
  const id = useId('modal-', options.id);
20
20
  const modalAttributes = useTabsterAttributes({
21
21
  restorer: {
22
- type: TabsterTypes.RestorerTypes.Source
22
+ type: RestorerTypes.Source
23
23
  },
24
24
  ...trapFocus && {
25
25
  modalizer: {
@@ -32,7 +32,7 @@ import { useTabster } from './useTabster';
32
32
  });
33
33
  const triggerAttributes = useTabsterAttributes({
34
34
  restorer: {
35
- type: TabsterTypes.RestorerTypes.Target
35
+ type: RestorerTypes.Target
36
36
  }
37
37
  });
38
38
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["useModalAttributes.ts"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getModalizer, getRestorer, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\nexport interface UseModalAttributesOptions {\n /**\n * Traps focus inside the elements the attributes are applied.\n * Prefer this to `legacyTrapFocus`\n * it forbids users to tab out of the focus trap into the actual browser.\n */\n trapFocus?: boolean;\n\n /**\n * Traps focus inside the elements the attributes are applied.\n * This prop enables legacy behavior to match previous versions of Fluent and is not\n * recommended for general use.\n * Enabling `legacyTrapFocus` prevents users from tabbing out of the focus trap and into\n * the actual browser. Prefer using `trapFocus` instead of this prop.\n */\n legacyTrapFocus?: boolean;\n\n /**\n * Always reachabled in Tab order\n */\n alwaysFocusable?: boolean;\n\n /**\n * Id to use for the modalizer. An id will be generated if not provided.\n */\n id?: string;\n}\n\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */\nexport const useModalAttributes = (\n options: UseModalAttributesOptions = {},\n): { modalAttributes: TabsterTypes.TabsterDOMAttribute; triggerAttributes: TabsterTypes.TabsterDOMAttribute } => {\n const { trapFocus, alwaysFocusable, legacyTrapFocus } = options;\n const tabster = useTabster();\n // Initializes the modalizer and restorer APIs\n if (tabster) {\n getModalizer(tabster);\n getRestorer(tabster);\n }\n\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n restorer: { type: TabsterTypes.RestorerTypes.Source },\n ...(trapFocus && {\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus,\n },\n }),\n });\n\n const triggerAttributes = useTabsterAttributes({\n restorer: { type: TabsterTypes.RestorerTypes.Target },\n });\n\n return { modalAttributes, triggerAttributes };\n};\n"],"names":["useId","useTabsterAttributes","getModalizer","getRestorer","Types","TabsterTypes","useTabster","useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","id","modalAttributes","restorer","type","RestorerTypes","Source","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","Target"],"mappings":"AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAClD,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,YAAY,EAAEC,WAAW,EAAEC,SAASC,YAAY,QAAQ,UAAU;AAC3E,SAASC,UAAU,QAAQ,eAAe;AA8B1C;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGH;IACxD,MAAMI,UAAUN;IAChB,8CAA8C;IAC9C,IAAIM,SAAS;QACXV,aAAaU;QACbT,YAAYS;IACd;IAEA,MAAMC,KAAKb,MAAM,UAAUQ,QAAQK,EAAE;IACrC,MAAMC,kBAAkBb,qBAAqB;QAC3Cc,UAAU;YAAEC,MAAMX,aAAaY,aAAa,CAACC,MAAM;QAAC;QACpD,GAAIT,aAAa;YACfU,WAAW;gBACTN;gBACAO,oBAAoB,CAACX;gBACrBY,oBAAoBX;gBACpBY,WAAWX,mBAAmBF;YAChC;QACF,CAAC;IACH;IAEA,MAAMc,oBAAoBtB,qBAAqB;QAC7Cc,UAAU;YAAEC,MAAMX,aAAaY,aAAa,CAACO,MAAM;QAAC;IACtD;IAEA,OAAO;QAAEV;QAAiBS;IAAkB;AAC9C,EAAE"}
1
+ {"version":3,"sources":["useModalAttributes.ts"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getModalizer, getRestorer, Types as TabsterTypes, RestorerTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\nexport interface UseModalAttributesOptions {\n /**\n * Traps focus inside the elements the attributes are applied.\n * Prefer this to `legacyTrapFocus`\n * it forbids users to tab out of the focus trap into the actual browser.\n */\n trapFocus?: boolean;\n\n /**\n * Traps focus inside the elements the attributes are applied.\n * This prop enables legacy behavior to match previous versions of Fluent and is not\n * recommended for general use.\n * Enabling `legacyTrapFocus` prevents users from tabbing out of the focus trap and into\n * the actual browser. Prefer using `trapFocus` instead of this prop.\n */\n legacyTrapFocus?: boolean;\n\n /**\n * Always reachabled in Tab order\n */\n alwaysFocusable?: boolean;\n\n /**\n * Id to use for the modalizer. An id will be generated if not provided.\n */\n id?: string;\n}\n\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */\nexport const useModalAttributes = (\n options: UseModalAttributesOptions = {},\n): { modalAttributes: TabsterTypes.TabsterDOMAttribute; triggerAttributes: TabsterTypes.TabsterDOMAttribute } => {\n const { trapFocus, alwaysFocusable, legacyTrapFocus } = options;\n const tabster = useTabster();\n // Initializes the modalizer and restorer APIs\n if (tabster) {\n getModalizer(tabster);\n getRestorer(tabster);\n }\n\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n restorer: { type: RestorerTypes.Source },\n ...(trapFocus && {\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus,\n },\n }),\n });\n\n const triggerAttributes = useTabsterAttributes({\n restorer: { type: RestorerTypes.Target },\n });\n\n return { modalAttributes, triggerAttributes };\n};\n"],"names":["useId","useTabsterAttributes","getModalizer","getRestorer","RestorerTypes","useTabster","useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","id","modalAttributes","restorer","type","Source","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","Target"],"mappings":"AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAClD,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,YAAY,EAAEC,WAAW,EAAyBC,aAAa,QAAQ,UAAU;AAC1F,SAASC,UAAU,QAAQ,eAAe;AA8B1C;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,UAAqC,CAAC,CAAC;IAEvC,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGH;IACxD,MAAMI,UAAUN;IAChB,8CAA8C;IAC9C,IAAIM,SAAS;QACXT,aAAaS;QACbR,YAAYQ;IACd;IAEA,MAAMC,KAAKZ,MAAM,UAAUO,QAAQK,EAAE;IACrC,MAAMC,kBAAkBZ,qBAAqB;QAC3Ca,UAAU;YAAEC,MAAMX,cAAcY,MAAM;QAAC;QACvC,GAAIR,aAAa;YACfS,WAAW;gBACTL;gBACAM,oBAAoB,CAACV;gBACrBW,oBAAoBV;gBACpBW,WAAWV,mBAAmBF;YAChC;QACF,CAAC;IACH;IAEA,MAAMa,oBAAoBpB,qBAAqB;QAC7Ca,UAAU;YAAEC,MAAMX,cAAckB,MAAM;QAAC;IACzC;IAEA,OAAO;QAAET;QAAiBQ;IAAkB;AAC9C,EAAE"}
@@ -1,4 +1,4 @@
1
- import { getRestorer, getTabsterAttribute, Types as TabsterTypes } from 'tabster';
1
+ import { getRestorer, getTabsterAttribute, RestorerTypes } from 'tabster';
2
2
  import { useTabster } from './useTabster';
3
3
  /**
4
4
  * Focus will be restored to the most recent target element when it is lost from a source
@@ -11,7 +11,7 @@ import { useTabster } from './useTabster';
11
11
  }
12
12
  return getTabsterAttribute({
13
13
  restorer: {
14
- type: TabsterTypes.RestorerTypes.Target
14
+ type: RestorerTypes.Target
15
15
  }
16
16
  });
17
17
  }
@@ -26,7 +26,7 @@ import { useTabster } from './useTabster';
26
26
  }
27
27
  return getTabsterAttribute({
28
28
  restorer: {
29
- type: TabsterTypes.RestorerTypes.Source
29
+ type: RestorerTypes.Source
30
30
  }
31
31
  });
32
32
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useRestoreFocus.ts"],"sourcesContent":["import { getRestorer, getTabsterAttribute, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the target element where focus is restored\n */\nexport function useRestoreFocusTarget(): TabsterTypes.TabsterDOMAttribute {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n\n return getTabsterAttribute({ restorer: { type: TabsterTypes.RestorerTypes.Target } });\n}\n\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the element that might lose focus\n */\nexport function useRestoreFocusSource(): TabsterTypes.TabsterDOMAttribute {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n\n return getTabsterAttribute({ restorer: { type: TabsterTypes.RestorerTypes.Source } });\n}\n"],"names":["getRestorer","getTabsterAttribute","Types","TabsterTypes","useTabster","useRestoreFocusTarget","tabster","restorer","type","RestorerTypes","Target","useRestoreFocusSource","Source"],"mappings":"AAAA,SAASA,WAAW,EAAEC,mBAAmB,EAAEC,SAASC,YAAY,QAAQ,UAAU;AAClF,SAASC,UAAU,QAAQ,eAAe;AAE1C;;;CAGC,GACD,OAAO,SAASC;IACd,MAAMC,UAAUF;IAChB,+BAA+B;IAC/B,IAAIE,SAAS;QACXN,YAAYM;IACd;IAEA,OAAOL,oBAAoB;QAAEM,UAAU;YAAEC,MAAML,aAAaM,aAAa,CAACC,MAAM;QAAC;IAAE;AACrF;AAEA;;;CAGC,GACD,OAAO,SAASC;IACd,MAAML,UAAUF;IAChB,+BAA+B;IAC/B,IAAIE,SAAS;QACXN,YAAYM;IACd;IAEA,OAAOL,oBAAoB;QAAEM,UAAU;YAAEC,MAAML,aAAaM,aAAa,CAACG,MAAM;QAAC;IAAE;AACrF"}
1
+ {"version":3,"sources":["useRestoreFocus.ts"],"sourcesContent":["import { getRestorer, getTabsterAttribute, Types as TabsterTypes, RestorerTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the target element where focus is restored\n */\nexport function useRestoreFocusTarget(): TabsterTypes.TabsterDOMAttribute {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n\n return getTabsterAttribute({ restorer: { type: RestorerTypes.Target } });\n}\n\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the element that might lose focus\n */\nexport function useRestoreFocusSource(): TabsterTypes.TabsterDOMAttribute {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n\n return getTabsterAttribute({ restorer: { type: RestorerTypes.Source } });\n}\n"],"names":["getRestorer","getTabsterAttribute","RestorerTypes","useTabster","useRestoreFocusTarget","tabster","restorer","type","Target","useRestoreFocusSource","Source"],"mappings":"AAAA,SAASA,WAAW,EAAEC,mBAAmB,EAAyBC,aAAa,QAAQ,UAAU;AACjG,SAASC,UAAU,QAAQ,eAAe;AAE1C;;;CAGC,GACD,OAAO,SAASC;IACd,MAAMC,UAAUF;IAChB,+BAA+B;IAC/B,IAAIE,SAAS;QACXL,YAAYK;IACd;IAEA,OAAOJ,oBAAoB;QAAEK,UAAU;YAAEC,MAAML,cAAcM,MAAM;QAAC;IAAE;AACxE;AAEA;;;CAGC,GACD,OAAO,SAASC;IACd,MAAMJ,UAAUF;IAChB,+BAA+B;IAC/B,IAAIE,SAAS;QACXL,YAAYK;IACd;IAEA,OAAOJ,oBAAoB;QAAEK,UAAU;YAAEC,MAAML,cAAcQ,MAAM;QAAC;IAAE;AACxE"}
@@ -1,4 +1,4 @@
1
- import { getTabsterAttribute, Types as TabsterTypes } from 'tabster';
1
+ import { getTabsterAttribute, TABSTER_ATTRIBUTE_NAME } from 'tabster';
2
2
  import { useTabster } from './useTabster';
3
3
  import * as React from 'react';
4
4
  /**
@@ -10,7 +10,7 @@ import * as React from 'react';
10
10
  useTabster();
11
11
  const strAttr = getTabsterAttribute(props, true);
12
12
  return React.useMemo(()=>({
13
- [TabsterTypes.TabsterAttributeName]: strAttr
13
+ [TABSTER_ATTRIBUTE_NAME]: strAttr
14
14
  }), [
15
15
  strAttr
16
16
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTabsterAttributes.ts"],"sourcesContent":["import { getTabsterAttribute, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\nimport * as React from 'react';\n\n/**\n * @internal\n * Hook that returns tabster attributes while ensuring tabster exists\n */\nexport const useTabsterAttributes = (props: TabsterTypes.TabsterAttributeProps): TabsterTypes.TabsterDOMAttribute => {\n // A tabster instance is not necessary to generate tabster attributes\n // but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same\n useTabster();\n\n const strAttr = getTabsterAttribute(props, true);\n\n return React.useMemo(\n () => ({\n [TabsterTypes.TabsterAttributeName]: strAttr,\n }),\n [strAttr],\n );\n};\n"],"names":["getTabsterAttribute","Types","TabsterTypes","useTabster","React","useTabsterAttributes","props","strAttr","useMemo","TabsterAttributeName"],"mappings":"AAAA,SAASA,mBAAmB,EAAEC,SAASC,YAAY,QAAQ,UAAU;AACrE,SAASC,UAAU,QAAQ,eAAe;AAC1C,YAAYC,WAAW,QAAQ;AAE/B;;;CAGC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnC,qEAAqE;IACrE,iHAAiH;IACjHH;IAEA,MAAMI,UAAUP,oBAAoBM,OAAO;IAE3C,OAAOF,MAAMI,OAAO,CAClB,IAAO,CAAA;YACL,CAACN,aAAaO,oBAAoB,CAAC,EAAEF;QACvC,CAAA,GACA;QAACA;KAAQ;AAEb,EAAE"}
1
+ {"version":3,"sources":["useTabsterAttributes.ts"],"sourcesContent":["import { getTabsterAttribute, Types as TabsterTypes, TABSTER_ATTRIBUTE_NAME } from 'tabster';\nimport { useTabster } from './useTabster';\nimport * as React from 'react';\n\n/**\n * @internal\n * Hook that returns tabster attributes while ensuring tabster exists\n */\nexport const useTabsterAttributes = (props: TabsterTypes.TabsterAttributeProps): TabsterTypes.TabsterDOMAttribute => {\n // A tabster instance is not necessary to generate tabster attributes\n // but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same\n useTabster();\n\n const strAttr = getTabsterAttribute(props, true);\n\n return React.useMemo(\n () => ({\n [TABSTER_ATTRIBUTE_NAME]: strAttr,\n }),\n [strAttr],\n );\n};\n"],"names":["getTabsterAttribute","TABSTER_ATTRIBUTE_NAME","useTabster","React","useTabsterAttributes","props","strAttr","useMemo"],"mappings":"AAAA,SAASA,mBAAmB,EAAyBC,sBAAsB,QAAQ,UAAU;AAC7F,SAASC,UAAU,QAAQ,eAAe;AAC1C,YAAYC,WAAW,QAAQ;AAE/B;;;CAGC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnC,qEAAqE;IACrE,iHAAiH;IACjHH;IAEA,MAAMI,UAAUN,oBAAoBK,OAAO;IAE3C,OAAOF,MAAMI,OAAO,CAClB,IAAO,CAAA;YACL,CAACN,uBAAuB,EAAEK;QAC5B,CAAA,GACA;QAACA;KAAQ;AAEb,EAAE"}
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { useArrowNavigationGroup, useFocusableGroup, useFocusFinders, useFocusVisible, useFocusWithin, useKeyboardNavAttribute, useModalAttributes, useTabsterAttributes, useObservedElement, useFocusObserved, useMergedTabsterAttributes_unstable, useRestoreFocusSource, useRestoreFocusTarget, useUncontrolledFocus, useOnKeyboardNavigationChange, useSetKeyboardNavigation, useFocusedElementChange } from './hooks/index';
2
2
  export { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';
3
3
  export { applyFocusVisiblePolyfill } from './focus/index';
4
- import { Types, Events, dispatchGroupperMoveFocusEvent, dispatchMoverMoveFocusEvent } from 'tabster';
4
+ import { dispatchGroupperMoveFocusEvent, dispatchMoverMoveFocusEvent, MoverMoveFocusEventName, MoverMoveFocusEvent, MoverKeys, GroupperMoveFocusEventName, GroupperMoveFocusEvent, GroupperMoveFocusActions, MoverMemorizedElementEventName, MoverMemorizedElementEvent, TabsterMoveFocusEventName, TabsterMoveFocusEvent } from 'tabster';
5
5
  export { KEYBORG_FOCUSIN } from 'keyborg';
6
6
  // WARNING! ATTENTION! Tabster.Types was exported from here by mistake. To avoid breaking changes,
7
7
  // we are putting a snapshot of Tabster.Types@6.0.1 and marking the entire export as deprecated.
@@ -12,11 +12,7 @@ dispatchMoverMoveFocusEvent };
12
12
  /**
13
13
  * For all exports below, we don't do wildcard exports to keep Tabster API flexible. We export only required
14
14
  * parts when they are needed.
15
- */ export const MoverMoveFocusEventName = Events.MoverMoveFocusEventName;
16
- export const MoverMoveFocusEvent = Events.MoverMoveFocusEvent;
17
- export const MoverKeys = Types.MoverKeys;
18
- export const GroupperMoveFocusEventName = Events.GroupperMoveFocusEventName;
19
- export const GroupperMoveFocusEvent = Events.GroupperMoveFocusEvent;
20
- export const GroupperMoveFocusActions = Types.GroupperMoveFocusActions;
21
- export const MoverMemorizedElementEventName = Events.MoverMemorizedElementEventName;
22
- export const MoverMemorizedElementEvent = Events.MoverMemorizedElementEvent;
15
+ */ export { MoverMoveFocusEventName, MoverMoveFocusEvent, MoverKeys };
16
+ export { GroupperMoveFocusEventName, GroupperMoveFocusEvent, GroupperMoveFocusActions };
17
+ export { MoverMemorizedElementEventName, MoverMemorizedElementEvent };
18
+ export { TabsterMoveFocusEventName, TabsterMoveFocusEvent };
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n useArrowNavigationGroup,\n useFocusableGroup,\n useFocusFinders,\n useFocusVisible,\n useFocusWithin,\n useKeyboardNavAttribute,\n useModalAttributes,\n useTabsterAttributes,\n useObservedElement,\n useFocusObserved,\n useMergedTabsterAttributes_unstable,\n useRestoreFocusSource,\n useRestoreFocusTarget,\n useUncontrolledFocus,\n useOnKeyboardNavigationChange,\n useSetKeyboardNavigation,\n useFocusedElementChange,\n} from './hooks/index';\nexport type {\n UseArrowNavigationGroupOptions,\n UseFocusableGroupOptions,\n UseModalAttributesOptions,\n} from './hooks/index';\n\nexport { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';\n\nexport type {\n CreateCustomFocusIndicatorStyleOptions,\n CreateFocusOutlineStyleOptions,\n FocusOutlineOffset,\n FocusOutlineStyleOptions,\n} from './focus/index';\n\nexport { applyFocusVisiblePolyfill } from './focus/index';\nimport { Types, Events, dispatchGroupperMoveFocusEvent, dispatchMoverMoveFocusEvent } from 'tabster';\n\nexport type TabsterDOMAttribute = Types.TabsterDOMAttribute;\n\nexport type { KeyborgFocusInEvent } from 'keyborg';\nexport { KEYBORG_FOCUSIN } from 'keyborg';\n\n// WARNING! ATTENTION! Tabster.Types was exported from here by mistake. To avoid breaking changes,\n// we are putting a snapshot of Tabster.Types@6.0.1 and marking the entire export as deprecated.\nimport * as TabsterTypes6_0_1_DoNotUse from './tabster-types-6.0.1-do-not-use';\nexport {\n /** @deprecated (Do not use! Exposed by mistake and will be removed in the next major version.) */\n TabsterTypes6_0_1_DoNotUse as TabsterTypes,\n /** @deprecated Use element.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape })) */\n // eslint-disable-next-line deprecation/deprecation\n dispatchGroupperMoveFocusEvent,\n /** @deprecated Use element.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys.ArrowDown })) */\n // eslint-disable-next-line deprecation/deprecation\n dispatchMoverMoveFocusEvent,\n};\n\n/**\n * For all exports below, we don't do wildcard exports to keep Tabster API flexible. We export only required\n * parts when they are needed.\n */\n\nexport const MoverMoveFocusEventName = Events.MoverMoveFocusEventName;\nexport const MoverMoveFocusEvent: typeof Events.MoverMoveFocusEvent = Events.MoverMoveFocusEvent;\nexport type MoverMoveFocusEventDetail = Events.MoverMoveFocusEventDetail;\nexport const MoverKeys = Types.MoverKeys;\n\nexport const GroupperMoveFocusEventName = Events.GroupperMoveFocusEventName;\nexport const GroupperMoveFocusEvent: typeof Events.GroupperMoveFocusEvent = Events.GroupperMoveFocusEvent;\nexport type GroupperMoveFocusEventDetail = Events.GroupperMoveFocusEventDetail;\nexport const GroupperMoveFocusActions = Types.GroupperMoveFocusActions;\n\nexport const MoverMemorizedElementEventName = Events.MoverMemorizedElementEventName;\nexport const MoverMemorizedElementEvent: typeof Events.MoverMemorizedElementEvent = Events.MoverMemorizedElementEvent;\nexport type MoverMemorizedElementEventDetail = Events.MoverMemorizedElementEventDetail;\n"],"names":["useArrowNavigationGroup","useFocusableGroup","useFocusFinders","useFocusVisible","useFocusWithin","useKeyboardNavAttribute","useModalAttributes","useTabsterAttributes","useObservedElement","useFocusObserved","useMergedTabsterAttributes_unstable","useRestoreFocusSource","useRestoreFocusTarget","useUncontrolledFocus","useOnKeyboardNavigationChange","useSetKeyboardNavigation","useFocusedElementChange","createCustomFocusIndicatorStyle","createFocusOutlineStyle","applyFocusVisiblePolyfill","Types","Events","dispatchGroupperMoveFocusEvent","dispatchMoverMoveFocusEvent","KEYBORG_FOCUSIN","TabsterTypes6_0_1_DoNotUse","TabsterTypes","MoverMoveFocusEventName","MoverMoveFocusEvent","MoverKeys","GroupperMoveFocusEventName","GroupperMoveFocusEvent","GroupperMoveFocusActions","MoverMemorizedElementEventName","MoverMemorizedElementEvent"],"mappings":"AAAA,SACEA,uBAAuB,EACvBC,iBAAiB,EACjBC,eAAe,EACfC,eAAe,EACfC,cAAc,EACdC,uBAAuB,EACvBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,EAClBC,gBAAgB,EAChBC,mCAAmC,EACnCC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBC,6BAA6B,EAC7BC,wBAAwB,EACxBC,uBAAuB,QAClB,gBAAgB;AAOvB,SAASC,+BAA+B,EAAEC,uBAAuB,QAAQ,gBAAgB;AASzF,SAASC,yBAAyB,QAAQ,gBAAgB;AAC1D,SAASC,KAAK,EAAEC,MAAM,EAAEC,8BAA8B,EAAEC,2BAA2B,QAAQ,UAAU;AAKrG,SAASC,eAAe,QAAQ,UAAU;AAE1C,kGAAkG;AAClG,gGAAgG;AAChG,YAAYC,gCAAgC,mCAAmC;AAC/E,SACE,iGAAiG,GACjGA,8BAA8BC,YAAY,EAC1C,mHAAmH,GACnH,mDAAmD;AACnDJ,8BAA8B,EAC9B,iGAAiG,GACjG,mDAAmD;AACnDC,2BAA2B,GAC3B;AAEF;;;CAGC,GAED,OAAO,MAAMI,0BAA0BN,OAAOM,uBAAuB,CAAC;AACtE,OAAO,MAAMC,sBAAyDP,OAAOO,mBAAmB,CAAC;AAEjG,OAAO,MAAMC,YAAYT,MAAMS,SAAS,CAAC;AAEzC,OAAO,MAAMC,6BAA6BT,OAAOS,0BAA0B,CAAC;AAC5E,OAAO,MAAMC,yBAA+DV,OAAOU,sBAAsB,CAAC;AAE1G,OAAO,MAAMC,2BAA2BZ,MAAMY,wBAAwB,CAAC;AAEvE,OAAO,MAAMC,iCAAiCZ,OAAOY,8BAA8B,CAAC;AACpF,OAAO,MAAMC,6BAAuEb,OAAOa,0BAA0B,CAAC"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n useArrowNavigationGroup,\n useFocusableGroup,\n useFocusFinders,\n useFocusVisible,\n useFocusWithin,\n useKeyboardNavAttribute,\n useModalAttributes,\n useTabsterAttributes,\n useObservedElement,\n useFocusObserved,\n useMergedTabsterAttributes_unstable,\n useRestoreFocusSource,\n useRestoreFocusTarget,\n useUncontrolledFocus,\n useOnKeyboardNavigationChange,\n useSetKeyboardNavigation,\n useFocusedElementChange,\n} from './hooks/index';\nexport type {\n UseArrowNavigationGroupOptions,\n UseFocusableGroupOptions,\n UseModalAttributesOptions,\n} from './hooks/index';\n\nexport { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';\n\nexport type {\n CreateCustomFocusIndicatorStyleOptions,\n CreateFocusOutlineStyleOptions,\n FocusOutlineOffset,\n FocusOutlineStyleOptions,\n} from './focus/index';\n\nexport { applyFocusVisiblePolyfill } from './focus/index';\nimport {\n type Types,\n type EventsTypes,\n dispatchGroupperMoveFocusEvent,\n dispatchMoverMoveFocusEvent,\n MoverMoveFocusEventName,\n MoverMoveFocusEvent,\n MoverKeys,\n GroupperMoveFocusEventName,\n GroupperMoveFocusEvent,\n GroupperMoveFocusActions,\n MoverMemorizedElementEventName,\n MoverMemorizedElementEvent,\n TabsterMoveFocusEventName,\n TabsterMoveFocusEvent,\n} from 'tabster';\n\nexport type TabsterDOMAttribute = Types.TabsterDOMAttribute;\n\nexport type { KeyborgFocusInEvent } from 'keyborg';\nexport { KEYBORG_FOCUSIN } from 'keyborg';\n\n// WARNING! ATTENTION! Tabster.Types was exported from here by mistake. To avoid breaking changes,\n// we are putting a snapshot of Tabster.Types@6.0.1 and marking the entire export as deprecated.\nimport * as TabsterTypes6_0_1_DoNotUse from './tabster-types-6.0.1-do-not-use';\nexport {\n /** @deprecated (Do not use! Exposed by mistake and will be removed in the next major version.) */\n TabsterTypes6_0_1_DoNotUse as TabsterTypes,\n /** @deprecated Use element.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape })) */\n // eslint-disable-next-line deprecation/deprecation\n dispatchGroupperMoveFocusEvent,\n /** @deprecated Use element.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys.ArrowDown })) */\n // eslint-disable-next-line deprecation/deprecation\n dispatchMoverMoveFocusEvent,\n};\n\n/**\n * For all exports below, we don't do wildcard exports to keep Tabster API flexible. We export only required\n * parts when they are needed.\n */\n\nexport { MoverMoveFocusEventName, MoverMoveFocusEvent, MoverKeys };\nexport type MoverMoveFocusEventDetail = EventsTypes.MoverMoveFocusEventDetail;\n\nexport { GroupperMoveFocusEventName, GroupperMoveFocusEvent, GroupperMoveFocusActions };\nexport type GroupperMoveFocusEventDetail = EventsTypes.GroupperMoveFocusEventDetail;\n\nexport { MoverMemorizedElementEventName, MoverMemorizedElementEvent };\nexport type MoverMemorizedElementEventDetail = EventsTypes.MoverMemorizedElementEventDetail;\n\nexport { TabsterMoveFocusEventName, TabsterMoveFocusEvent };\nexport type TabsterMoveFocusEventDetail = EventsTypes.TabsterMoveFocusEventDetail;\n"],"names":["useArrowNavigationGroup","useFocusableGroup","useFocusFinders","useFocusVisible","useFocusWithin","useKeyboardNavAttribute","useModalAttributes","useTabsterAttributes","useObservedElement","useFocusObserved","useMergedTabsterAttributes_unstable","useRestoreFocusSource","useRestoreFocusTarget","useUncontrolledFocus","useOnKeyboardNavigationChange","useSetKeyboardNavigation","useFocusedElementChange","createCustomFocusIndicatorStyle","createFocusOutlineStyle","applyFocusVisiblePolyfill","dispatchGroupperMoveFocusEvent","dispatchMoverMoveFocusEvent","MoverMoveFocusEventName","MoverMoveFocusEvent","MoverKeys","GroupperMoveFocusEventName","GroupperMoveFocusEvent","GroupperMoveFocusActions","MoverMemorizedElementEventName","MoverMemorizedElementEvent","TabsterMoveFocusEventName","TabsterMoveFocusEvent","KEYBORG_FOCUSIN","TabsterTypes6_0_1_DoNotUse","TabsterTypes"],"mappings":"AAAA,SACEA,uBAAuB,EACvBC,iBAAiB,EACjBC,eAAe,EACfC,eAAe,EACfC,cAAc,EACdC,uBAAuB,EACvBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,EAClBC,gBAAgB,EAChBC,mCAAmC,EACnCC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBC,6BAA6B,EAC7BC,wBAAwB,EACxBC,uBAAuB,QAClB,gBAAgB;AAOvB,SAASC,+BAA+B,EAAEC,uBAAuB,QAAQ,gBAAgB;AASzF,SAASC,yBAAyB,QAAQ,gBAAgB;AAC1D,SAGEC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,uBAAuB,EACvBC,mBAAmB,EACnBC,SAAS,EACTC,0BAA0B,EAC1BC,sBAAsB,EACtBC,wBAAwB,EACxBC,8BAA8B,EAC9BC,0BAA0B,EAC1BC,yBAAyB,EACzBC,qBAAqB,QAChB,UAAU;AAKjB,SAASC,eAAe,QAAQ,UAAU;AAE1C,kGAAkG;AAClG,gGAAgG;AAChG,YAAYC,gCAAgC,mCAAmC;AAC/E,SACE,iGAAiG,GACjGA,8BAA8BC,YAAY,EAC1C,mHAAmH,GACnH,mDAAmD;AACnDd,8BAA8B,EAC9B,iGAAiG,GACjG,mDAAmD;AACnDC,2BAA2B,GAC3B;AAEF;;;CAGC,GAED,SAASC,uBAAuB,EAAEC,mBAAmB,EAAEC,SAAS,GAAG;AAGnE,SAASC,0BAA0B,EAAEC,sBAAsB,EAAEC,wBAAwB,GAAG;AAGxF,SAASC,8BAA8B,EAAEC,0BAA0B,GAAG;AAGtE,SAASC,yBAAyB,EAAEC,qBAAqB,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["tabster-types-6.0.1-do-not-use.ts"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n *\n * Do not use anything from this file. It is a snapshot of the older Tabster typings exposed by a mistake.\n * The exposed typings should have been removed, but we don't do it in minor versions to avoid breaking changes.\n * Everything reexported from this file as react-tabster/TabsterTypes is marked as deprecated and shouldn't\n * be used anywhre.\n *\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n */\n\nexport const TabsterAttributeName = 'data-tabster';\nexport const TabsterDummyInputAttributeName = 'data-tabster-dummy';\nexport const DeloserEventName = 'tabster:deloser';\nexport const ModalizerActiveEventName = 'tabster:modalizer:active';\nexport const ModalizerInactiveEventName = 'tabster:modalizer:inactive';\nexport const ModalizerFocusInEventName = 'tabster:modalizer:focusin';\nexport const ModalizerFocusOutEventName = 'tabster:modalizer:focusout';\nexport const ModalizerBeforeFocusOutEventName = 'tabster:modalizer:beforefocusout';\nexport const MoverEventName = 'tabster:mover';\nexport const FocusInEventName = 'tabster:focusin';\nexport const FocusOutEventName = 'tabster:focusout';\n\n// Event to be triggered when Tabster wants to move focus as the result of\n// keyboard event. This allows to preventDefault() if you want to have\n// some custom logic.\nexport const MoveFocusEventName = 'tabster:movefocus';\n\n// Event that can be triggered by the application to programmatically move\n// focus inside Mover.\nexport const MoverMoveFocusEventName = 'tabster:mover:movefocus';\n// Event that can be triggered by the application to programmatically enter\n// or escape Groupper.\nexport const GroupperMoveFocusEventName = 'tabster:groupper:movefocus';\n\nexport const FocusableSelector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '*[tabindex]',\n '*[contenteditable]',\n].join(', ');\n\n// Trigger move focus event on a Mover element.\nexport type MoverMoveFocusEvent = CustomEvent<{ key: MoverKey } | undefined>;\n\nexport interface GroupperMoveFocusActions {\n Enter: 1;\n Escape: 2;\n}\nexport type GroupperMoveFocusAction = GroupperMoveFocusActions[keyof GroupperMoveFocusActions];\nexport const GroupperMoveFocusActions: GroupperMoveFocusActions = {\n Enter: 1,\n Escape: 2,\n};\n\n// Enter or escape Groupper. Enter when `enter` is true, escape when `enter` is false.\nexport type GroupperMoveFocusEvent = CustomEvent<{ action: GroupperMoveFocusAction } | undefined>;\n\nexport type TabsterEventWithDetails<D> = CustomEvent<D | undefined>;\n\nexport interface TabsterMoveFocusEventDetails {\n by: 'mover' | 'groupper' | 'modalizer' | 'root';\n owner: HTMLElement; // Mover, Groupper, Modalizer or Root, the initiator.\n next: HTMLElement | null; // Next element to focus or null if Tabster wants to go outside of Root (i.e. to the address bar of the browser).\n relatedEvent?: KeyboardEvent; // The original keyboard event that triggered the move.\n}\n\nexport type TabsterMoveFocusEvent = TabsterEventWithDetails<TabsterMoveFocusEventDetails>;\n\nexport interface TabsterDOMAttribute {\n [TabsterAttributeName]: string | undefined;\n}\n\nexport interface TabsterCoreProps {\n autoRoot?: RootProps;\n /**\n * Allows all tab key presses under the tabster root to be controlled by tabster\n * @default true\n */\n controlTab?: boolean;\n /**\n * When controlTab is false, Root doesn't have dummy inputs by default.\n * This option allows to enable dummy inputs on Root.\n */\n rootDummyInputs?: boolean;\n /**\n * A callback that will be called for the uncontrolled areas when Tabster wants\n * to know is the uncontrolled element wants complete control (for example it\n * is trapping focus) and Tabster should not interfere with handling Tab.\n * If the callback returns undefined, then the default behaviour is to return\n * the uncontrolled.completely value from the element. If the callback returns\n * non-undefined value, the callback's value will dominate the element's\n * uncontrolled.completely value.\n */\n checkUncontrolledCompletely?: (\n element: HTMLElement,\n completely: boolean, // A uncontrolled.completely value from the element.\n ) => boolean | undefined;\n /**\n * @deprecated use checkUncontrolledCompletely.\n */\n checkUncontrolledTrappingFocus?: (element: HTMLElement) => boolean;\n /**\n * Custom getter for parent elements. Defaults to the default .parentElement call\n * Currently only used to detect tabster contexts\n */\n getParent?(el: Node): Node | null;\n /**\n * Ability to redefine all DOM API calls used by Tabster. For example, for\n * ShadowDOM support.\n */\n DOMAPI?: Partial<DOMAPI>;\n}\n\nexport interface DOMAPI {\n createMutationObserver: (callback: MutationCallback) => MutationObserver;\n createTreeWalker(doc: Document, root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker;\n getParentNode(node: Node | null | undefined): ParentNode | null;\n getParentElement(element: HTMLElement | null | undefined): HTMLElement | null;\n nodeContains(parent: Node | null | undefined, child: Node | null | undefined): boolean;\n getActiveElement(doc: Document): Element | null;\n querySelector(element: ParentNode, selector: string): Element | null;\n querySelectorAll(element: ParentNode, selector: string): Element[];\n getElementById(doc: Document, id: string): HTMLElement | null;\n getFirstChild(node: Node | null | undefined): ChildNode | null;\n getLastChild(node: Node | null | undefined): ChildNode | null;\n getNextSibling(node: Node | null | undefined): ChildNode | null;\n getPreviousSibling(node: Node | null | undefined): ChildNode | null;\n getFirstElementChild(element: Element | null | undefined): Element | null;\n getLastElementChild(element: Element | null | undefined): Element | null;\n getNextElementSibling(element: Element | null | undefined): Element | null;\n getPreviousElementSibling(element: Element | null | undefined): Element | null;\n appendChild(parent: Node, child: Node): Node;\n insertBefore(parent: Node, child: Node, referenceChild: Node | null): Node;\n getSelection(ref: Node): Selection | null;\n}\n\nexport type GetTabster = () => TabsterCore;\nexport type GetWindow = () => Window;\n\nexport type SubscribableCallback<A, B = undefined> = (val: A, details: B) => void;\n\nexport interface Disposable {\n /** @internal */\n dispose(): void;\n}\n\nexport interface Subscribable<A, B = undefined> {\n subscribe(callback: SubscribableCallback<A, B>): void;\n /** @internal */\n subscribeFirst(callback: SubscribableCallback<A, B>): void;\n unsubscribe(callback: SubscribableCallback<A, B>): void;\n}\n\nexport interface KeyboardNavigationState extends Subscribable<boolean>, Disposable {\n isNavigatingWithKeyboard(): boolean;\n setNavigatingWithKeyboard(isNavigatingWithKeyboard: boolean): void;\n}\n\nexport interface FocusedElementDetails {\n relatedTarget?: HTMLElement;\n isFocusedProgrammatically?: boolean;\n modalizerId?: string;\n}\n\nexport interface FocusedElementState extends Subscribable<HTMLElement | undefined, FocusedElementDetails>, Disposable {\n getFocusedElement(): HTMLElement | undefined;\n getLastFocusedElement(): HTMLElement | undefined;\n focus(element: HTMLElement, noFocusedProgrammaticallyFlag?: boolean, noAccessibleCheck?: boolean): boolean;\n focusDefault(container: HTMLElement): boolean;\n /** @internal */\n getFirstOrLastTabbable(\n isFirst: boolean,\n props: Pick<FindFocusableProps, 'container' | 'ignoreAccessibility'>,\n ): HTMLElement | undefined;\n focusFirst(props: FindFirstProps): boolean;\n focusLast(props: FindFirstProps): boolean;\n resetFocus(container: HTMLElement): boolean;\n}\n\nexport interface WeakHTMLElement<D = undefined> {\n get(): HTMLElement | undefined;\n getData(): D | undefined;\n}\n\nexport interface TabsterPart<P> {\n readonly id: string;\n getElement(): HTMLElement | undefined;\n getProps(): P;\n setProps(props: P): void;\n}\n\nexport interface TabsterPartWithFindNextTabbable {\n findNextTabbable(\n current?: HTMLElement,\n reference?: HTMLElement,\n isBackward?: boolean,\n ignoreAccessibility?: boolean,\n ): NextTabbable | null;\n}\n\nexport interface TabsterPartWithAcceptElement {\n acceptElement(element: HTMLElement, state: FocusableAcceptElementState): number | undefined;\n}\n\nexport interface ObservedElementProps {\n names: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n details?: any;\n}\n\nexport interface ObservedElementDetails extends ObservedElementProps {\n accessibility?: ObservedElementAccesibility;\n}\n\nexport interface ObservedElementAccesibilities {\n Any: 0;\n Accessible: 1;\n Focusable: 2;\n}\nexport type ObservedElementAccesibility = ObservedElementAccesibilities[keyof ObservedElementAccesibilities];\nexport const ObservedElementAccesibilities: ObservedElementAccesibilities = {\n Any: 0,\n Accessible: 1,\n Focusable: 2,\n};\n\nexport interface ObservedElementAsyncRequest<T> {\n result: Promise<T>;\n cancel(): void;\n}\n\ninterface ObservedElementAPIInternal {\n /** @internal */\n onObservedElementUpdate(element: HTMLElement): void;\n}\n\nexport interface ObservedElementAPI\n extends Subscribable<HTMLElement, ObservedElementDetails>,\n Disposable,\n ObservedElementAPIInternal {\n getElement(observedName: string, accessibility?: ObservedElementAccesibility): HTMLElement | null;\n waitElement(\n observedName: string,\n timeout: number,\n accessibility?: ObservedElementAccesibility,\n ): ObservedElementAsyncRequest<HTMLElement | null>;\n requestFocus(observedName: string, timeout: number): ObservedElementAsyncRequest<boolean>;\n}\n\nexport interface CrossOriginElement {\n readonly uid: string;\n readonly ownerId: string;\n readonly id?: string;\n readonly rootId?: string;\n readonly observedName?: string;\n readonly observedDetails?: string;\n focus(noFocusedProgrammaticallyFlag?: boolean, noAccessibleCheck?: boolean): Promise<boolean>;\n}\n\nexport interface CrossOriginSentTo {\n [id: string]: true;\n}\n\nexport interface CrossOriginTransactionTypes {\n Bootstrap: 1;\n FocusElement: 2;\n State: 3;\n GetElement: 4;\n RestoreFocusInDeloser: 5;\n Ping: 6;\n}\nexport type CrossOriginTransactionType = CrossOriginTransactionTypes[keyof CrossOriginTransactionTypes];\n\nexport interface CrossOriginTransactionData<I, O> {\n transaction: string;\n type: CrossOriginTransactionType;\n isResponse: boolean;\n timestamp: number;\n owner: string;\n sentto: CrossOriginSentTo;\n timeout?: number;\n target?: string;\n beginData?: I;\n endData?: O;\n}\n\nexport type CrossOriginTransactionSend = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: CrossOriginTransactionData<any, any>,\n) => void;\n\nexport interface CrossOriginMessage {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: CrossOriginTransactionData<any, any>;\n send: CrossOriginTransactionSend;\n}\n\nexport interface CrossOriginFocusedElementState\n extends Subscribable<CrossOriginElement | undefined, FocusedElementDetails>,\n Disposable {\n focus(\n element: CrossOriginElement,\n noFocusedProgrammaticallyFlag?: boolean,\n noAccessibleCheck?: boolean,\n ): Promise<boolean>;\n focusById(\n elementId: string,\n rootId?: string,\n noFocusedProgrammaticallyFlag?: boolean,\n noAccessibleCheck?: boolean,\n ): Promise<boolean>;\n focusByObservedName(\n observedName: string,\n timeout?: number,\n rootId?: string,\n noFocusedProgrammaticallyFlag?: boolean,\n noAccessibleCheck?: boolean,\n ): Promise<boolean>;\n}\n\nexport interface CrossOriginObservedElementState\n extends Subscribable<CrossOriginElement, ObservedElementProps>,\n Disposable {\n getElement(observedName: string, accessibility?: ObservedElementAccesibility): Promise<CrossOriginElement | null>;\n waitElement(\n observedName: string,\n timeout: number,\n accessibility?: ObservedElementAccesibility,\n ): Promise<CrossOriginElement | null>;\n requestFocus(observedName: string, timeout: number): Promise<boolean>;\n}\n\nexport interface CrossOriginAPI {\n focusedElement: CrossOriginFocusedElementState;\n observedElement: CrossOriginObservedElementState;\n\n setup(sendUp?: CrossOriginTransactionSend | null): (msg: CrossOriginMessage) => void;\n isSetUp(): boolean;\n dispose(): void;\n}\n\nexport interface OutlineProps {\n areaClass: string;\n outlineClass: string;\n outlineColor: string;\n outlineWidth: number;\n zIndex: number;\n}\n\nexport interface OutlinedElementProps {\n isIgnored?: boolean;\n}\n\nexport interface OutlineAPI extends Disposable {\n setup(props?: Partial<OutlineProps>): void;\n}\n\nexport interface DeloserElementActions {\n focusDefault: () => boolean;\n focusFirst: () => boolean;\n resetFocus: () => boolean;\n clearHistory: (preserveExisting?: boolean) => void;\n setSnapshot: (index: number) => void;\n isActive: () => boolean;\n}\n\nexport interface RestoreFocusOrders {\n History: 0;\n DeloserDefault: 1;\n RootDefault: 2;\n DeloserFirst: 3;\n RootFirst: 4;\n}\nexport type RestoreFocusOrder = RestoreFocusOrders[keyof RestoreFocusOrders];\nexport const RestoreFocusOrders: RestoreFocusOrders = {\n History: 0,\n DeloserDefault: 1,\n RootDefault: 2,\n DeloserFirst: 3,\n RootFirst: 4,\n};\n\nexport interface DeloserProps {\n restoreFocusOrder?: RestoreFocusOrder;\n noSelectorCheck?: boolean;\n}\n\nexport interface Deloser extends TabsterPart<DeloserProps> {\n readonly uid: string;\n dispose(): void;\n isActive(): boolean;\n setActive(active: boolean): void;\n getActions(): DeloserElementActions;\n setSnapshot(index: number): void;\n focusFirst(): boolean;\n unshift(element: HTMLElement): void;\n focusDefault(): boolean;\n resetFocus(): boolean;\n findAvailable(): HTMLElement | null;\n clearHistory(preserveExisting?: boolean): void;\n customFocusLostHandler(element: HTMLElement): boolean;\n}\n\nexport type DeloserConstructor = (element: HTMLElement, props: DeloserProps) => Deloser;\n\ninterface DeloserInterfaceInternal {\n /** @internal */\n createDeloser(element: HTMLElement, props: DeloserProps): Deloser;\n}\n\nexport interface DeloserAPI extends DeloserInterfaceInternal, Disposable {\n getActions(element: HTMLElement): DeloserElementActions | undefined;\n pause(): void;\n resume(restore?: boolean): void;\n}\n\nexport interface FocusableProps {\n isDefault?: boolean;\n isIgnored?: boolean;\n /**\n * Do not determine an element's focusability based on aria-disabled.\n */\n ignoreAriaDisabled?: boolean;\n /**\n * Exclude element (and all subelements) from Mover navigation.\n */\n excludeFromMover?: boolean;\n /**\n * Prevents tabster from handling the keydown event\n */\n ignoreKeydown?: {\n Tab?: boolean;\n Escape?: boolean;\n Enter?: boolean;\n ArrowUp?: boolean;\n ArrowDown?: boolean;\n ArrowLeft?: boolean;\n ArrowRight?: boolean;\n PageUp?: boolean;\n PageDown?: boolean;\n Home?: boolean;\n End?: boolean;\n };\n}\n\nexport interface FocusableAcceptElementState {\n container: HTMLElement;\n modalizerUserId?: string;\n currentCtx?: TabsterContext;\n from: HTMLElement;\n fromCtx?: TabsterContext;\n isBackward?: boolean;\n found?: boolean;\n foundElement?: HTMLElement;\n foundBackward?: HTMLElement;\n rejectElementsFrom?: HTMLElement;\n uncontrolled?: HTMLElement;\n acceptCondition: (el: HTMLElement) => boolean;\n hasCustomCondition?: boolean;\n includeProgrammaticallyFocusable?: boolean;\n ignoreAccessibility?: boolean;\n cachedGrouppers: {\n [id: string]: {\n isActive: boolean | undefined;\n first?: HTMLElement | null;\n };\n };\n isFindAll?: boolean;\n /**\n * A flag that indicates that some focusable elements were skipped\n * during the search and the found element is not the one the browser\n * would normally focus if the user pressed Tab.\n */\n skippedFocusable?: boolean;\n}\n\nexport interface FindFocusableProps {\n /**\n * The container used for the search.\n */\n container: HTMLElement;\n /**\n * The elemet to start from.\n */\n currentElement?: HTMLElement;\n /**\n * See `referenceElement` of GetTabsterContextOptions for description.\n */\n referenceElement?: HTMLElement;\n /**\n * Includes elements that can be focused programmatically.\n */\n includeProgrammaticallyFocusable?: boolean;\n /**\n * Ignore accessibility check.\n */\n ignoreAccessibility?: boolean;\n /**\n * Take active modalizer into account when searching for elements\n * (the elements out of active modalizer will not be returned).\n */\n useActiveModalizer?: boolean;\n /**\n * Search withing the specified modality, null for everything outside of modalizers, string within\n * a specific id, undefined for search within the current application state.\n */\n modalizerId?: string | null;\n /**\n * If true, find previous element instead of the next one.\n */\n isBackward?: boolean;\n /**\n * @param el - element visited.\n * @returns if an element should be accepted.\n */\n acceptCondition?(el: HTMLElement): boolean;\n /**\n * A callback that will be called for every focusable element found during findAll().\n * If false is returned from this callback, the search will stop.\n */\n onElement?: FindElementCallback;\n}\n\nexport interface FindFocusableOutputProps {\n /**\n * An output parameter. Will be true after the findNext/findPrev() call if some focusable\n * elements were skipped during the search and the result element not immediately next\n * focusable after the currentElement.\n */\n outOfDOMOrder?: boolean;\n /**\n * An output parameter. Will be true if the found element is uncontrolled.\n */\n uncontrolled?: HTMLElement | null;\n}\n\nexport type FindFirstProps = Pick<\n FindFocusableProps,\n 'container' | 'modalizerId' | 'includeProgrammaticallyFocusable' | 'useActiveModalizer' | 'ignoreAccessibility'\n>;\n\nexport type FindNextProps = Pick<\n FindFocusableProps,\n | 'currentElement'\n | 'referenceElement'\n | 'container'\n | 'modalizerId'\n | 'includeProgrammaticallyFocusable'\n | 'useActiveModalizer'\n | 'ignoreAccessibility'\n>;\n\nexport type FindDefaultProps = Pick<\n FindFocusableProps,\n 'container' | 'modalizerId' | 'includeProgrammaticallyFocusable' | 'useActiveModalizer' | 'ignoreAccessibility'\n>;\n\nexport type FindAllProps = Pick<\n FindFocusableProps,\n | 'container'\n | 'modalizerId'\n | 'currentElement'\n | 'isBackward'\n | 'includeProgrammaticallyFocusable'\n | 'useActiveModalizer'\n | 'acceptCondition'\n | 'ignoreAccessibility'\n | 'onElement'\n>;\n\n/**\n * A callback that is called for every found element during search. Returning false stops search.\n */\nexport type FindElementCallback = (element: HTMLElement) => boolean;\n\nexport interface FocusableAPI extends Disposable {\n getProps(element: HTMLElement): FocusableProps;\n\n isFocusable(\n element: HTMLElement,\n includeProgrammaticallyFocusable?: boolean,\n noVisibleCheck?: boolean,\n noAccessibleCheck?: boolean,\n ): boolean;\n isVisible(element: HTMLElement): boolean;\n isAccessible(element: HTMLElement): boolean;\n // find* return null when there is no element and undefined when there is an uncontrolled area.\n findFirst(options: FindFirstProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findLast(options: FindFirstProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findNext(options: FindNextProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findPrev(options: FindNextProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findDefault(options: FindDefaultProps, out?: FindFocusableOutputProps): HTMLElement | null;\n /**\n * @returns All focusables in a given context that satisfy an given condition\n */\n findAll(options: FindAllProps): HTMLElement[];\n findElement(options: FindFocusableProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n}\n\nexport interface DummyInputManager {\n moveOut: (backwards: boolean) => void;\n moveOutWithDefaultAction: (backwards: boolean, relatedEvent: KeyboardEvent) => void;\n}\n\nexport interface Visibilities {\n Invisible: 0;\n PartiallyVisible: 1;\n Visible: 2;\n}\nexport const Visibilities: Visibilities = {\n Invisible: 0,\n PartiallyVisible: 1,\n Visible: 2,\n};\nexport type Visibility = Visibilities[keyof Visibilities];\n\nexport interface MoverElementState {\n isCurrent: boolean | undefined; // Tri-state bool. Undefined when there is no current in the container.\n visibility: Visibility;\n}\n\nexport interface MoverDirections {\n Both: 0; // Default, both left/up keys move to the previous, right/down move to the next.\n Vertical: 1; // Only up/down arrows move to the next/previous.\n Horizontal: 2; // Only left/right arrows move to the next/previous.\n Grid: 3; // Two-dimentional movement depending on the visual placement.\n GridLinear: 4; // Two-dimentional movement depending on the visual placement. Allows linear movement.\n}\n\nexport const RestorerTypes = {\n Source: 0,\n Target: 1,\n} as const;\n\nexport type RestorerType = (typeof RestorerTypes)[keyof typeof RestorerTypes];\n\nexport const MoverDirections: MoverDirections = {\n Both: 0,\n Vertical: 1,\n Horizontal: 2,\n Grid: 3,\n GridLinear: 4,\n};\nexport type MoverDirection = MoverDirections[keyof MoverDirections];\n\nexport type NextTabbable = {\n element: HTMLElement | null | undefined;\n uncontrolled?: HTMLElement | null;\n outOfDOMOrder?: boolean;\n};\n\nexport interface MoverProps {\n direction?: MoverDirection;\n memorizeCurrent?: boolean;\n tabbable?: boolean;\n /**\n * Whether to allow cyclic navigation in the mover\n * Can only be applied if navigationType is MoverKeys.Arrows\n *\n * @defaultValue false\n */\n cyclic?: boolean;\n /**\n * In case we need a rich state of the elements inside a Mover,\n * we can track it. It takes extra resourses and might affect\n * performance when a Mover has many elements inside, so make sure\n * you use this prop when it is really needed.\n */\n trackState?: boolean;\n /**\n * When set to Visibility.Visible or Visibility.PartiallyVisible,\n * uses the visibility part of the trackState prop to be able to\n * go to first/last visible element (instead of first/last focusable\n * element in DOM) when tabbing from outside of the mover.\n */\n visibilityAware?: Visibility;\n /**\n * When true, Mover will try to locate a focusable with Focusable.isDefault\n * property as a prioritized element to focus. True by default.\n */\n hasDefault?: boolean;\n /**\n * A value between 0 and 1 that specifies the tolerance allowed\n * when testing for visibility.\n *\n * @example\n * an element of height 100px has 10px that are above the viewport\n * hidden by scroll. This element is a valid visible element to focus.\n *\n * @default 0.8\n */\n visibilityTolerance?: number;\n}\n\nexport type MoverEvent = TabsterEventWithDetails<MoverElementState>;\n\nexport interface Mover extends TabsterPart<MoverProps>, TabsterPartWithFindNextTabbable, TabsterPartWithAcceptElement {\n readonly id: string;\n readonly dummyManager: DummyInputManager | undefined;\n readonly visibilityTolerance: NonNullable<MoverProps['visibilityTolerance']>;\n dispose(): void;\n setCurrent(element: HTMLElement | undefined): void;\n getCurrent(): HTMLElement | null;\n getState(element: HTMLElement): MoverElementState | undefined;\n}\n\nexport type MoverConstructor = (tabster: TabsterCore, element: HTMLElement, props: MoverProps) => Mover;\n\ninterface MoverAPIInternal {\n /** @internal */\n createMover(element: HTMLElement, props: MoverProps, sys: SysProps | undefined): Mover;\n}\n\nexport interface MoverKeys {\n ArrowUp: 1;\n ArrowDown: 2;\n ArrowLeft: 3;\n ArrowRight: 4;\n PageUp: 5;\n PageDown: 6;\n Home: 7;\n End: 8;\n}\nexport type MoverKey = MoverKeys[keyof MoverKeys];\nexport const MoverKeys: MoverKeys = {\n ArrowUp: 1,\n ArrowDown: 2,\n ArrowLeft: 3,\n ArrowRight: 4,\n PageUp: 5,\n PageDown: 6,\n Home: 7,\n End: 8,\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface MoverAPI extends MoverAPIInternal, Disposable {\n /** @internal (will likely be exposed once the API is fully stable) */\n moveFocus(fromElement: HTMLElement, key: MoverKey): HTMLElement | null;\n}\n\nexport interface GroupperTabbabilities {\n Unlimited: 0;\n Limited: 1; // The tabbability is limited to the container and explicit Enter is needed to go inside.\n LimitedTrapFocus: 2; // The focus is limited as above, plus trapped when inside.\n}\nexport const GroupperTabbabilities: GroupperTabbabilities = {\n Unlimited: 0,\n Limited: 1,\n LimitedTrapFocus: 2,\n};\nexport type GroupperTabbability = GroupperTabbabilities[keyof GroupperTabbabilities];\n\nexport interface GroupperProps {\n tabbability?: GroupperTabbability;\n delegated?: boolean; // This allows to tweak the groupper behaviour for the cases when\n // the groupper container is not focusable and groupper has Limited or LimitedTrapFocus\n // tabbability. By default, the groupper will automatically become active once the focus\n // goes to first focusable element inside the groupper during tabbing. When true, the\n // groupper will become active only after Enter is pressed on first focusable element\n // inside the groupper.\n}\n\nexport interface Groupper\n extends TabsterPart<GroupperProps>,\n TabsterPartWithFindNextTabbable,\n TabsterPartWithAcceptElement {\n readonly id: string;\n readonly dummyManager: DummyInputManager | undefined;\n dispose(): void;\n makeTabbable(isUnlimited: boolean): void;\n isActive(noIfFirstIsFocused?: boolean): boolean | undefined; // Tri-state boolean, undefined when parent is not active, false when parent is active.\n setFirst(element: HTMLElement | undefined): void;\n getFirst(orContainer: boolean): HTMLElement | undefined;\n}\n\nexport type GroupperConstructor = (tabster: TabsterCore, element: HTMLElement, props: GroupperProps) => Groupper;\n\nexport interface GroupperAPIInternal {\n /** @internal */\n createGroupper(element: HTMLElement, props: GroupperProps, sys: SysProps | undefined): Groupper;\n /** @internal */\n handleKeyPress(element: HTMLElement, event: KeyboardEvent, fromModalizer?: boolean): void;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface GroupperAPI extends GroupperAPIInternal, Disposable {\n /** @internal (will likely be exposed once the API is fully stable) */\n moveFocus(element: HTMLElement, action: GroupperMoveFocusAction): HTMLElement | null;\n}\n\nexport interface GroupperAPIInternal {\n forgetCurrentGrouppers(): void;\n}\n\nexport interface ModalizerProps {\n id: string;\n isOthersAccessible?: boolean;\n isAlwaysAccessible?: boolean;\n isNoFocusFirst?: boolean;\n isNoFocusDefault?: boolean;\n /** A focus trap variant, keeps focus inside the modal when tabbing */\n isTrapped?: boolean;\n}\n\nexport type ModalizerEventName =\n | typeof ModalizerActiveEventName\n | typeof ModalizerInactiveEventName\n | typeof ModalizerBeforeFocusOutEventName\n | typeof ModalizerFocusInEventName\n | typeof ModalizerFocusOutEventName;\n\nexport type ModalizerEventDetails = {\n id: string;\n element: HTMLElement;\n eventName: ModalizerEventName;\n};\n\nexport type ModalizerEvent = TabsterEventWithDetails<ModalizerEventDetails>;\n\nexport interface Modalizer extends TabsterPart<ModalizerProps>, TabsterPartWithFindNextTabbable {\n readonly userId: string;\n readonly dummyManager: DummyInputManager | undefined;\n /**\n * @returns - Whether the element is inside the modalizer\n */\n contains(element: HTMLElement): boolean;\n dispose(): void;\n isActive(): boolean;\n makeActive(isActive: boolean): void;\n focused(noIncrement?: boolean): number;\n triggerFocusEvent(eventName: ModalizerEventName, allElements: boolean): boolean;\n}\n\nexport type ModalizerConstructor = (tabster: TabsterCore, element: HTMLElement, props: ModalizerProps) => Modalizer;\n\nexport interface RootProps {\n restoreFocusOrder?: RestoreFocusOrder;\n}\n\nexport interface Root extends TabsterPart<RootProps> {\n /**@internal*/\n addDummyInputs(): void;\n\n readonly uid: string;\n dispose(): void;\n moveOutWithDefaultAction(backwards: boolean, relatedEvent: KeyboardEvent): void;\n}\n\nexport type RootConstructor = (tabster: TabsterCore, element: HTMLElement, props: RootProps) => Root;\n\nexport interface SysDummyInputsPositions {\n Auto: 0; // Tabster will place dummy inputs depending on the container tag name and on the default behaviour.\n Inside: 1; // Tabster will always place dummy inputs inside the container.\n Outside: 2; // Tabster will always place dummy inputs outside of the container.\n}\nexport const SysDummyInputsPositions: SysDummyInputsPositions = {\n Auto: 0,\n Inside: 1,\n Outside: 2,\n};\nexport type SysDummyInputsPosition = SysDummyInputsPositions[keyof SysDummyInputsPositions];\n/**\n * Ability to fine-tune Tabster internal behaviour in rare cases of need.\n * Normally, should not be used. A deep understanding of the intention and the effect\n * is required.\n */\nexport interface SysProps {\n /**\n * Force dummy input position outside or inside of the element.\n * By default (when undefined), the position is determined dynamically\n * (for example inside for <li> elements and outside for <table> elements,\n * plus a default Groupper/Mover/Modalizer implementation position).\n * Setting to true will force the dummy inputs to be always outside of the element,\n * setting to false will force the dummy inputs to be always inside.\n */\n dummyInputsPosition?: SysDummyInputsPosition;\n}\n\nexport interface GetTabsterContextOptions {\n /**\n * Should visit **all** element ancestors to verify if `dir='rtl'` is set\n */\n checkRtl?: boolean;\n /**\n * The element to start computing the context from. Useful when dealing\n * with nested structures. For example, if we have an element inside a groupper\n * inside another groupper, the `groupper` prop in this element's contexts will\n * be the inner groupper, but when we pass the inner groupper's parent element\n * as `referenceElement`, the context groupper will be the outer one. Having\n * this option simplifies searching for the next tabbable element in the\n * environment of nested movers and grouppers.\n */\n referenceElement?: HTMLElement;\n}\n\nexport type TabsterContextMoverGroupper = { isMover: true; mover: Mover } | { isMover: false; groupper: Groupper };\n\nexport interface TabsterContext {\n root: Root;\n modalizer?: Modalizer;\n groupper?: Groupper;\n mover?: Mover;\n groupperBeforeMover?: boolean;\n modalizerInGroupper?: Groupper;\n /**\n * Whether `dir='rtl'` is set on an ancestor\n */\n rtl?: boolean;\n excludedFromMover?: boolean;\n uncontrolled?: HTMLElement | null;\n ignoreKeydown: (e: KeyboardEvent) => boolean;\n}\n\nexport interface RootFocusEventDetails {\n element: HTMLElement;\n}\n\ninterface RootAPIInternal {\n /**@internal*/\n createRoot(element: HTMLElement, props: RootProps, sys: SysProps | undefined): Root;\n /**@internal*/\n onRoot(root: Root, removed?: boolean): void;\n /**@internal*/\n addDummyInputs(): void;\n}\n\nexport interface RootAPI extends Disposable, RootAPIInternal {\n eventTarget: EventTarget;\n}\n\nexport interface UncontrolledAPI {\n isUncontrolledCompletely(element: HTMLElement, completely: boolean): boolean;\n}\n\ninterface ModalizerAPIInternal extends TabsterPartWithAcceptElement {\n /** @internal */\n activeId: string | undefined; // currently active Modalizer user id.\n /** @internal */\n currentIsOthersAccessible: boolean | undefined; // isOthersAccessible value of the currently active Modalizer.\n /** @internal */\n activeElements: WeakHTMLElement<HTMLElement>[];\n /** @internal */\n createModalizer(element: HTMLElement, props: ModalizerProps, sys: SysProps | undefined): Modalizer;\n /**\n * Sets active modalizers.\n * When active, everything outside of the modalizers with the specific user\n * defined id gets `aria-hidden`.\n *\n * @param userId - user defined identifier or undefined (if nothing is modal).\n */\n /** @internal */\n setActive(modalizer: Modalizer | undefined): void;\n /** @internal */\n hiddenUpdate(): void;\n /** @internal */\n isAugmented(element: HTMLElement): boolean;\n}\n\nexport interface ModalizerAPI extends ModalizerAPIInternal, Disposable {\n /**\n * Activates a Modalizer and focuses the first or default element within\n *\n * @param elementFromModalizer - An element that belongs to a Modalizer\n * @param noFocusFirst - Do not focus on the first element in the Modalizer\n * @param noFocusDefault - Do not focus the default element in the Modalizre\n */\n focus(elementFromModalizer: HTMLElement, noFocusFirst?: boolean, noFocusDefault?: boolean): boolean;\n}\n\ninterface RestorerAPIInternal {\n /** @internal */\n createRestorer(element: HTMLElement, props: RestorerProps): Restorer;\n}\n\nexport interface RestorerAPI extends RestorerAPIInternal, Disposable {}\n\nexport interface Restorer extends Disposable, TabsterPart<RestorerProps> {}\n/**\n * A signature for the accessibleCheck callback from getModalizer().\n * It is called when active Modalizer sets aria-hidden on elements outsidef of it.\n *\n * @param element - The element that is about to receive aria-hidden.\n * @param activeModalizerElements - The container elements of the active modalizer.\n * @returns true if the element should remain accessible and should not receive\n * aria-hidden.\n */\nexport type ModalizerElementAccessibleCheck = (\n element: HTMLElement,\n activeModalizerElements?: HTMLElement[],\n) => boolean;\n\nexport interface UncontrolledProps {\n // Normally, even uncontrolled areas should not be completely uncontrolled\n // to be able to interact with the rest of the application properly.\n // For example, if an uncontrolled area implements something like\n // roving tabindex, it should be uncontrolled inside the area, but it\n // still should be able to be an organic part of the application.\n // However, in some cases, third party component might want to be able\n // to gain full control of the area, for example, if it implements\n // some custom trap focus logic.\n // `completely` indicates that uncontrolled area must gain full control over\n // Tab handling. If not set, Tabster might still handle Tab in the\n // uncontrolled area, when, for example, there is an inactive Modalizer\n // (that needs to be skipped) after the last focusable element of the\n // uncontrolled area.\n // WARNING: Use with caution, as it might break the normal keyboard navigation\n // between the uncontrolled area and the rest of the application.\n completely?: boolean;\n}\n\nexport interface DeloserOnElement {\n deloser: Deloser;\n}\n\nexport interface RootOnElement {\n root: Root;\n}\n\nexport interface ModalizerOnElement {\n modalizer: Modalizer;\n}\n\nexport interface RestorerOnElement {\n restorer: Restorer;\n}\n\nexport interface FocusableOnElement {\n focusable: FocusableProps;\n}\n\nexport interface MoverOnElement {\n mover: Mover;\n}\n\nexport interface GroupperOnElement {\n groupper: Groupper;\n}\n\nexport interface UncontrolledOnElement {\n uncontrolled: UncontrolledProps;\n}\n\nexport interface ObservedOnElement {\n observed: ObservedElementProps;\n}\n\nexport interface OutlineOnElement {\n outline: OutlinedElementProps;\n}\n\nexport interface SysOnElement {\n sys: SysProps;\n}\n\nexport interface RestorerProps {\n type: RestorerType;\n}\n\nexport type TabsterAttributeProps = Partial<{\n deloser: DeloserProps;\n root: RootProps;\n uncontrolled: UncontrolledProps;\n modalizer: ModalizerProps;\n focusable: FocusableProps;\n groupper: GroupperProps;\n mover: MoverProps;\n observed: ObservedElementProps;\n outline: OutlinedElementProps;\n sys: SysProps;\n restorer: RestorerProps;\n}>;\n\nexport interface TabsterAttributeOnElement {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n string: string;\n object: TabsterAttributeProps;\n}\n\nexport interface TabsterAugmentedAttributes {\n [name: string]: string | null;\n}\n\nexport type TabsterOnElement = Partial<\n RootOnElement &\n DeloserOnElement &\n ModalizerOnElement &\n FocusableOnElement &\n MoverOnElement &\n GroupperOnElement &\n ObservedOnElement &\n OutlineOnElement &\n UncontrolledOnElement &\n SysOnElement &\n RestorerOnElement\n>;\n\nexport interface OutlineElements {\n container: HTMLDivElement;\n left: HTMLDivElement;\n top: HTMLDivElement;\n right: HTMLDivElement;\n bottom: HTMLDivElement;\n}\n\nexport interface TabsterElementStorageEntry {\n tabster?: TabsterOnElement;\n attr?: TabsterAttributeOnElement;\n aug?: TabsterAugmentedAttributes;\n}\n\nexport interface TabsterElementStorage {\n [uid: string]: TabsterElementStorageEntry;\n}\n\nexport type DisposeFunc = () => void;\n\nexport interface InternalAPI {\n stopObserver(): void;\n resumeObserver(syncState: boolean): void;\n}\n\nexport interface DummyInputObserver {\n add(dummy: HTMLElement, callback: () => void): void;\n remove(dummy: HTMLElement): void;\n dispose(): void;\n domChanged?(parent: HTMLElement): void;\n updatePositions(\n compute: (scrollTopLeftCache: Map<HTMLElement, { scrollTop: number; scrollLeft: number } | null>) => () => void,\n ): void;\n}\n\ninterface TabsterCoreInternal {\n /** @internal */\n groupper?: GroupperAPI;\n /** @internal */\n mover?: MoverAPI;\n /** @internal */\n outline?: OutlineAPI;\n /** @internal */\n deloser?: DeloserAPI;\n /** @internal */\n modalizer?: ModalizerAPI;\n /** @internal */\n observedElement?: ObservedElementAPI;\n /** @internal */\n crossOrigin?: CrossOriginAPI;\n /** @internal */\n internal: InternalAPI;\n /** @internal */\n restorer?: RestorerAPI;\n\n /** @internal */\n _dummyObserver: DummyInputObserver;\n\n // The version of the tabster package this instance is on\n /** @internal */\n _version: string;\n\n // No operation flag for the debugging purposes\n /** @internal */\n _noop: boolean;\n\n /** @internal */\n storageEntry(element: HTMLElement, addremove?: boolean): TabsterElementStorageEntry | undefined;\n /** @internal */\n getWindow: GetWindow;\n\n /** @internal */\n createTabster(noRefCount?: boolean, props?: TabsterCoreProps): Tabster;\n /** @internal */\n disposeTabster(wrapper: Tabster, allInstances?: boolean): void;\n /** @internal */\n forceCleanup(): void;\n\n /** @internal */\n queueInit(callback: () => void): void;\n /** @internal */\n drainInitQueue(): void;\n /** @internal */\n getParent: (el: Node) => Node | null;\n}\n\nexport interface Tabster {\n keyboardNavigation: KeyboardNavigationState;\n focusedElement: FocusedElementState;\n focusable: FocusableAPI;\n root: RootAPI;\n uncontrolled: UncontrolledAPI;\n\n /** @internal */\n core: TabsterCore;\n}\n\nexport interface TabsterCore\n extends Pick<TabsterCoreProps, 'controlTab' | 'rootDummyInputs'>,\n Disposable,\n TabsterCoreInternal,\n Omit<Tabster, 'core'> {}\n\nexport interface TabsterCompat {\n attributeTransform?: <P>(old: P) => TabsterAttributeProps;\n}\n"],"names":["TabsterAttributeName","TabsterDummyInputAttributeName","DeloserEventName","ModalizerActiveEventName","ModalizerInactiveEventName","ModalizerFocusInEventName","ModalizerFocusOutEventName","ModalizerBeforeFocusOutEventName","MoverEventName","FocusInEventName","FocusOutEventName","MoveFocusEventName","MoverMoveFocusEventName","GroupperMoveFocusEventName","FocusableSelector","join","GroupperMoveFocusActions","Enter","Escape","ObservedElementAccesibilities","Any","Accessible","Focusable","RestoreFocusOrders","History","DeloserDefault","RootDefault","DeloserFirst","RootFirst","Visibilities","Invisible","PartiallyVisible","Visible","RestorerTypes","Source","Target","MoverDirections","Both","Vertical","Horizontal","Grid","GridLinear","MoverKeys","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","SysDummyInputsPositions","Auto","Inside","Outside"],"mappings":"AAAA;;;CAGC,GAED;;;;;;;;;;;CAWC,GAED,OAAO,MAAMA,uBAAuB,eAAe;AACnD,OAAO,MAAMC,iCAAiC,qBAAqB;AACnE,OAAO,MAAMC,mBAAmB,kBAAkB;AAClD,OAAO,MAAMC,2BAA2B,2BAA2B;AACnE,OAAO,MAAMC,6BAA6B,6BAA6B;AACvE,OAAO,MAAMC,4BAA4B,4BAA4B;AACrE,OAAO,MAAMC,6BAA6B,6BAA6B;AACvE,OAAO,MAAMC,mCAAmC,mCAAmC;AACnF,OAAO,MAAMC,iBAAiB,gBAAgB;AAC9C,OAAO,MAAMC,mBAAmB,kBAAkB;AAClD,OAAO,MAAMC,oBAAoB,mBAAmB;AAEpD,0EAA0E;AAC1E,sEAAsE;AACtE,qBAAqB;AACrB,OAAO,MAAMC,qBAAqB,oBAAoB;AAEtD,0EAA0E;AAC1E,sBAAsB;AACtB,OAAO,MAAMC,0BAA0B,0BAA0B;AACjE,2EAA2E;AAC3E,sBAAsB;AACtB,OAAO,MAAMC,6BAA6B,6BAA6B;AAEvE,OAAO,MAAMC,oBAAoB;IAC/B;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAACC,IAAI,CAAC,MAAM;AAUb,OAAO,MAAMC,2BAAqD;IAChEC,OAAO;IACPC,QAAQ;AACV,EAAE;AAwKF,OAAO,MAAMC,gCAA+D;IAC1EC,KAAK;IACLC,YAAY;IACZC,WAAW;AACb,EAAE;AAsJF,OAAO,MAAMC,qBAAyC;IACpDC,SAAS;IACTC,gBAAgB;IAChBC,aAAa;IACbC,cAAc;IACdC,WAAW;AACb,EAAE;AAqOF,OAAO,MAAMC,eAA6B;IACxCC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;AACX,EAAE;AAgBF,OAAO,MAAMC,gBAAgB;IAC3BC,QAAQ;IACRC,QAAQ;AACV,EAAW;AAIX,OAAO,MAAMC,kBAAmC;IAC9CC,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,MAAM;IACNC,YAAY;AACd,EAAE;AAkFF,OAAO,MAAMC,YAAuB;IAClCC,SAAS;IACTC,WAAW;IACXC,WAAW;IACXC,YAAY;IACZC,QAAQ;IACRC,UAAU;IACVC,MAAM;IACNC,KAAK;AACP,EAAE;AAaF,OAAO,MAAMC,wBAA+C;IAC1DC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB,EAAE;AA0GF,OAAO,MAAMC,0BAAmD;IAC9DC,MAAM;IACNC,QAAQ;IACRC,SAAS;AACX,EAAE"}
1
+ {"version":3,"sources":["tabster-types-6.0.1-do-not-use.ts"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n *\n * Do not use anything from this file. It is a snapshot of the older Tabster typings exposed by a mistake.\n * The exposed typings should have been removed, but we don't do it in minor versions to avoid breaking changes.\n * Everything reexported from this file as react-tabster/TabsterTypes is marked as deprecated and shouldn't\n * be used anywhre.\n *\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n * WARNING! ATTENTION! WARNING! ATTENTION! WARNING! ATTENTION!\n */\n\nexport const TabsterAttributeName = 'data-tabster';\nexport const TabsterDummyInputAttributeName = 'data-tabster-dummy';\nexport const DeloserEventName = 'tabster:deloser';\nexport const ModalizerActiveEventName = 'tabster:modalizer:active';\nexport const ModalizerInactiveEventName = 'tabster:modalizer:inactive';\nexport const ModalizerFocusInEventName = 'tabster:modalizer:focusin';\nexport const ModalizerFocusOutEventName = 'tabster:modalizer:focusout';\nexport const ModalizerBeforeFocusOutEventName = 'tabster:modalizer:beforefocusout';\nexport const MoverEventName = 'tabster:mover';\nexport const FocusInEventName = 'tabster:focusin';\nexport const FocusOutEventName = 'tabster:focusout';\n\n// Event to be triggered when Tabster wants to move focus as the result of\n// keyboard event. This allows to preventDefault() if you want to have\n// some custom logic.\nexport const MoveFocusEventName = 'tabster:movefocus';\n\n// Event that can be triggered by the application to programmatically move\n// focus inside Mover.\nexport const MoverMoveFocusEventName = 'tabster:mover:movefocus';\n// Event that can be triggered by the application to programmatically enter\n// or escape Groupper.\nexport const GroupperMoveFocusEventName = 'tabster:groupper:movefocus';\n\nexport const FocusableSelector = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '*[tabindex]',\n '*[contenteditable]',\n].join(', ');\n\n// Trigger move focus event on a Mover element.\nexport type MoverMoveFocusEvent = CustomEvent<{ key: MoverKey } | undefined>;\n\nexport interface GroupperMoveFocusActions {\n Enter: 1;\n Escape: 2;\n}\nexport type GroupperMoveFocusAction = GroupperMoveFocusActions[keyof GroupperMoveFocusActions];\nexport const GroupperMoveFocusActions: GroupperMoveFocusActions = {\n Enter: 1,\n Escape: 2,\n};\n\n// Enter or escape Groupper. Enter when `enter` is true, escape when `enter` is false.\nexport type GroupperMoveFocusEvent = CustomEvent<{ action: GroupperMoveFocusAction } | undefined>;\n\nexport type TabsterEventWithDetails<D> = CustomEvent<D | undefined>;\n\nexport interface TabsterMoveFocusEventDetails {\n by: 'mover' | 'groupper' | 'modalizer' | 'root';\n owner: HTMLElement; // Mover, Groupper, Modalizer or Root, the initiator.\n next: HTMLElement | null; // Next element to focus or null if Tabster wants to go outside of Root (i.e. to the address bar of the browser).\n relatedEvent?: KeyboardEvent; // The original keyboard event that triggered the move.\n}\n\nexport type TabsterMoveFocusEvent = TabsterEventWithDetails<TabsterMoveFocusEventDetails>;\n\nexport interface TabsterDOMAttribute {\n [TabsterAttributeName]: string | undefined;\n}\n\nexport interface TabsterCoreProps {\n autoRoot?: RootProps;\n /**\n * Allows all tab key presses under the tabster root to be controlled by tabster\n * @default true\n */\n controlTab?: boolean;\n /**\n * When controlTab is false, Root doesn't have dummy inputs by default.\n * This option allows to enable dummy inputs on Root.\n */\n rootDummyInputs?: boolean;\n /**\n * A callback that will be called for the uncontrolled areas when Tabster wants\n * to know is the uncontrolled element wants complete control (for example it\n * is trapping focus) and Tabster should not interfere with handling Tab.\n * If the callback returns undefined, then the default behaviour is to return\n * the uncontrolled.completely value from the element. If the callback returns\n * non-undefined value, the callback's value will dominate the element's\n * uncontrolled.completely value.\n */\n checkUncontrolledCompletely?: (\n element: HTMLElement,\n completely: boolean, // A uncontrolled.completely value from the element.\n ) => boolean | undefined;\n /**\n * @deprecated use checkUncontrolledCompletely.\n */\n checkUncontrolledTrappingFocus?: (element: HTMLElement) => boolean;\n /**\n * Custom getter for parent elements. Defaults to the default .parentElement call\n * Currently only used to detect tabster contexts\n */\n getParent?(el: Node): Node | null;\n /**\n * Ability to redefine all DOM API calls used by Tabster. For example, for\n * ShadowDOM support.\n */\n DOMAPI?: Partial<DOMAPI>;\n}\n\nexport interface DOMAPI {\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n createMutationObserver: (callback: MutationCallback) => MutationObserver;\n createTreeWalker(doc: Document, root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker;\n getParentNode(node: Node | null | undefined): ParentNode | null;\n getParentElement(element: HTMLElement | null | undefined): HTMLElement | null;\n nodeContains(parent: Node | null | undefined, child: Node | null | undefined): boolean;\n getActiveElement(doc: Document): Element | null;\n querySelector(element: ParentNode, selector: string): Element | null;\n querySelectorAll(element: ParentNode, selector: string): Element[];\n getElementById(doc: Document, id: string): HTMLElement | null;\n getFirstChild(node: Node | null | undefined): ChildNode | null;\n getLastChild(node: Node | null | undefined): ChildNode | null;\n getNextSibling(node: Node | null | undefined): ChildNode | null;\n getPreviousSibling(node: Node | null | undefined): ChildNode | null;\n getFirstElementChild(element: Element | null | undefined): Element | null;\n getLastElementChild(element: Element | null | undefined): Element | null;\n getNextElementSibling(element: Element | null | undefined): Element | null;\n getPreviousElementSibling(element: Element | null | undefined): Element | null;\n appendChild(parent: Node, child: Node): Node;\n insertBefore(parent: Node, child: Node, referenceChild: Node | null): Node;\n getSelection(ref: Node): Selection | null;\n}\n\nexport type GetTabster = () => TabsterCore;\nexport type GetWindow = () => Window;\n\nexport type SubscribableCallback<A, B = undefined> = (val: A, details: B) => void;\n\nexport interface Disposable {\n /** @internal */\n dispose(): void;\n}\n\nexport interface Subscribable<A, B = undefined> {\n subscribe(callback: SubscribableCallback<A, B>): void;\n /** @internal */\n subscribeFirst(callback: SubscribableCallback<A, B>): void;\n unsubscribe(callback: SubscribableCallback<A, B>): void;\n}\n\nexport interface KeyboardNavigationState extends Subscribable<boolean>, Disposable {\n isNavigatingWithKeyboard(): boolean;\n setNavigatingWithKeyboard(isNavigatingWithKeyboard: boolean): void;\n}\n\nexport interface FocusedElementDetails {\n relatedTarget?: HTMLElement;\n isFocusedProgrammatically?: boolean;\n modalizerId?: string;\n}\n\nexport interface FocusedElementState extends Subscribable<HTMLElement | undefined, FocusedElementDetails>, Disposable {\n getFocusedElement(): HTMLElement | undefined;\n getLastFocusedElement(): HTMLElement | undefined;\n focus(element: HTMLElement, noFocusedProgrammaticallyFlag?: boolean, noAccessibleCheck?: boolean): boolean;\n focusDefault(container: HTMLElement): boolean;\n /** @internal */\n getFirstOrLastTabbable(\n isFirst: boolean,\n props: Pick<FindFocusableProps, 'container' | 'ignoreAccessibility'>,\n ): HTMLElement | undefined;\n focusFirst(props: FindFirstProps): boolean;\n focusLast(props: FindFirstProps): boolean;\n resetFocus(container: HTMLElement): boolean;\n}\n\nexport interface WeakHTMLElement<D = undefined> {\n get(): HTMLElement | undefined;\n getData(): D | undefined;\n}\n\nexport interface TabsterPart<P> {\n readonly id: string;\n getElement(): HTMLElement | undefined;\n getProps(): P;\n setProps(props: P): void;\n}\n\nexport interface TabsterPartWithFindNextTabbable {\n findNextTabbable(\n current?: HTMLElement,\n reference?: HTMLElement,\n isBackward?: boolean,\n ignoreAccessibility?: boolean,\n ): NextTabbable | null;\n}\n\nexport interface TabsterPartWithAcceptElement {\n acceptElement(element: HTMLElement, state: FocusableAcceptElementState): number | undefined;\n}\n\nexport interface ObservedElementProps {\n names: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n details?: any;\n}\n\nexport interface ObservedElementDetails extends ObservedElementProps {\n accessibility?: ObservedElementAccesibility;\n}\n\nexport interface ObservedElementAccesibilities {\n Any: 0;\n Accessible: 1;\n Focusable: 2;\n}\nexport type ObservedElementAccesibility = ObservedElementAccesibilities[keyof ObservedElementAccesibilities];\nexport const ObservedElementAccesibilities: ObservedElementAccesibilities = {\n Any: 0,\n Accessible: 1,\n Focusable: 2,\n};\n\nexport interface ObservedElementAsyncRequest<T> {\n result: Promise<T>;\n cancel(): void;\n}\n\ninterface ObservedElementAPIInternal {\n /** @internal */\n onObservedElementUpdate(element: HTMLElement): void;\n}\n\nexport interface ObservedElementAPI\n extends Subscribable<HTMLElement, ObservedElementDetails>,\n Disposable,\n ObservedElementAPIInternal {\n getElement(observedName: string, accessibility?: ObservedElementAccesibility): HTMLElement | null;\n waitElement(\n observedName: string,\n timeout: number,\n accessibility?: ObservedElementAccesibility,\n ): ObservedElementAsyncRequest<HTMLElement | null>;\n requestFocus(observedName: string, timeout: number): ObservedElementAsyncRequest<boolean>;\n}\n\nexport interface CrossOriginElement {\n readonly uid: string;\n readonly ownerId: string;\n readonly id?: string;\n readonly rootId?: string;\n readonly observedName?: string;\n readonly observedDetails?: string;\n focus(noFocusedProgrammaticallyFlag?: boolean, noAccessibleCheck?: boolean): Promise<boolean>;\n}\n\nexport interface CrossOriginSentTo {\n [id: string]: true;\n}\n\nexport interface CrossOriginTransactionTypes {\n Bootstrap: 1;\n FocusElement: 2;\n State: 3;\n GetElement: 4;\n RestoreFocusInDeloser: 5;\n Ping: 6;\n}\nexport type CrossOriginTransactionType = CrossOriginTransactionTypes[keyof CrossOriginTransactionTypes];\n\nexport interface CrossOriginTransactionData<I, O> {\n transaction: string;\n type: CrossOriginTransactionType;\n isResponse: boolean;\n timestamp: number;\n owner: string;\n sentto: CrossOriginSentTo;\n timeout?: number;\n target?: string;\n beginData?: I;\n endData?: O;\n}\n\nexport type CrossOriginTransactionSend = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: CrossOriginTransactionData<any, any>,\n) => void;\n\nexport interface CrossOriginMessage {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data: CrossOriginTransactionData<any, any>;\n send: CrossOriginTransactionSend;\n}\n\nexport interface CrossOriginFocusedElementState\n extends Subscribable<CrossOriginElement | undefined, FocusedElementDetails>,\n Disposable {\n focus(\n element: CrossOriginElement,\n noFocusedProgrammaticallyFlag?: boolean,\n noAccessibleCheck?: boolean,\n ): Promise<boolean>;\n focusById(\n elementId: string,\n rootId?: string,\n noFocusedProgrammaticallyFlag?: boolean,\n noAccessibleCheck?: boolean,\n ): Promise<boolean>;\n focusByObservedName(\n observedName: string,\n timeout?: number,\n rootId?: string,\n noFocusedProgrammaticallyFlag?: boolean,\n noAccessibleCheck?: boolean,\n ): Promise<boolean>;\n}\n\nexport interface CrossOriginObservedElementState\n extends Subscribable<CrossOriginElement, ObservedElementProps>,\n Disposable {\n getElement(observedName: string, accessibility?: ObservedElementAccesibility): Promise<CrossOriginElement | null>;\n waitElement(\n observedName: string,\n timeout: number,\n accessibility?: ObservedElementAccesibility,\n ): Promise<CrossOriginElement | null>;\n requestFocus(observedName: string, timeout: number): Promise<boolean>;\n}\n\nexport interface CrossOriginAPI {\n focusedElement: CrossOriginFocusedElementState;\n observedElement: CrossOriginObservedElementState;\n\n setup(sendUp?: CrossOriginTransactionSend | null): (msg: CrossOriginMessage) => void;\n isSetUp(): boolean;\n dispose(): void;\n}\n\nexport interface OutlineProps {\n areaClass: string;\n outlineClass: string;\n outlineColor: string;\n outlineWidth: number;\n zIndex: number;\n}\n\nexport interface OutlinedElementProps {\n isIgnored?: boolean;\n}\n\nexport interface OutlineAPI extends Disposable {\n setup(props?: Partial<OutlineProps>): void;\n}\n\nexport interface DeloserElementActions {\n focusDefault: () => boolean;\n focusFirst: () => boolean;\n resetFocus: () => boolean;\n clearHistory: (preserveExisting?: boolean) => void;\n setSnapshot: (index: number) => void;\n isActive: () => boolean;\n}\n\nexport interface RestoreFocusOrders {\n History: 0;\n DeloserDefault: 1;\n RootDefault: 2;\n DeloserFirst: 3;\n RootFirst: 4;\n}\nexport type RestoreFocusOrder = RestoreFocusOrders[keyof RestoreFocusOrders];\nexport const RestoreFocusOrders: RestoreFocusOrders = {\n History: 0,\n DeloserDefault: 1,\n RootDefault: 2,\n DeloserFirst: 3,\n RootFirst: 4,\n};\n\nexport interface DeloserProps {\n restoreFocusOrder?: RestoreFocusOrder;\n noSelectorCheck?: boolean;\n}\n\nexport interface Deloser extends TabsterPart<DeloserProps> {\n readonly uid: string;\n dispose(): void;\n isActive(): boolean;\n setActive(active: boolean): void;\n getActions(): DeloserElementActions;\n setSnapshot(index: number): void;\n focusFirst(): boolean;\n unshift(element: HTMLElement): void;\n focusDefault(): boolean;\n resetFocus(): boolean;\n findAvailable(): HTMLElement | null;\n clearHistory(preserveExisting?: boolean): void;\n customFocusLostHandler(element: HTMLElement): boolean;\n}\n\nexport type DeloserConstructor = (element: HTMLElement, props: DeloserProps) => Deloser;\n\ninterface DeloserInterfaceInternal {\n /** @internal */\n createDeloser(element: HTMLElement, props: DeloserProps): Deloser;\n}\n\nexport interface DeloserAPI extends DeloserInterfaceInternal, Disposable {\n getActions(element: HTMLElement): DeloserElementActions | undefined;\n pause(): void;\n resume(restore?: boolean): void;\n}\n\nexport interface FocusableProps {\n isDefault?: boolean;\n isIgnored?: boolean;\n /**\n * Do not determine an element's focusability based on aria-disabled.\n */\n ignoreAriaDisabled?: boolean;\n /**\n * Exclude element (and all subelements) from Mover navigation.\n */\n excludeFromMover?: boolean;\n /**\n * Prevents tabster from handling the keydown event\n */\n ignoreKeydown?: {\n Tab?: boolean;\n Escape?: boolean;\n Enter?: boolean;\n ArrowUp?: boolean;\n ArrowDown?: boolean;\n ArrowLeft?: boolean;\n ArrowRight?: boolean;\n PageUp?: boolean;\n PageDown?: boolean;\n Home?: boolean;\n End?: boolean;\n };\n}\n\nexport interface FocusableAcceptElementState {\n container: HTMLElement;\n modalizerUserId?: string;\n currentCtx?: TabsterContext;\n from: HTMLElement;\n fromCtx?: TabsterContext;\n isBackward?: boolean;\n found?: boolean;\n foundElement?: HTMLElement;\n foundBackward?: HTMLElement;\n rejectElementsFrom?: HTMLElement;\n uncontrolled?: HTMLElement;\n acceptCondition: (el: HTMLElement) => boolean;\n hasCustomCondition?: boolean;\n includeProgrammaticallyFocusable?: boolean;\n ignoreAccessibility?: boolean;\n cachedGrouppers: {\n [id: string]: {\n isActive: boolean | undefined;\n first?: HTMLElement | null;\n };\n };\n isFindAll?: boolean;\n /**\n * A flag that indicates that some focusable elements were skipped\n * during the search and the found element is not the one the browser\n * would normally focus if the user pressed Tab.\n */\n skippedFocusable?: boolean;\n}\n\nexport interface FindFocusableProps {\n /**\n * The container used for the search.\n */\n container: HTMLElement;\n /**\n * The elemet to start from.\n */\n currentElement?: HTMLElement;\n /**\n * See `referenceElement` of GetTabsterContextOptions for description.\n */\n referenceElement?: HTMLElement;\n /**\n * Includes elements that can be focused programmatically.\n */\n includeProgrammaticallyFocusable?: boolean;\n /**\n * Ignore accessibility check.\n */\n ignoreAccessibility?: boolean;\n /**\n * Take active modalizer into account when searching for elements\n * (the elements out of active modalizer will not be returned).\n */\n useActiveModalizer?: boolean;\n /**\n * Search withing the specified modality, null for everything outside of modalizers, string within\n * a specific id, undefined for search within the current application state.\n */\n modalizerId?: string | null;\n /**\n * If true, find previous element instead of the next one.\n */\n isBackward?: boolean;\n /**\n * @param el - element visited.\n * @returns if an element should be accepted.\n */\n acceptCondition?(el: HTMLElement): boolean;\n /**\n * A callback that will be called for every focusable element found during findAll().\n * If false is returned from this callback, the search will stop.\n */\n onElement?: FindElementCallback;\n}\n\nexport interface FindFocusableOutputProps {\n /**\n * An output parameter. Will be true after the findNext/findPrev() call if some focusable\n * elements were skipped during the search and the result element not immediately next\n * focusable after the currentElement.\n */\n outOfDOMOrder?: boolean;\n /**\n * An output parameter. Will be true if the found element is uncontrolled.\n */\n uncontrolled?: HTMLElement | null;\n}\n\nexport type FindFirstProps = Pick<\n FindFocusableProps,\n 'container' | 'modalizerId' | 'includeProgrammaticallyFocusable' | 'useActiveModalizer' | 'ignoreAccessibility'\n>;\n\nexport type FindNextProps = Pick<\n FindFocusableProps,\n | 'currentElement'\n | 'referenceElement'\n | 'container'\n | 'modalizerId'\n | 'includeProgrammaticallyFocusable'\n | 'useActiveModalizer'\n | 'ignoreAccessibility'\n>;\n\nexport type FindDefaultProps = Pick<\n FindFocusableProps,\n 'container' | 'modalizerId' | 'includeProgrammaticallyFocusable' | 'useActiveModalizer' | 'ignoreAccessibility'\n>;\n\nexport type FindAllProps = Pick<\n FindFocusableProps,\n | 'container'\n | 'modalizerId'\n | 'currentElement'\n | 'isBackward'\n | 'includeProgrammaticallyFocusable'\n | 'useActiveModalizer'\n | 'acceptCondition'\n | 'ignoreAccessibility'\n | 'onElement'\n>;\n\n/**\n * A callback that is called for every found element during search. Returning false stops search.\n */\nexport type FindElementCallback = (element: HTMLElement) => boolean;\n\nexport interface FocusableAPI extends Disposable {\n getProps(element: HTMLElement): FocusableProps;\n\n isFocusable(\n element: HTMLElement,\n includeProgrammaticallyFocusable?: boolean,\n noVisibleCheck?: boolean,\n noAccessibleCheck?: boolean,\n ): boolean;\n isVisible(element: HTMLElement): boolean;\n isAccessible(element: HTMLElement): boolean;\n // find* return null when there is no element and undefined when there is an uncontrolled area.\n findFirst(options: FindFirstProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findLast(options: FindFirstProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findNext(options: FindNextProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findPrev(options: FindNextProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n findDefault(options: FindDefaultProps, out?: FindFocusableOutputProps): HTMLElement | null;\n /**\n * @returns All focusables in a given context that satisfy an given condition\n */\n findAll(options: FindAllProps): HTMLElement[];\n findElement(options: FindFocusableProps, out?: FindFocusableOutputProps): HTMLElement | null | undefined;\n}\n\nexport interface DummyInputManager {\n moveOut: (backwards: boolean) => void;\n moveOutWithDefaultAction: (backwards: boolean, relatedEvent: KeyboardEvent) => void;\n}\n\nexport interface Visibilities {\n Invisible: 0;\n PartiallyVisible: 1;\n Visible: 2;\n}\nexport const Visibilities: Visibilities = {\n Invisible: 0,\n PartiallyVisible: 1,\n Visible: 2,\n};\nexport type Visibility = Visibilities[keyof Visibilities];\n\nexport interface MoverElementState {\n isCurrent: boolean | undefined; // Tri-state bool. Undefined when there is no current in the container.\n visibility: Visibility;\n}\n\nexport interface MoverDirections {\n Both: 0; // Default, both left/up keys move to the previous, right/down move to the next.\n Vertical: 1; // Only up/down arrows move to the next/previous.\n Horizontal: 2; // Only left/right arrows move to the next/previous.\n Grid: 3; // Two-dimentional movement depending on the visual placement.\n GridLinear: 4; // Two-dimentional movement depending on the visual placement. Allows linear movement.\n}\n\nexport const RestorerTypes = {\n Source: 0,\n Target: 1,\n} as const;\n\nexport type RestorerType = (typeof RestorerTypes)[keyof typeof RestorerTypes];\n\nexport const MoverDirections: MoverDirections = {\n Both: 0,\n Vertical: 1,\n Horizontal: 2,\n Grid: 3,\n GridLinear: 4,\n};\nexport type MoverDirection = MoverDirections[keyof MoverDirections];\n\nexport type NextTabbable = {\n element: HTMLElement | null | undefined;\n uncontrolled?: HTMLElement | null;\n outOfDOMOrder?: boolean;\n};\n\nexport interface MoverProps {\n direction?: MoverDirection;\n memorizeCurrent?: boolean;\n tabbable?: boolean;\n /**\n * Whether to allow cyclic navigation in the mover\n * Can only be applied if navigationType is MoverKeys.Arrows\n *\n * @defaultValue false\n */\n cyclic?: boolean;\n /**\n * In case we need a rich state of the elements inside a Mover,\n * we can track it. It takes extra resourses and might affect\n * performance when a Mover has many elements inside, so make sure\n * you use this prop when it is really needed.\n */\n trackState?: boolean;\n /**\n * When set to Visibility.Visible or Visibility.PartiallyVisible,\n * uses the visibility part of the trackState prop to be able to\n * go to first/last visible element (instead of first/last focusable\n * element in DOM) when tabbing from outside of the mover.\n */\n visibilityAware?: Visibility;\n /**\n * When true, Mover will try to locate a focusable with Focusable.isDefault\n * property as a prioritized element to focus. True by default.\n */\n hasDefault?: boolean;\n /**\n * A value between 0 and 1 that specifies the tolerance allowed\n * when testing for visibility.\n *\n * @example\n * an element of height 100px has 10px that are above the viewport\n * hidden by scroll. This element is a valid visible element to focus.\n *\n * @default 0.8\n */\n visibilityTolerance?: number;\n}\n\nexport type MoverEvent = TabsterEventWithDetails<MoverElementState>;\n\nexport interface Mover extends TabsterPart<MoverProps>, TabsterPartWithFindNextTabbable, TabsterPartWithAcceptElement {\n readonly id: string;\n readonly dummyManager: DummyInputManager | undefined;\n readonly visibilityTolerance: NonNullable<MoverProps['visibilityTolerance']>;\n dispose(): void;\n setCurrent(element: HTMLElement | undefined): void;\n getCurrent(): HTMLElement | null;\n getState(element: HTMLElement): MoverElementState | undefined;\n}\n\nexport type MoverConstructor = (tabster: TabsterCore, element: HTMLElement, props: MoverProps) => Mover;\n\ninterface MoverAPIInternal {\n /** @internal */\n createMover(element: HTMLElement, props: MoverProps, sys: SysProps | undefined): Mover;\n}\n\nexport interface MoverKeys {\n ArrowUp: 1;\n ArrowDown: 2;\n ArrowLeft: 3;\n ArrowRight: 4;\n PageUp: 5;\n PageDown: 6;\n Home: 7;\n End: 8;\n}\nexport type MoverKey = MoverKeys[keyof MoverKeys];\nexport const MoverKeys: MoverKeys = {\n ArrowUp: 1,\n ArrowDown: 2,\n ArrowLeft: 3,\n ArrowRight: 4,\n PageUp: 5,\n PageDown: 6,\n Home: 7,\n End: 8,\n};\n\nexport interface MoverAPI extends MoverAPIInternal, Disposable {\n /** @internal (will likely be exposed once the API is fully stable) */\n moveFocus(fromElement: HTMLElement, key: MoverKey): HTMLElement | null;\n}\n\nexport interface GroupperTabbabilities {\n Unlimited: 0;\n Limited: 1; // The tabbability is limited to the container and explicit Enter is needed to go inside.\n LimitedTrapFocus: 2; // The focus is limited as above, plus trapped when inside.\n}\nexport const GroupperTabbabilities: GroupperTabbabilities = {\n Unlimited: 0,\n Limited: 1,\n LimitedTrapFocus: 2,\n};\nexport type GroupperTabbability = GroupperTabbabilities[keyof GroupperTabbabilities];\n\nexport interface GroupperProps {\n tabbability?: GroupperTabbability;\n delegated?: boolean; // This allows to tweak the groupper behaviour for the cases when\n // the groupper container is not focusable and groupper has Limited or LimitedTrapFocus\n // tabbability. By default, the groupper will automatically become active once the focus\n // goes to first focusable element inside the groupper during tabbing. When true, the\n // groupper will become active only after Enter is pressed on first focusable element\n // inside the groupper.\n}\n\nexport interface Groupper\n extends TabsterPart<GroupperProps>,\n TabsterPartWithFindNextTabbable,\n TabsterPartWithAcceptElement {\n readonly id: string;\n readonly dummyManager: DummyInputManager | undefined;\n dispose(): void;\n makeTabbable(isUnlimited: boolean): void;\n isActive(noIfFirstIsFocused?: boolean): boolean | undefined; // Tri-state boolean, undefined when parent is not active, false when parent is active.\n setFirst(element: HTMLElement | undefined): void;\n getFirst(orContainer: boolean): HTMLElement | undefined;\n}\n\nexport type GroupperConstructor = (tabster: TabsterCore, element: HTMLElement, props: GroupperProps) => Groupper;\n\nexport interface GroupperAPIInternal {\n /** @internal */\n createGroupper(element: HTMLElement, props: GroupperProps, sys: SysProps | undefined): Groupper;\n /** @internal */\n handleKeyPress(element: HTMLElement, event: KeyboardEvent, fromModalizer?: boolean): void;\n}\n\nexport interface GroupperAPI extends GroupperAPIInternal, Disposable {\n /** @internal (will likely be exposed once the API is fully stable) */\n moveFocus(element: HTMLElement, action: GroupperMoveFocusAction): HTMLElement | null;\n}\n\nexport interface GroupperAPIInternal {\n forgetCurrentGrouppers(): void;\n}\n\nexport interface ModalizerProps {\n id: string;\n isOthersAccessible?: boolean;\n isAlwaysAccessible?: boolean;\n isNoFocusFirst?: boolean;\n isNoFocusDefault?: boolean;\n /** A focus trap variant, keeps focus inside the modal when tabbing */\n isTrapped?: boolean;\n}\n\nexport type ModalizerEventName =\n | typeof ModalizerActiveEventName\n | typeof ModalizerInactiveEventName\n | typeof ModalizerBeforeFocusOutEventName\n | typeof ModalizerFocusInEventName\n | typeof ModalizerFocusOutEventName;\n\nexport type ModalizerEventDetails = {\n id: string;\n element: HTMLElement;\n eventName: ModalizerEventName;\n};\n\nexport type ModalizerEvent = TabsterEventWithDetails<ModalizerEventDetails>;\n\nexport interface Modalizer extends TabsterPart<ModalizerProps>, TabsterPartWithFindNextTabbable {\n readonly userId: string;\n readonly dummyManager: DummyInputManager | undefined;\n /**\n * @returns - Whether the element is inside the modalizer\n */\n contains(element: HTMLElement): boolean;\n dispose(): void;\n isActive(): boolean;\n makeActive(isActive: boolean): void;\n focused(noIncrement?: boolean): number;\n triggerFocusEvent(eventName: ModalizerEventName, allElements: boolean): boolean;\n}\n\nexport type ModalizerConstructor = (tabster: TabsterCore, element: HTMLElement, props: ModalizerProps) => Modalizer;\n\nexport interface RootProps {\n restoreFocusOrder?: RestoreFocusOrder;\n}\n\nexport interface Root extends TabsterPart<RootProps> {\n /**@internal*/\n addDummyInputs(): void;\n\n readonly uid: string;\n dispose(): void;\n moveOutWithDefaultAction(backwards: boolean, relatedEvent: KeyboardEvent): void;\n}\n\nexport type RootConstructor = (tabster: TabsterCore, element: HTMLElement, props: RootProps) => Root;\n\nexport interface SysDummyInputsPositions {\n Auto: 0; // Tabster will place dummy inputs depending on the container tag name and on the default behaviour.\n Inside: 1; // Tabster will always place dummy inputs inside the container.\n Outside: 2; // Tabster will always place dummy inputs outside of the container.\n}\nexport const SysDummyInputsPositions: SysDummyInputsPositions = {\n Auto: 0,\n Inside: 1,\n Outside: 2,\n};\nexport type SysDummyInputsPosition = SysDummyInputsPositions[keyof SysDummyInputsPositions];\n/**\n * Ability to fine-tune Tabster internal behaviour in rare cases of need.\n * Normally, should not be used. A deep understanding of the intention and the effect\n * is required.\n */\nexport interface SysProps {\n /**\n * Force dummy input position outside or inside of the element.\n * By default (when undefined), the position is determined dynamically\n * (for example inside for <li> elements and outside for <table> elements,\n * plus a default Groupper/Mover/Modalizer implementation position).\n * Setting to true will force the dummy inputs to be always outside of the element,\n * setting to false will force the dummy inputs to be always inside.\n */\n dummyInputsPosition?: SysDummyInputsPosition;\n}\n\nexport interface GetTabsterContextOptions {\n /**\n * Should visit **all** element ancestors to verify if `dir='rtl'` is set\n */\n checkRtl?: boolean;\n /**\n * The element to start computing the context from. Useful when dealing\n * with nested structures. For example, if we have an element inside a groupper\n * inside another groupper, the `groupper` prop in this element's contexts will\n * be the inner groupper, but when we pass the inner groupper's parent element\n * as `referenceElement`, the context groupper will be the outer one. Having\n * this option simplifies searching for the next tabbable element in the\n * environment of nested movers and grouppers.\n */\n referenceElement?: HTMLElement;\n}\n\nexport type TabsterContextMoverGroupper = { isMover: true; mover: Mover } | { isMover: false; groupper: Groupper };\n\nexport interface TabsterContext {\n root: Root;\n modalizer?: Modalizer;\n groupper?: Groupper;\n mover?: Mover;\n groupperBeforeMover?: boolean;\n modalizerInGroupper?: Groupper;\n /**\n * Whether `dir='rtl'` is set on an ancestor\n */\n rtl?: boolean;\n excludedFromMover?: boolean;\n uncontrolled?: HTMLElement | null;\n ignoreKeydown: (e: KeyboardEvent) => boolean;\n}\n\nexport interface RootFocusEventDetails {\n element: HTMLElement;\n}\n\ninterface RootAPIInternal {\n /**@internal*/\n createRoot(element: HTMLElement, props: RootProps, sys: SysProps | undefined): Root;\n /**@internal*/\n onRoot(root: Root, removed?: boolean): void;\n /**@internal*/\n addDummyInputs(): void;\n}\n\nexport interface RootAPI extends Disposable, RootAPIInternal {\n eventTarget: EventTarget;\n}\n\nexport interface UncontrolledAPI {\n isUncontrolledCompletely(element: HTMLElement, completely: boolean): boolean;\n}\n\ninterface ModalizerAPIInternal extends TabsterPartWithAcceptElement {\n /** @internal */\n activeId: string | undefined; // currently active Modalizer user id.\n /** @internal */\n currentIsOthersAccessible: boolean | undefined; // isOthersAccessible value of the currently active Modalizer.\n /** @internal */\n activeElements: WeakHTMLElement<HTMLElement>[];\n /** @internal */\n createModalizer(element: HTMLElement, props: ModalizerProps, sys: SysProps | undefined): Modalizer;\n /**\n * Sets active modalizers.\n * When active, everything outside of the modalizers with the specific user\n * defined id gets `aria-hidden`.\n *\n * @param userId - user defined identifier or undefined (if nothing is modal).\n */\n /** @internal */\n setActive(modalizer: Modalizer | undefined): void;\n /** @internal */\n hiddenUpdate(): void;\n /** @internal */\n isAugmented(element: HTMLElement): boolean;\n}\n\nexport interface ModalizerAPI extends ModalizerAPIInternal, Disposable {\n /**\n * Activates a Modalizer and focuses the first or default element within\n *\n * @param elementFromModalizer - An element that belongs to a Modalizer\n * @param noFocusFirst - Do not focus on the first element in the Modalizer\n * @param noFocusDefault - Do not focus the default element in the Modalizre\n */\n focus(elementFromModalizer: HTMLElement, noFocusFirst?: boolean, noFocusDefault?: boolean): boolean;\n}\n\ninterface RestorerAPIInternal {\n /** @internal */\n createRestorer(element: HTMLElement, props: RestorerProps): Restorer;\n}\n\nexport interface RestorerAPI extends RestorerAPIInternal, Disposable {}\n\nexport interface Restorer extends Disposable, TabsterPart<RestorerProps> {}\n/**\n * A signature for the accessibleCheck callback from getModalizer().\n * It is called when active Modalizer sets aria-hidden on elements outsidef of it.\n *\n * @param element - The element that is about to receive aria-hidden.\n * @param activeModalizerElements - The container elements of the active modalizer.\n * @returns true if the element should remain accessible and should not receive\n * aria-hidden.\n */\nexport type ModalizerElementAccessibleCheck = (\n element: HTMLElement,\n activeModalizerElements?: HTMLElement[],\n) => boolean;\n\nexport interface UncontrolledProps {\n // Normally, even uncontrolled areas should not be completely uncontrolled\n // to be able to interact with the rest of the application properly.\n // For example, if an uncontrolled area implements something like\n // roving tabindex, it should be uncontrolled inside the area, but it\n // still should be able to be an organic part of the application.\n // However, in some cases, third party component might want to be able\n // to gain full control of the area, for example, if it implements\n // some custom trap focus logic.\n // `completely` indicates that uncontrolled area must gain full control over\n // Tab handling. If not set, Tabster might still handle Tab in the\n // uncontrolled area, when, for example, there is an inactive Modalizer\n // (that needs to be skipped) after the last focusable element of the\n // uncontrolled area.\n // WARNING: Use with caution, as it might break the normal keyboard navigation\n // between the uncontrolled area and the rest of the application.\n completely?: boolean;\n}\n\nexport interface DeloserOnElement {\n deloser: Deloser;\n}\n\nexport interface RootOnElement {\n root: Root;\n}\n\nexport interface ModalizerOnElement {\n modalizer: Modalizer;\n}\n\nexport interface RestorerOnElement {\n restorer: Restorer;\n}\n\nexport interface FocusableOnElement {\n focusable: FocusableProps;\n}\n\nexport interface MoverOnElement {\n mover: Mover;\n}\n\nexport interface GroupperOnElement {\n groupper: Groupper;\n}\n\nexport interface UncontrolledOnElement {\n uncontrolled: UncontrolledProps;\n}\n\nexport interface ObservedOnElement {\n observed: ObservedElementProps;\n}\n\nexport interface OutlineOnElement {\n outline: OutlinedElementProps;\n}\n\nexport interface SysOnElement {\n sys: SysProps;\n}\n\nexport interface RestorerProps {\n type: RestorerType;\n}\n\nexport type TabsterAttributeProps = Partial<{\n deloser: DeloserProps;\n root: RootProps;\n uncontrolled: UncontrolledProps;\n modalizer: ModalizerProps;\n focusable: FocusableProps;\n groupper: GroupperProps;\n mover: MoverProps;\n observed: ObservedElementProps;\n outline: OutlinedElementProps;\n sys: SysProps;\n restorer: RestorerProps;\n}>;\n\nexport interface TabsterAttributeOnElement {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n string: string;\n object: TabsterAttributeProps;\n}\n\nexport interface TabsterAugmentedAttributes {\n [name: string]: string | null;\n}\n\nexport type TabsterOnElement = Partial<\n RootOnElement &\n DeloserOnElement &\n ModalizerOnElement &\n FocusableOnElement &\n MoverOnElement &\n GroupperOnElement &\n ObservedOnElement &\n OutlineOnElement &\n UncontrolledOnElement &\n SysOnElement &\n RestorerOnElement\n>;\n\nexport interface OutlineElements {\n container: HTMLDivElement;\n left: HTMLDivElement;\n top: HTMLDivElement;\n right: HTMLDivElement;\n bottom: HTMLDivElement;\n}\n\nexport interface TabsterElementStorageEntry {\n tabster?: TabsterOnElement;\n attr?: TabsterAttributeOnElement;\n aug?: TabsterAugmentedAttributes;\n}\n\nexport interface TabsterElementStorage {\n [uid: string]: TabsterElementStorageEntry;\n}\n\nexport type DisposeFunc = () => void;\n\nexport interface InternalAPI {\n stopObserver(): void;\n resumeObserver(syncState: boolean): void;\n}\n\nexport interface DummyInputObserver {\n add(dummy: HTMLElement, callback: () => void): void;\n remove(dummy: HTMLElement): void;\n dispose(): void;\n domChanged?(parent: HTMLElement): void;\n updatePositions(\n compute: (scrollTopLeftCache: Map<HTMLElement, { scrollTop: number; scrollLeft: number } | null>) => () => void,\n ): void;\n}\n\ninterface TabsterCoreInternal {\n /** @internal */\n groupper?: GroupperAPI;\n /** @internal */\n mover?: MoverAPI;\n /** @internal */\n outline?: OutlineAPI;\n /** @internal */\n deloser?: DeloserAPI;\n /** @internal */\n modalizer?: ModalizerAPI;\n /** @internal */\n observedElement?: ObservedElementAPI;\n /** @internal */\n crossOrigin?: CrossOriginAPI;\n /** @internal */\n internal: InternalAPI;\n /** @internal */\n restorer?: RestorerAPI;\n\n /** @internal */\n _dummyObserver: DummyInputObserver;\n\n // The version of the tabster package this instance is on\n /** @internal */\n _version: string;\n\n // No operation flag for the debugging purposes\n /** @internal */\n _noop: boolean;\n\n /** @internal */\n storageEntry(element: HTMLElement, addremove?: boolean): TabsterElementStorageEntry | undefined;\n /** @internal */\n getWindow: GetWindow;\n\n /** @internal */\n createTabster(noRefCount?: boolean, props?: TabsterCoreProps): Tabster;\n /** @internal */\n disposeTabster(wrapper: Tabster, allInstances?: boolean): void;\n /** @internal */\n forceCleanup(): void;\n\n /** @internal */\n queueInit(callback: () => void): void;\n /** @internal */\n drainInitQueue(): void;\n /** @internal */\n getParent: (el: Node) => Node | null;\n}\n\nexport interface Tabster {\n keyboardNavigation: KeyboardNavigationState;\n focusedElement: FocusedElementState;\n focusable: FocusableAPI;\n root: RootAPI;\n uncontrolled: UncontrolledAPI;\n\n /** @internal */\n core: TabsterCore;\n}\n\nexport interface TabsterCore\n extends Pick<TabsterCoreProps, 'controlTab' | 'rootDummyInputs'>,\n Disposable,\n TabsterCoreInternal,\n Omit<Tabster, 'core'> {}\n\nexport interface TabsterCompat {\n attributeTransform?: <P>(old: P) => TabsterAttributeProps;\n}\n"],"names":["TabsterAttributeName","TabsterDummyInputAttributeName","DeloserEventName","ModalizerActiveEventName","ModalizerInactiveEventName","ModalizerFocusInEventName","ModalizerFocusOutEventName","ModalizerBeforeFocusOutEventName","MoverEventName","FocusInEventName","FocusOutEventName","MoveFocusEventName","MoverMoveFocusEventName","GroupperMoveFocusEventName","FocusableSelector","join","GroupperMoveFocusActions","Enter","Escape","ObservedElementAccesibilities","Any","Accessible","Focusable","RestoreFocusOrders","History","DeloserDefault","RootDefault","DeloserFirst","RootFirst","Visibilities","Invisible","PartiallyVisible","Visible","RestorerTypes","Source","Target","MoverDirections","Both","Vertical","Horizontal","Grid","GridLinear","MoverKeys","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","SysDummyInputsPositions","Auto","Inside","Outside"],"mappings":"AAAA;;;CAGC,GAED;;;;;;;;;;;CAWC,GAED,OAAO,MAAMA,uBAAuB,eAAe;AACnD,OAAO,MAAMC,iCAAiC,qBAAqB;AACnE,OAAO,MAAMC,mBAAmB,kBAAkB;AAClD,OAAO,MAAMC,2BAA2B,2BAA2B;AACnE,OAAO,MAAMC,6BAA6B,6BAA6B;AACvE,OAAO,MAAMC,4BAA4B,4BAA4B;AACrE,OAAO,MAAMC,6BAA6B,6BAA6B;AACvE,OAAO,MAAMC,mCAAmC,mCAAmC;AACnF,OAAO,MAAMC,iBAAiB,gBAAgB;AAC9C,OAAO,MAAMC,mBAAmB,kBAAkB;AAClD,OAAO,MAAMC,oBAAoB,mBAAmB;AAEpD,0EAA0E;AAC1E,sEAAsE;AACtE,qBAAqB;AACrB,OAAO,MAAMC,qBAAqB,oBAAoB;AAEtD,0EAA0E;AAC1E,sBAAsB;AACtB,OAAO,MAAMC,0BAA0B,0BAA0B;AACjE,2EAA2E;AAC3E,sBAAsB;AACtB,OAAO,MAAMC,6BAA6B,6BAA6B;AAEvE,OAAO,MAAMC,oBAAoB;IAC/B;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAACC,IAAI,CAAC,MAAM;AAUb,OAAO,MAAMC,2BAAqD;IAChEC,OAAO;IACPC,QAAQ;AACV,EAAE;AA0KF,OAAO,MAAMC,gCAA+D;IAC1EC,KAAK;IACLC,YAAY;IACZC,WAAW;AACb,EAAE;AAsJF,OAAO,MAAMC,qBAAyC;IACpDC,SAAS;IACTC,gBAAgB;IAChBC,aAAa;IACbC,cAAc;IACdC,WAAW;AACb,EAAE;AAqOF,OAAO,MAAMC,eAA6B;IACxCC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;AACX,EAAE;AAgBF,OAAO,MAAMC,gBAAgB;IAC3BC,QAAQ;IACRC,QAAQ;AACV,EAAW;AAIX,OAAO,MAAMC,kBAAmC;IAC9CC,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,MAAM;IACNC,YAAY;AACd,EAAE;AAkFF,OAAO,MAAMC,YAAuB;IAClCC,SAAS;IACTC,WAAW;IACXC,WAAW;IACXC,YAAY;IACZC,QAAQ;IACRC,UAAU;IACVC,MAAM;IACNC,KAAK;AACP,EAAE;AAYF,OAAO,MAAMC,wBAA+C;IAC1DC,WAAW;IACXC,SAAS;IACTC,kBAAkB;AACpB,EAAE;AAyGF,OAAO,MAAMC,0BAAmD;IAC9DC,MAAM;IACNC,QAAQ;IACRC,SAAS;AACX,EAAE"}
@@ -35,15 +35,15 @@ const useArrowNavigationGroup = (options = {})=>{
35
35
  function axisToMoverDirection(axis) {
36
36
  switch(axis){
37
37
  case 'horizontal':
38
- return _tabster.Types.MoverDirections.Horizontal;
38
+ return _tabster.MoverDirections.Horizontal;
39
39
  case 'grid':
40
- return _tabster.Types.MoverDirections.Grid;
40
+ return _tabster.MoverDirections.Grid;
41
41
  case 'grid-linear':
42
- return _tabster.Types.MoverDirections.GridLinear;
42
+ return _tabster.MoverDirections.GridLinear;
43
43
  case 'both':
44
- return _tabster.Types.MoverDirections.Both;
44
+ return _tabster.MoverDirections.Both;
45
45
  case 'vertical':
46
46
  default:
47
- return _tabster.Types.MoverDirections.Vertical;
47
+ return _tabster.MoverDirections.Vertical;
48
48
  }
49
49
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useArrowNavigationGroup.js"],"sourcesContent":["import { Types, getMover } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n/**\n * A hook that returns the necessary tabster attributes to support arrow key navigation\n * @param options - Options to configure keyboard navigation\n */ export const useArrowNavigationGroup = (options = {})=>{\n const { circular, axis, memorizeCurrent = true, tabbable, ignoreDefaultKeydown, // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault } = options;\n const tabster = useTabster();\n if (tabster) {\n getMover(tabster);\n }\n return useTabsterAttributes({\n mover: {\n cyclic: !!circular,\n direction: axisToMoverDirection(axis !== null && axis !== void 0 ? axis : 'vertical'),\n memorizeCurrent,\n tabbable,\n hasDefault: unstable_hasDefault\n },\n ...ignoreDefaultKeydown && {\n focusable: {\n ignoreKeydown: ignoreDefaultKeydown\n }\n }\n });\n};\nfunction axisToMoverDirection(axis) {\n switch(axis){\n case 'horizontal':\n return Types.MoverDirections.Horizontal;\n case 'grid':\n return Types.MoverDirections.Grid;\n case 'grid-linear':\n return Types.MoverDirections.GridLinear;\n case 'both':\n return Types.MoverDirections.Both;\n case 'vertical':\n default:\n return Types.MoverDirections.Vertical;\n }\n}\n"],"names":["useArrowNavigationGroup","options","circular","axis","memorizeCurrent","tabbable","ignoreDefaultKeydown","unstable_hasDefault","tabster","useTabster","getMover","useTabsterAttributes","mover","cyclic","direction","axisToMoverDirection","hasDefault","focusable","ignoreKeydown","Types","MoverDirections","Horizontal","Grid","GridLinear","Both","Vertical"],"mappings":";;;;+BAMiBA;;;eAAAA;;;yBANe;sCACK;4BACV;AAIhB,MAAMA,0BAA0B,CAACC,UAAU,CAAC,CAAC;IACpD,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,kBAAkB,IAAI,EAAEC,QAAQ,EAAEC,oBAAoB,EAC9EC,mBAAmB,EAAE,GAAGN;IACxB,MAAMO,UAAUC,IAAAA,sBAAU;IAC1B,IAAID,SAAS;QACTE,IAAAA,iBAAQ,EAACF;IACb;IACA,OAAOG,IAAAA,0CAAoB,EAAC;QACxBC,OAAO;YACHC,QAAQ,CAAC,CAACX;YACVY,WAAWC,qBAAqBZ,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;YAC1EC;YACAC;YACAW,YAAYT;QAChB;QACA,GAAGD,wBAAwB;YACvBW,WAAW;gBACPC,eAAeZ;YACnB;QACJ,CAAC;IACL;AACJ;AACA,SAASS,qBAAqBZ,IAAI;IAC9B,OAAOA;QACH,KAAK;YACD,OAAOgB,cAAK,CAACC,eAAe,CAACC,UAAU;QAC3C,KAAK;YACD,OAAOF,cAAK,CAACC,eAAe,CAACE,IAAI;QACrC,KAAK;YACD,OAAOH,cAAK,CAACC,eAAe,CAACG,UAAU;QAC3C,KAAK;YACD,OAAOJ,cAAK,CAACC,eAAe,CAACI,IAAI;QACrC,KAAK;QACL;YACI,OAAOL,cAAK,CAACC,eAAe,CAACK,QAAQ;IAC7C;AACJ"}
1
+ {"version":3,"sources":["useArrowNavigationGroup.js"],"sourcesContent":["import { getMover, MoverDirections } from 'tabster';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { useTabster } from './useTabster';\n/**\n * A hook that returns the necessary tabster attributes to support arrow key navigation\n * @param options - Options to configure keyboard navigation\n */ export const useArrowNavigationGroup = (options = {})=>{\n const { circular, axis, memorizeCurrent = true, tabbable, ignoreDefaultKeydown, // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_hasDefault } = options;\n const tabster = useTabster();\n if (tabster) {\n getMover(tabster);\n }\n return useTabsterAttributes({\n mover: {\n cyclic: !!circular,\n direction: axisToMoverDirection(axis !== null && axis !== void 0 ? axis : 'vertical'),\n memorizeCurrent,\n tabbable,\n hasDefault: unstable_hasDefault\n },\n ...ignoreDefaultKeydown && {\n focusable: {\n ignoreKeydown: ignoreDefaultKeydown\n }\n }\n });\n};\nfunction axisToMoverDirection(axis) {\n switch(axis){\n case 'horizontal':\n return MoverDirections.Horizontal;\n case 'grid':\n return MoverDirections.Grid;\n case 'grid-linear':\n return MoverDirections.GridLinear;\n case 'both':\n return MoverDirections.Both;\n case 'vertical':\n default:\n return MoverDirections.Vertical;\n }\n}\n"],"names":["useArrowNavigationGroup","options","circular","axis","memorizeCurrent","tabbable","ignoreDefaultKeydown","unstable_hasDefault","tabster","useTabster","getMover","useTabsterAttributes","mover","cyclic","direction","axisToMoverDirection","hasDefault","focusable","ignoreKeydown","MoverDirections","Horizontal","Grid","GridLinear","Both","Vertical"],"mappings":";;;;+BAMiBA;;;eAAAA;;;yBANyB;sCACL;4BACV;AAIhB,MAAMA,0BAA0B,CAACC,UAAU,CAAC,CAAC;IACpD,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,kBAAkB,IAAI,EAAEC,QAAQ,EAAEC,oBAAoB,EAC9EC,mBAAmB,EAAE,GAAGN;IACxB,MAAMO,UAAUC,IAAAA,sBAAU;IAC1B,IAAID,SAAS;QACTE,IAAAA,iBAAQ,EAACF;IACb;IACA,OAAOG,IAAAA,0CAAoB,EAAC;QACxBC,OAAO;YACHC,QAAQ,CAAC,CAACX;YACVY,WAAWC,qBAAqBZ,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAO;YAC1EC;YACAC;YACAW,YAAYT;QAChB;QACA,GAAGD,wBAAwB;YACvBW,WAAW;gBACPC,eAAeZ;YACnB;QACJ,CAAC;IACL;AACJ;AACA,SAASS,qBAAqBZ,IAAI;IAC9B,OAAOA;QACH,KAAK;YACD,OAAOgB,wBAAe,CAACC,UAAU;QACrC,KAAK;YACD,OAAOD,wBAAe,CAACE,IAAI;QAC/B,KAAK;YACD,OAAOF,wBAAe,CAACG,UAAU;QACrC,KAAK;YACD,OAAOH,wBAAe,CAACI,IAAI;QAC/B,KAAK;QACL;YACI,OAAOJ,wBAAe,CAACK,QAAQ;IACvC;AACJ"}
@@ -28,11 +28,11 @@ const useFocusableGroup = (options)=>{
28
28
  const getTabbability = (tabBehavior)=>{
29
29
  switch(tabBehavior){
30
30
  case 'unlimited':
31
- return _tabster.Types.GroupperTabbabilities.Unlimited;
31
+ return _tabster.GroupperTabbabilities.Unlimited;
32
32
  case 'limited':
33
- return _tabster.Types.GroupperTabbabilities.Limited;
33
+ return _tabster.GroupperTabbabilities.Limited;
34
34
  case 'limited-trap-focus':
35
- return _tabster.Types.GroupperTabbabilities.LimitedTrapFocus;
35
+ return _tabster.GroupperTabbabilities.LimitedTrapFocus;
36
36
  default:
37
37
  return undefined;
38
38
  }
@@ -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 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;;;eAAAA;;;yBANkB;sCACE;4BACV;AAIhB,MAAMA,oBAAoB,CAACC;IAClC,MAAMC,UAAUC,IAAAA,sBAAU;IAC1B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB;IACA,OAAOG,IAAAA,0CAAoB,EAAC;QACxBC,UAAU;YACNC,aAAaC,eAAeP,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQQ,WAAW;QACrG;QACAC,WAAW;YACPC,eAAeV,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQW,oBAAoB;QACjG;IACJ;AACJ;AACA,MAAMJ,iBAAiB,CAACC;IACpB,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"}
1
+ {"version":3,"sources":["useFocusableGroup.js"],"sourcesContent":["import { getGroupper, GroupperTabbabilities } 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 GroupperTabbabilities.Unlimited;\n case 'limited':\n return GroupperTabbabilities.Limited;\n case 'limited-trap-focus':\n return GroupperTabbabilities.LimitedTrapFocus;\n default:\n return undefined;\n }\n};\n"],"names":["useFocusableGroup","options","tabster","useTabster","getGroupper","useTabsterAttributes","groupper","tabbability","getTabbability","tabBehavior","focusable","ignoreKeydown","ignoreDefaultKeydown","GroupperTabbabilities","Unlimited","Limited","LimitedTrapFocus","undefined"],"mappings":";;;;+BAMiBA;;;eAAAA;;;yBANkC;sCACd;4BACV;AAIhB,MAAMA,oBAAoB,CAACC;IAClC,MAAMC,UAAUC,IAAAA,sBAAU;IAC1B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB;IACA,OAAOG,IAAAA,0CAAoB,EAAC;QACxBC,UAAU;YACNC,aAAaC,eAAeP,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQQ,WAAW;QACrG;QACAC,WAAW;YACPC,eAAeV,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQW,oBAAoB;QACjG;IACJ;AACJ;AACA,MAAMJ,iBAAiB,CAACC;IACpB,OAAOA;QACH,KAAK;YACD,OAAOI,8BAAqB,CAACC,SAAS;QAC1C,KAAK;YACD,OAAOD,8BAAqB,CAACE,OAAO;QACxC,KAAK;YACD,OAAOF,8BAAqB,CAACG,gBAAgB;QACjD;YACI,OAAOC;IACf;AACJ"}
@@ -12,7 +12,7 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _tabster = require("tabster");
14
14
  const useMergedTabsterAttributes_unstable = (...attributes)=>{
15
- const stringAttributes = attributes.map((attribute)=>attribute[_tabster.Types.TabsterAttributeName]).filter(Boolean);
15
+ const stringAttributes = attributes.map((attribute)=>attribute[_tabster.TABSTER_ATTRIBUTE_NAME]).filter(Boolean);
16
16
  return _react.useMemo(()=>{
17
17
  let attribute = stringAttributes[0];
18
18
  attributes.shift();
@@ -20,7 +20,7 @@ const useMergedTabsterAttributes_unstable = (...attributes)=>{
20
20
  attribute = mergeAttributes(attribute, attr);
21
21
  }
22
22
  return {
23
- [_tabster.Types.TabsterAttributeName]: attribute
23
+ [_tabster.TABSTER_ATTRIBUTE_NAME]: attribute
24
24
  };
25
25
  // eslint-disable-next-line react-hooks/exhaustive-deps
26
26
  }, stringAttributes);
@@ -1 +1 @@
1
- {"version":3,"sources":["useMergeTabsterAttributes.js"],"sourcesContent":["import * as React from 'react';\nimport { Types } from 'tabster';\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */ export const useMergedTabsterAttributes_unstable = (...attributes)=>{\n const stringAttributes = attributes.map((attribute)=>attribute[Types.TabsterAttributeName]).filter(Boolean);\n return React.useMemo(()=>{\n let attribute = stringAttributes[0];\n attributes.shift();\n for (const attr of stringAttributes){\n attribute = mergeAttributes(attribute, attr);\n }\n return {\n [Types.TabsterAttributeName]: attribute\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\nfunction mergeAttributes(a, b) {\n if (!b) {\n return a;\n }\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n return JSON.stringify({\n ...aParsed,\n ...bParsed\n });\n}\n"],"names":["useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","Types","TabsterAttributeName","filter","Boolean","React","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;yBACD;AAQX,MAAMA,sCAAsC,CAAC,GAAGC;IACvD,MAAMC,mBAAmBD,WAAWE,GAAG,CAAC,CAACC,YAAYA,SAAS,CAACC,cAAK,CAACC,oBAAoB,CAAC,EAAEC,MAAM,CAACC;IACnG,OAAOC,OAAMC,OAAO,CAAC;QACjB,IAAIN,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWU,KAAK;QAChB,KAAK,MAAMC,QAAQV,iBAAiB;YAChCE,YAAYS,gBAAgBT,WAAWQ;QAC3C;QACA,OAAO;YACH,CAACP,cAAK,CAACC,oBAAoB,CAAC,EAAEF;QAClC;IACJ,uDAAuD;IACvD,GAAGF;AACP;AACA,SAASW,gBAAgBC,CAAC,EAAEC,CAAC;IACzB,IAAI,CAACA,GAAG;QACJ,OAAOD;IACX;IACA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACH,IAAI;YACAE,UAAUE,KAAKC,KAAK,CAACL;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,IAAIC,GAAG;QACH,IAAI;YACAE,UAAUC,KAAKC,KAAK,CAACJ;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,OAAOG,KAAKE,SAAS,CAAC;QAClB,GAAGJ,OAAO;QACV,GAAGC,OAAO;IACd;AACJ"}
1
+ {"version":3,"sources":["useMergeTabsterAttributes.js"],"sourcesContent":["import * as React from 'react';\nimport { TABSTER_ATTRIBUTE_NAME } from 'tabster';\n/**\n * Merges a collection of tabster attributes.\n *\n * ⚠️The attributes passed as arguments to this hook cannot change at runtime.\n * @internal\n * @param attributes - collection of tabster attributes from other react-tabster hooks\n * @returns single merged tabster attribute\n */ export const useMergedTabsterAttributes_unstable = (...attributes)=>{\n const stringAttributes = attributes.map((attribute)=>attribute[TABSTER_ATTRIBUTE_NAME]).filter(Boolean);\n return React.useMemo(()=>{\n let attribute = stringAttributes[0];\n attributes.shift();\n for (const attr of stringAttributes){\n attribute = mergeAttributes(attribute, attr);\n }\n return {\n [TABSTER_ATTRIBUTE_NAME]: attribute\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, stringAttributes);\n};\nfunction mergeAttributes(a, b) {\n if (!b) {\n return a;\n }\n let aParsed = {};\n let bParsed = {};\n if (a) {\n try {\n aParsed = JSON.parse(a);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n if (b) {\n try {\n bParsed = JSON.parse(b);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n return JSON.stringify({\n ...aParsed,\n ...bParsed\n });\n}\n"],"names":["useMergedTabsterAttributes_unstable","attributes","stringAttributes","map","attribute","TABSTER_ATTRIBUTE_NAME","filter","Boolean","React","useMemo","shift","attr","mergeAttributes","a","b","aParsed","bParsed","JSON","parse","stringify"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;yBACgB;AAQ5B,MAAMA,sCAAsC,CAAC,GAAGC;IACvD,MAAMC,mBAAmBD,WAAWE,GAAG,CAAC,CAACC,YAAYA,SAAS,CAACC,+BAAsB,CAAC,EAAEC,MAAM,CAACC;IAC/F,OAAOC,OAAMC,OAAO,CAAC;QACjB,IAAIL,YAAYF,gBAAgB,CAAC,EAAE;QACnCD,WAAWS,KAAK;QAChB,KAAK,MAAMC,QAAQT,iBAAiB;YAChCE,YAAYQ,gBAAgBR,WAAWO;QAC3C;QACA,OAAO;YACH,CAACN,+BAAsB,CAAC,EAAED;QAC9B;IACJ,uDAAuD;IACvD,GAAGF;AACP;AACA,SAASU,gBAAgBC,CAAC,EAAEC,CAAC;IACzB,IAAI,CAACA,GAAG;QACJ,OAAOD;IACX;IACA,IAAIE,UAAU,CAAC;IACf,IAAIC,UAAU,CAAC;IACf,IAAIH,GAAG;QACH,IAAI;YACAE,UAAUE,KAAKC,KAAK,CAACL;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,IAAIC,GAAG;QACH,IAAI;YACAE,UAAUC,KAAKC,KAAK,CAACJ;QACzB,oCAAoC;QACpC,EAAE,OAAO,CAAC;IACd;IACA,OAAOG,KAAKE,SAAS,CAAC;QAClB,GAAGJ,OAAO;QACV,GAAGC,OAAO;IACd;AACJ"}
@@ -23,7 +23,7 @@ const useModalAttributes = (options = {})=>{
23
23
  const id = (0, _reactutilities.useId)('modal-', options.id);
24
24
  const modalAttributes = (0, _useTabsterAttributes.useTabsterAttributes)({
25
25
  restorer: {
26
- type: _tabster.Types.RestorerTypes.Source
26
+ type: _tabster.RestorerTypes.Source
27
27
  },
28
28
  ...trapFocus && {
29
29
  modalizer: {
@@ -36,7 +36,7 @@ const useModalAttributes = (options = {})=>{
36
36
  });
37
37
  const triggerAttributes = (0, _useTabsterAttributes.useTabsterAttributes)({
38
38
  restorer: {
39
- type: _tabster.Types.RestorerTypes.Target
39
+ type: _tabster.RestorerTypes.Target
40
40
  }
41
41
  });
42
42
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["useModalAttributes.js"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getModalizer, getRestorer, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */ export const useModalAttributes = (options = {})=>{\n const { trapFocus, alwaysFocusable, legacyTrapFocus } = options;\n const tabster = useTabster();\n // Initializes the modalizer and restorer APIs\n if (tabster) {\n getModalizer(tabster);\n getRestorer(tabster);\n }\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n restorer: {\n type: TabsterTypes.RestorerTypes.Source\n },\n ...trapFocus && {\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus\n }\n }\n });\n const triggerAttributes = useTabsterAttributes({\n restorer: {\n type: TabsterTypes.RestorerTypes.Target\n }\n });\n return {\n modalAttributes,\n triggerAttributes\n };\n};\n"],"names":["useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","useTabster","getModalizer","getRestorer","id","useId","modalAttributes","useTabsterAttributes","restorer","type","TabsterTypes","RestorerTypes","Source","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","Target"],"mappings":";;;;+BAUiBA;;;eAAAA;;;gCAVK;sCACe;yBAC4B;4BACtC;AAOhB,MAAMA,qBAAqB,CAACC,UAAU,CAAC,CAAC;IAC/C,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGH;IACxD,MAAMI,UAAUC,IAAAA,sBAAU;IAC1B,8CAA8C;IAC9C,IAAID,SAAS;QACTE,IAAAA,qBAAY,EAACF;QACbG,IAAAA,oBAAW,EAACH;IAChB;IACA,MAAMI,KAAKC,IAAAA,qBAAK,EAAC,UAAUT,QAAQQ,EAAE;IACrC,MAAME,kBAAkBC,IAAAA,0CAAoB,EAAC;QACzCC,UAAU;YACNC,MAAMC,cAAY,CAACC,aAAa,CAACC,MAAM;QAC3C;QACA,GAAGf,aAAa;YACZgB,WAAW;gBACPT;gBACAU,oBAAoB,CAACjB;gBACrBkB,oBAAoBjB;gBACpBkB,WAAWjB,mBAAmBF;YAClC;QACJ,CAAC;IACL;IACA,MAAMoB,oBAAoBV,IAAAA,0CAAoB,EAAC;QAC3CC,UAAU;YACNC,MAAMC,cAAY,CAACC,aAAa,CAACO,MAAM;QAC3C;IACJ;IACA,OAAO;QACHZ;QACAW;IACJ;AACJ"}
1
+ {"version":3,"sources":["useModalAttributes.js"],"sourcesContent":["import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getModalizer, getRestorer, RestorerTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */ export const useModalAttributes = (options = {})=>{\n const { trapFocus, alwaysFocusable, legacyTrapFocus } = options;\n const tabster = useTabster();\n // Initializes the modalizer and restorer APIs\n if (tabster) {\n getModalizer(tabster);\n getRestorer(tabster);\n }\n const id = useId('modal-', options.id);\n const modalAttributes = useTabsterAttributes({\n restorer: {\n type: RestorerTypes.Source\n },\n ...trapFocus && {\n modalizer: {\n id,\n isOthersAccessible: !trapFocus,\n isAlwaysAccessible: alwaysFocusable,\n isTrapped: legacyTrapFocus && trapFocus\n }\n }\n });\n const triggerAttributes = useTabsterAttributes({\n restorer: {\n type: RestorerTypes.Target\n }\n });\n return {\n modalAttributes,\n triggerAttributes\n };\n};\n"],"names":["useModalAttributes","options","trapFocus","alwaysFocusable","legacyTrapFocus","tabster","useTabster","getModalizer","getRestorer","id","useId","modalAttributes","useTabsterAttributes","restorer","type","RestorerTypes","Source","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","Target"],"mappings":";;;;+BAUiBA;;;eAAAA;;;gCAVK;sCACe;yBACoB;4BAC9B;AAOhB,MAAMA,qBAAqB,CAACC,UAAU,CAAC,CAAC;IAC/C,MAAM,EAAEC,SAAS,EAAEC,eAAe,EAAEC,eAAe,EAAE,GAAGH;IACxD,MAAMI,UAAUC,IAAAA,sBAAU;IAC1B,8CAA8C;IAC9C,IAAID,SAAS;QACTE,IAAAA,qBAAY,EAACF;QACbG,IAAAA,oBAAW,EAACH;IAChB;IACA,MAAMI,KAAKC,IAAAA,qBAAK,EAAC,UAAUT,QAAQQ,EAAE;IACrC,MAAME,kBAAkBC,IAAAA,0CAAoB,EAAC;QACzCC,UAAU;YACNC,MAAMC,sBAAa,CAACC,MAAM;QAC9B;QACA,GAAGd,aAAa;YACZe,WAAW;gBACPR;gBACAS,oBAAoB,CAAChB;gBACrBiB,oBAAoBhB;gBACpBiB,WAAWhB,mBAAmBF;YAClC;QACJ,CAAC;IACL;IACA,MAAMmB,oBAAoBT,IAAAA,0CAAoB,EAAC;QAC3CC,UAAU;YACNC,MAAMC,sBAAa,CAACO,MAAM;QAC9B;IACJ;IACA,OAAO;QACHX;QACAU;IACJ;AACJ"}
@@ -26,7 +26,7 @@ function useRestoreFocusTarget() {
26
26
  }
27
27
  return (0, _tabster.getTabsterAttribute)({
28
28
  restorer: {
29
- type: _tabster.Types.RestorerTypes.Target
29
+ type: _tabster.RestorerTypes.Target
30
30
  }
31
31
  });
32
32
  }
@@ -38,7 +38,7 @@ function useRestoreFocusSource() {
38
38
  }
39
39
  return (0, _tabster.getTabsterAttribute)({
40
40
  restorer: {
41
- type: _tabster.Types.RestorerTypes.Source
41
+ type: _tabster.RestorerTypes.Source
42
42
  }
43
43
  });
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useRestoreFocus.js"],"sourcesContent":["import { getRestorer, getTabsterAttribute, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the target element where focus is restored\n */ export function useRestoreFocusTarget() {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n return getTabsterAttribute({\n restorer: {\n type: TabsterTypes.RestorerTypes.Target\n }\n });\n}\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the element that might lose focus\n */ export function useRestoreFocusSource() {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n return getTabsterAttribute({\n restorer: {\n type: TabsterTypes.RestorerTypes.Source\n }\n });\n}\n"],"names":["useRestoreFocusTarget","useRestoreFocusSource","tabster","useTabster","getRestorer","getTabsterAttribute","restorer","type","TabsterTypes","RestorerTypes","Target","Source"],"mappings":";;;;;;;;;;;IAKoBA,qBAAqB;eAArBA;;IAeAC,qBAAqB;eAArBA;;;yBApBoD;4BAC7C;AAIhB,SAASD;IAChB,MAAME,UAAUC,IAAAA,sBAAU;IAC1B,+BAA+B;IAC/B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB;IACA,OAAOG,IAAAA,4BAAmB,EAAC;QACvBC,UAAU;YACNC,MAAMC,cAAY,CAACC,aAAa,CAACC,MAAM;QAC3C;IACJ;AACJ;AAIW,SAAST;IAChB,MAAMC,UAAUC,IAAAA,sBAAU;IAC1B,+BAA+B;IAC/B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB;IACA,OAAOG,IAAAA,4BAAmB,EAAC;QACvBC,UAAU;YACNC,MAAMC,cAAY,CAACC,aAAa,CAACE,MAAM;QAC3C;IACJ;AACJ"}
1
+ {"version":3,"sources":["useRestoreFocus.js"],"sourcesContent":["import { getRestorer, getTabsterAttribute, RestorerTypes } from 'tabster';\nimport { useTabster } from './useTabster';\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the target element where focus is restored\n */ export function useRestoreFocusTarget() {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n return getTabsterAttribute({\n restorer: {\n type: RestorerTypes.Target\n }\n });\n}\n/**\n * Focus will be restored to the most recent target element when it is lost from a source\n * @returns Attribute to apply to the element that might lose focus\n */ export function useRestoreFocusSource() {\n const tabster = useTabster();\n // Initializes the restorer API\n if (tabster) {\n getRestorer(tabster);\n }\n return getTabsterAttribute({\n restorer: {\n type: RestorerTypes.Source\n }\n });\n}\n"],"names":["useRestoreFocusTarget","useRestoreFocusSource","tabster","useTabster","getRestorer","getTabsterAttribute","restorer","type","RestorerTypes","Target","Source"],"mappings":";;;;;;;;;;;IAKoBA,qBAAqB;eAArBA;;IAeAC,qBAAqB;eAArBA;;;yBApB4C;4BACrC;AAIhB,SAASD;IAChB,MAAME,UAAUC,IAAAA,sBAAU;IAC1B,+BAA+B;IAC/B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB;IACA,OAAOG,IAAAA,4BAAmB,EAAC;QACvBC,UAAU;YACNC,MAAMC,sBAAa,CAACC,MAAM;QAC9B;IACJ;AACJ;AAIW,SAASR;IAChB,MAAMC,UAAUC,IAAAA,sBAAU;IAC1B,+BAA+B;IAC/B,IAAID,SAAS;QACTE,IAAAA,oBAAW,EAACF;IAChB;IACA,OAAOG,IAAAA,4BAAmB,EAAC;QACvBC,UAAU;YACNC,MAAMC,sBAAa,CAACE,MAAM;QAC9B;IACJ;AACJ"}
@@ -18,7 +18,7 @@ const useTabsterAttributes = (props)=>{
18
18
  (0, _useTabster.useTabster)();
19
19
  const strAttr = (0, _tabster.getTabsterAttribute)(props, true);
20
20
  return _react.useMemo(()=>({
21
- [_tabster.Types.TabsterAttributeName]: strAttr
21
+ [_tabster.TABSTER_ATTRIBUTE_NAME]: strAttr
22
22
  }), [
23
23
  strAttr
24
24
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTabsterAttributes.js"],"sourcesContent":["import { getTabsterAttribute, Types as TabsterTypes } from 'tabster';\nimport { useTabster } from './useTabster';\nimport * as React from 'react';\n/**\n * @internal\n * Hook that returns tabster attributes while ensuring tabster exists\n */ export const useTabsterAttributes = (props)=>{\n // A tabster instance is not necessary to generate tabster attributes\n // but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same\n useTabster();\n const strAttr = getTabsterAttribute(props, true);\n return React.useMemo(()=>({\n [TabsterTypes.TabsterAttributeName]: strAttr\n }), [\n strAttr\n ]);\n};\n"],"names":["useTabsterAttributes","props","useTabster","strAttr","getTabsterAttribute","React","useMemo","TabsterTypes","TabsterAttributeName"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;yBAN0C;4BAChC;iEACJ;AAIZ,MAAMA,uBAAuB,CAACC;IACrC,qEAAqE;IACrE,iHAAiH;IACjHC,IAAAA,sBAAU;IACV,MAAMC,UAAUC,IAAAA,4BAAmB,EAACH,OAAO;IAC3C,OAAOI,OAAMC,OAAO,CAAC,IAAK,CAAA;YAClB,CAACC,cAAY,CAACC,oBAAoB,CAAC,EAAEL;QACzC,CAAA,GAAI;QACJA;KACH;AACL"}
1
+ {"version":3,"sources":["useTabsterAttributes.js"],"sourcesContent":["import { getTabsterAttribute, TABSTER_ATTRIBUTE_NAME } from 'tabster';\nimport { useTabster } from './useTabster';\nimport * as React from 'react';\n/**\n * @internal\n * Hook that returns tabster attributes while ensuring tabster exists\n */ export const useTabsterAttributes = (props)=>{\n // A tabster instance is not necessary to generate tabster attributes\n // but calling the hook will ensure that a tabster instance exists internally and avoids consumers doing the same\n useTabster();\n const strAttr = getTabsterAttribute(props, true);\n return React.useMemo(()=>({\n [TABSTER_ATTRIBUTE_NAME]: strAttr\n }), [\n strAttr\n ]);\n};\n"],"names":["useTabsterAttributes","props","useTabster","strAttr","getTabsterAttribute","React","useMemo","TABSTER_ATTRIBUTE_NAME"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;yBAN2C;4BACjC;iEACJ;AAIZ,MAAMA,uBAAuB,CAACC;IACrC,qEAAqE;IACrE,iHAAiH;IACjHC,IAAAA,sBAAU;IACV,MAAMC,UAAUC,IAAAA,4BAAmB,EAACH,OAAO;IAC3C,OAAOI,OAAMC,OAAO,CAAC,IAAK,CAAA;YAClB,CAACC,+BAAsB,CAAC,EAAEJ;QAC9B,CAAA,GAAI;QACJA;KACH;AACL"}
@@ -82,28 +82,34 @@ _export(exports, {
82
82
  return _tabster.dispatchMoverMoveFocusEvent;
83
83
  },
84
84
  MoverMoveFocusEventName: function() {
85
- return MoverMoveFocusEventName;
85
+ return _tabster.MoverMoveFocusEventName;
86
86
  },
87
87
  MoverMoveFocusEvent: function() {
88
- return MoverMoveFocusEvent;
88
+ return _tabster.MoverMoveFocusEvent;
89
89
  },
90
90
  MoverKeys: function() {
91
- return MoverKeys;
91
+ return _tabster.MoverKeys;
92
92
  },
93
93
  GroupperMoveFocusEventName: function() {
94
- return GroupperMoveFocusEventName;
94
+ return _tabster.GroupperMoveFocusEventName;
95
95
  },
96
96
  GroupperMoveFocusEvent: function() {
97
- return GroupperMoveFocusEvent;
97
+ return _tabster.GroupperMoveFocusEvent;
98
98
  },
99
99
  GroupperMoveFocusActions: function() {
100
- return GroupperMoveFocusActions;
100
+ return _tabster.GroupperMoveFocusActions;
101
101
  },
102
102
  MoverMemorizedElementEventName: function() {
103
- return MoverMemorizedElementEventName;
103
+ return _tabster.MoverMemorizedElementEventName;
104
104
  },
105
105
  MoverMemorizedElementEvent: function() {
106
- return MoverMemorizedElementEvent;
106
+ return _tabster.MoverMemorizedElementEvent;
107
+ },
108
+ TabsterMoveFocusEventName: function() {
109
+ return _tabster.TabsterMoveFocusEventName;
110
+ },
111
+ TabsterMoveFocusEvent: function() {
112
+ return _tabster.TabsterMoveFocusEvent;
107
113
  }
108
114
  });
109
115
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -112,11 +118,3 @@ const _index1 = require("./focus/index");
112
118
  const _tabster = require("tabster");
113
119
  const _keyborg = require("keyborg");
114
120
  const _tabstertypes601donotuse = /*#__PURE__*/ _interop_require_wildcard._(require("./tabster-types-6.0.1-do-not-use"));
115
- const MoverMoveFocusEventName = _tabster.Events.MoverMoveFocusEventName;
116
- const MoverMoveFocusEvent = _tabster.Events.MoverMoveFocusEvent;
117
- const MoverKeys = _tabster.Types.MoverKeys;
118
- const GroupperMoveFocusEventName = _tabster.Events.GroupperMoveFocusEventName;
119
- const GroupperMoveFocusEvent = _tabster.Events.GroupperMoveFocusEvent;
120
- const GroupperMoveFocusActions = _tabster.Types.GroupperMoveFocusActions;
121
- const MoverMemorizedElementEventName = _tabster.Events.MoverMemorizedElementEventName;
122
- const MoverMemorizedElementEvent = _tabster.Events.MoverMemorizedElementEvent;
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { useArrowNavigationGroup, useFocusableGroup, useFocusFinders, useFocusVisible, useFocusWithin, useKeyboardNavAttribute, useModalAttributes, useTabsterAttributes, useObservedElement, useFocusObserved, useMergedTabsterAttributes_unstable, useRestoreFocusSource, useRestoreFocusTarget, useUncontrolledFocus, useOnKeyboardNavigationChange, useSetKeyboardNavigation, useFocusedElementChange } from './hooks/index';\nexport { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';\nexport { applyFocusVisiblePolyfill } from './focus/index';\nimport { Types, Events, dispatchGroupperMoveFocusEvent, dispatchMoverMoveFocusEvent } from 'tabster';\nexport { KEYBORG_FOCUSIN } from 'keyborg';\n// WARNING! ATTENTION! Tabster.Types was exported from here by mistake. To avoid breaking changes,\n// we are putting a snapshot of Tabster.Types@6.0.1 and marking the entire export as deprecated.\nimport * as TabsterTypes6_0_1_DoNotUse from './tabster-types-6.0.1-do-not-use';\nexport { /** @deprecated (Do not use! Exposed by mistake and will be removed in the next major version.) */ TabsterTypes6_0_1_DoNotUse as TabsterTypes, /** @deprecated Use element.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape })) */ // eslint-disable-next-line deprecation/deprecation\ndispatchGroupperMoveFocusEvent, /** @deprecated Use element.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys.ArrowDown })) */ // eslint-disable-next-line deprecation/deprecation\ndispatchMoverMoveFocusEvent };\n/**\n * For all exports below, we don't do wildcard exports to keep Tabster API flexible. We export only required\n * parts when they are needed.\n */ export const MoverMoveFocusEventName = Events.MoverMoveFocusEventName;\nexport const MoverMoveFocusEvent = Events.MoverMoveFocusEvent;\nexport const MoverKeys = Types.MoverKeys;\nexport const GroupperMoveFocusEventName = Events.GroupperMoveFocusEventName;\nexport const GroupperMoveFocusEvent = Events.GroupperMoveFocusEvent;\nexport const GroupperMoveFocusActions = Types.GroupperMoveFocusActions;\nexport const MoverMemorizedElementEventName = Events.MoverMemorizedElementEventName;\nexport const MoverMemorizedElementEvent = Events.MoverMemorizedElementEvent;\n"],"names":["useArrowNavigationGroup","useFocusableGroup","useFocusFinders","useFocusVisible","useFocusWithin","useKeyboardNavAttribute","useModalAttributes","useTabsterAttributes","useObservedElement","useFocusObserved","useMergedTabsterAttributes_unstable","useRestoreFocusSource","useRestoreFocusTarget","useUncontrolledFocus","useOnKeyboardNavigationChange","useSetKeyboardNavigation","useFocusedElementChange","createCustomFocusIndicatorStyle","createFocusOutlineStyle","applyFocusVisiblePolyfill","KEYBORG_FOCUSIN","TabsterTypes","TabsterTypes6_0_1_DoNotUse","dispatchGroupperMoveFocusEvent","dispatchMoverMoveFocusEvent","MoverMoveFocusEventName","MoverMoveFocusEvent","MoverKeys","GroupperMoveFocusEventName","GroupperMoveFocusEvent","GroupperMoveFocusActions","MoverMemorizedElementEventName","MoverMemorizedElementEvent","Events","Types"],"mappings":";;;;;;;;;;;IAASA,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,cAAc;eAAdA,qBAAc;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,gBAAgB;eAAhBA,uBAAgB;;IAAEC,mCAAmC;eAAnCA,0CAAmC;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAChYC,+BAA+B;eAA/BA,uCAA+B;;IAAEC,uBAAuB;eAAvBA,+BAAuB;;IACxDC,yBAAyB;eAAzBA,iCAAyB;;IAEzBC,eAAe;eAAfA,wBAAe;;IAImHC,YAAY;eAA1CC;;IAA4C,mHAAmH,GAC5QC,8BAA8B;eAA9BA,uCAA8B;;IAAE,iGAAiG,GACjIC,2BAA2B;eAA3BA,oCAA2B;;IAIVC,uBAAuB;eAAvBA;;IACJC,mBAAmB;eAAnBA;;IACAC,SAAS;eAATA;;IACAC,0BAA0B;eAA1BA;;IACAC,sBAAsB;eAAtBA;;IACAC,wBAAwB;eAAxBA;;IACAC,8BAA8B;eAA9BA;;IACAC,0BAA0B;eAA1BA;;;;uBArBoY;wBACxU;yBAEkB;yBAC3D;mFAGY;AAOjC,MAAMP,0BAA0BQ,eAAM,CAACR,uBAAuB;AAClE,MAAMC,sBAAsBO,eAAM,CAACP,mBAAmB;AACtD,MAAMC,YAAYO,cAAK,CAACP,SAAS;AACjC,MAAMC,6BAA6BK,eAAM,CAACL,0BAA0B;AACpE,MAAMC,yBAAyBI,eAAM,CAACJ,sBAAsB;AAC5D,MAAMC,2BAA2BI,cAAK,CAACJ,wBAAwB;AAC/D,MAAMC,iCAAiCE,eAAM,CAACF,8BAA8B;AAC5E,MAAMC,6BAA6BC,eAAM,CAACD,0BAA0B"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { useArrowNavigationGroup, useFocusableGroup, useFocusFinders, useFocusVisible, useFocusWithin, useKeyboardNavAttribute, useModalAttributes, useTabsterAttributes, useObservedElement, useFocusObserved, useMergedTabsterAttributes_unstable, useRestoreFocusSource, useRestoreFocusTarget, useUncontrolledFocus, useOnKeyboardNavigationChange, useSetKeyboardNavigation, useFocusedElementChange } from './hooks/index';\nexport { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';\nexport { applyFocusVisiblePolyfill } from './focus/index';\nimport { dispatchGroupperMoveFocusEvent, dispatchMoverMoveFocusEvent, MoverMoveFocusEventName, MoverMoveFocusEvent, MoverKeys, GroupperMoveFocusEventName, GroupperMoveFocusEvent, GroupperMoveFocusActions, MoverMemorizedElementEventName, MoverMemorizedElementEvent, TabsterMoveFocusEventName, TabsterMoveFocusEvent } from 'tabster';\nexport { KEYBORG_FOCUSIN } from 'keyborg';\n// WARNING! ATTENTION! Tabster.Types was exported from here by mistake. To avoid breaking changes,\n// we are putting a snapshot of Tabster.Types@6.0.1 and marking the entire export as deprecated.\nimport * as TabsterTypes6_0_1_DoNotUse from './tabster-types-6.0.1-do-not-use';\nexport { /** @deprecated (Do not use! Exposed by mistake and will be removed in the next major version.) */ TabsterTypes6_0_1_DoNotUse as TabsterTypes, /** @deprecated Use element.dispatchEvent(new GroupperMoveFocusEvent({ action: GroupperMoveFocusActions.Escape })) */ // eslint-disable-next-line deprecation/deprecation\ndispatchGroupperMoveFocusEvent, /** @deprecated Use element.dispatchEvent(new MoverMoveFocusEvent({ key: MoverKeys.ArrowDown })) */ // eslint-disable-next-line deprecation/deprecation\ndispatchMoverMoveFocusEvent };\n/**\n * For all exports below, we don't do wildcard exports to keep Tabster API flexible. We export only required\n * parts when they are needed.\n */ export { MoverMoveFocusEventName, MoverMoveFocusEvent, MoverKeys };\nexport { GroupperMoveFocusEventName, GroupperMoveFocusEvent, GroupperMoveFocusActions };\nexport { MoverMemorizedElementEventName, MoverMemorizedElementEvent };\nexport { TabsterMoveFocusEventName, TabsterMoveFocusEvent };\n"],"names":["useArrowNavigationGroup","useFocusableGroup","useFocusFinders","useFocusVisible","useFocusWithin","useKeyboardNavAttribute","useModalAttributes","useTabsterAttributes","useObservedElement","useFocusObserved","useMergedTabsterAttributes_unstable","useRestoreFocusSource","useRestoreFocusTarget","useUncontrolledFocus","useOnKeyboardNavigationChange","useSetKeyboardNavigation","useFocusedElementChange","createCustomFocusIndicatorStyle","createFocusOutlineStyle","applyFocusVisiblePolyfill","KEYBORG_FOCUSIN","TabsterTypes","TabsterTypes6_0_1_DoNotUse","dispatchGroupperMoveFocusEvent","dispatchMoverMoveFocusEvent","MoverMoveFocusEventName","MoverMoveFocusEvent","MoverKeys","GroupperMoveFocusEventName","GroupperMoveFocusEvent","GroupperMoveFocusActions","MoverMemorizedElementEventName","MoverMemorizedElementEvent","TabsterMoveFocusEventName","TabsterMoveFocusEvent"],"mappings":";;;;;;;;;;;IAASA,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,cAAc;eAAdA,qBAAc;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,gBAAgB;eAAhBA,uBAAgB;;IAAEC,mCAAmC;eAAnCA,0CAAmC;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAChYC,+BAA+B;eAA/BA,uCAA+B;;IAAEC,uBAAuB;eAAvBA,+BAAuB;;IACxDC,yBAAyB;eAAzBA,iCAAyB;;IAEzBC,eAAe;eAAfA,wBAAe;;IAImHC,YAAY;eAA1CC;;IAA4C,mHAAmH,GAC5QC,8BAA8B;eAA9BA,uCAA8B;;IAAE,iGAAiG,GACjIC,2BAA2B;eAA3BA,oCAA2B;;IAIdC,uBAAuB;eAAvBA,gCAAuB;;IAAEC,mBAAmB;eAAnBA,4BAAmB;;IAAEC,SAAS;eAATA,kBAAS;;IAC3DC,0BAA0B;eAA1BA,mCAA0B;;IAAEC,sBAAsB;eAAtBA,+BAAsB;;IAAEC,wBAAwB;eAAxBA,iCAAwB;;IAC5EC,8BAA8B;eAA9BA,uCAA8B;;IAAEC,0BAA0B;eAA1BA,mCAA0B;;IAC1DC,yBAAyB;eAAzBA,kCAAyB;;IAAEC,qBAAqB;eAArBA,8BAAqB;;;;uBAjBwV;wBACxU;yBAEwP;yBACjS;mFAGY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tabster",
3
- "version": "9.21.4",
3
+ "version": "9.22.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",
@@ -20,7 +20,7 @@
20
20
  "just": "just-scripts",
21
21
  "lint": "just-scripts lint",
22
22
  "test": "jest --passWithNoTests",
23
- "type-check": "tsc -b tsconfig.json",
23
+ "type-check": "just-scripts type-check",
24
24
  "generate-api": "just-scripts generate-api",
25
25
  "test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
26
26
  },
@@ -33,11 +33,11 @@
33
33
  "dependencies": {
34
34
  "@fluentui/react-shared-contexts": "^9.19.0",
35
35
  "@fluentui/react-theme": "^9.1.19",
36
- "@fluentui/react-utilities": "^9.18.9",
36
+ "@fluentui/react-utilities": "^9.18.10",
37
37
  "@griffel/react": "^1.5.22",
38
38
  "@swc/helpers": "^0.5.1",
39
39
  "keyborg": "^2.6.0",
40
- "tabster": "^7.1.4"
40
+ "tabster": "^8.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@types/react": ">=16.14.0 <19.0.0",