@fluentui/react-tabster 9.0.0-rc.8 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.json +271 -1
  2. package/CHANGELOG.md +99 -2
  3. package/dist/index.d.ts +16 -3
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/focus/constants.js.map +1 -1
  6. package/lib/focus/createCustomFocusIndicatorStyle.js +1 -1
  7. package/lib/focus/createCustomFocusIndicatorStyle.js.map +1 -1
  8. package/lib/focus/createFocusOutlineStyle.js +1 -1
  9. package/lib/focus/createFocusOutlineStyle.js.map +1 -1
  10. package/lib/hooks/useArrowNavigationGroup.js.map +1 -1
  11. package/lib/hooks/useFocusFinders.js.map +1 -1
  12. package/lib/hooks/useFocusableGroup.js +1 -1
  13. package/lib/hooks/useFocusableGroup.js.map +1 -1
  14. package/lib/hooks/useKeyboardNavAttribute.js +4 -2
  15. package/lib/hooks/useKeyboardNavAttribute.js.map +1 -1
  16. package/lib/hooks/useModalAttributes.js +4 -2
  17. package/lib/hooks/useModalAttributes.js.map +1 -1
  18. package/lib/hooks/useTabster.js +1 -1
  19. package/lib/hooks/useTabster.js.map +1 -1
  20. package/lib/hooks/useTabsterAttributes.js +1 -0
  21. package/lib/hooks/useTabsterAttributes.js.map +1 -1
  22. package/lib-commonjs/focus/constants.js.map +1 -1
  23. package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js +1 -1
  24. package/lib-commonjs/focus/createCustomFocusIndicatorStyle.js.map +1 -1
  25. package/lib-commonjs/focus/createFocusOutlineStyle.js +1 -1
  26. package/lib-commonjs/focus/createFocusOutlineStyle.js.map +1 -1
  27. package/lib-commonjs/hooks/useArrowNavigationGroup.js.map +1 -1
  28. package/lib-commonjs/hooks/useFocusFinders.js.map +1 -1
  29. package/lib-commonjs/hooks/useFocusableGroup.js +1 -1
  30. package/lib-commonjs/hooks/useFocusableGroup.js.map +1 -1
  31. package/lib-commonjs/hooks/useKeyboardNavAttribute.js +4 -2
  32. package/lib-commonjs/hooks/useKeyboardNavAttribute.js.map +1 -1
  33. package/lib-commonjs/hooks/useModalAttributes.js +4 -2
  34. package/lib-commonjs/hooks/useModalAttributes.js.map +1 -1
  35. package/lib-commonjs/hooks/useTabster.js +1 -1
  36. package/lib-commonjs/hooks/useTabster.js.map +1 -1
  37. package/lib-commonjs/hooks/useTabsterAttributes.js +1 -0
  38. package/lib-commonjs/hooks/useTabsterAttributes.js.map +1 -1
  39. package/lib-commonjs/index.js.map +1 -1
  40. package/package.json +10 -11
  41. package/lib/focus/constants.d.ts +0 -6
  42. package/lib/focus/createCustomFocusIndicatorStyle.d.ts +0 -12
  43. package/lib/focus/createFocusOutlineStyle.d.ts +0 -24
  44. package/lib/focus/index.d.ts +0 -2
  45. package/lib/hooks/index.d.ts +0 -6
  46. package/lib/hooks/useArrowNavigationGroup.d.ts +0 -26
  47. package/lib/hooks/useFocusFinders.d.ts +0 -11
  48. package/lib/hooks/useFocusableGroup.d.ts +0 -12
  49. package/lib/hooks/useKeyboardNavAttribute.d.ts +0 -5
  50. package/lib/hooks/useModalAttributes.d.ts +0 -22
  51. package/lib/hooks/useTabster.d.ts +0 -9
  52. package/lib/hooks/useTabsterAttributes.d.ts +0 -5
  53. package/lib/index.d.ts +0 -4
  54. package/lib-commonjs/focus/constants.d.ts +0 -6
  55. package/lib-commonjs/focus/createCustomFocusIndicatorStyle.d.ts +0 -12
  56. package/lib-commonjs/focus/createFocusOutlineStyle.d.ts +0 -24
  57. package/lib-commonjs/focus/index.d.ts +0 -2
  58. package/lib-commonjs/hooks/index.d.ts +0 -6
  59. package/lib-commonjs/hooks/useArrowNavigationGroup.d.ts +0 -26
  60. package/lib-commonjs/hooks/useFocusFinders.d.ts +0 -11
  61. package/lib-commonjs/hooks/useFocusableGroup.d.ts +0 -12
  62. package/lib-commonjs/hooks/useKeyboardNavAttribute.d.ts +0 -5
  63. package/lib-commonjs/hooks/useModalAttributes.d.ts +0 -22
  64. package/lib-commonjs/hooks/useTabster.d.ts +0 -9
  65. package/lib-commonjs/hooks/useTabsterAttributes.d.ts +0 -5
  66. package/lib-commonjs/index.d.ts +0 -4
@@ -1,26 +0,0 @@
1
- import { Types } from 'tabster';
2
- export interface UseArrowNavigationGroupOptions {
3
- /**
4
- * Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally
5
- * @defaultValue vertical
6
- */
7
- axis?: 'vertical' | 'horizontal' | 'grid';
8
- /**
9
- * Focus will cycle to the first/last elements of the group without stopping
10
- */
11
- circular?: boolean;
12
- /**
13
- * Last focused element in the group will be remembered and focused (if still
14
- * available) when tabbing from outside of the group
15
- */
16
- memorizeCurrent?: boolean;
17
- /**
18
- * Allow tabbing within the arrow navigation group items.
19
- */
20
- tabbable?: boolean;
21
- }
22
- /**
23
- * A hook that returns the necessary tabster attributes to support arrow key navigation
24
- * @param options - Options to configure keyboard navigation
25
- */
26
- export declare const useArrowNavigationGroup: (options?: UseArrowNavigationGroupOptions | undefined) => Types.TabsterDOMAttribute;
@@ -1,11 +0,0 @@
1
- import { Types as TabsterTypes } from 'tabster';
2
- /**
3
- * Returns a set of helper functions that will traverse focusable elements in the context of a root DOM element
4
- */
5
- export declare const useFocusFinders: () => {
6
- findAllFocusable: (container: HTMLElement, acceptCondition: (el: HTMLElement) => boolean) => HTMLElement[];
7
- findFirstFocusable: (container: HTMLElement) => HTMLElement | null | undefined;
8
- findLastFocusable: (container: HTMLElement) => HTMLElement | null | undefined;
9
- findNextFocusable: (currentElement: HTMLElement, options?: Pick<TabsterTypes.FindNextProps, 'container'>) => HTMLElement | null | undefined;
10
- findPrevFocusable: (currentElement: HTMLElement, options?: Pick<TabsterTypes.FindNextProps, 'container'>) => HTMLElement | null | undefined;
11
- };
@@ -1,12 +0,0 @@
1
- import { Types } from 'tabster';
2
- export interface UseFocusableGroupOptions {
3
- /**
4
- * Behavior for the Tab key.
5
- */
6
- tabBehavior?: 'unlimited' | 'limited' | 'limitedTrapFocus';
7
- }
8
- /**
9
- * A hook that returns the necessary tabster attributes to support groupping.
10
- * @param options - Options to configure keyboard navigation
11
- */
12
- export declare const useFocusableGroup: (options?: UseFocusableGroupOptions | undefined) => Types.TabsterDOMAttribute;
@@ -1,5 +0,0 @@
1
- import type { RefObject } from 'react';
2
- /**
3
- * instantiates keyborg and add attribute to ensure focus indicator synced to keyborg logic
4
- */
5
- export declare function useKeyboardNavAttribute<E extends HTMLElement>(): RefObject<E>;
@@ -1,22 +0,0 @@
1
- import { Types as TabsterTypes } from 'tabster';
2
- export interface UseModalAttributesOptions {
3
- /**
4
- * Traps focus inside the elements the attributes are applied
5
- */
6
- trapFocus?: boolean;
7
- /**
8
- * Always reachabled in Tab order
9
- */
10
- alwaysFocusable?: boolean;
11
- }
12
- /**
13
- * Applies modal dialog behaviour through DOM attributes
14
- * Modal element will focus trap and hide other content on the page
15
- * The trigger element will be focused if focus is lost after the modal element is removed
16
- *
17
- * @returns DOM attributes to apply to the modal element and its trigger
18
- */
19
- export declare const useModalAttributes: (options?: UseModalAttributesOptions) => {
20
- modalAttributes: TabsterTypes.TabsterDOMAttribute;
21
- triggerAttributes: TabsterTypes.TabsterDOMAttribute;
22
- };
@@ -1,9 +0,0 @@
1
- import { Types as TabsterTypes } from 'tabster';
2
- /**
3
- * Tries to get a tabster instance on the current window or creates a new one
4
- * Since Tabster is single instance only, feel free to call this hook to ensure Tabster exists if necessary
5
- *
6
- * @internal
7
- * @returns Tabster core instance
8
- */
9
- export declare const useTabster: () => TabsterTypes.TabsterCore | null;
@@ -1,5 +0,0 @@
1
- import { Types as TabsterTypes } from 'tabster';
2
- /**
3
- * Hook that returns tabster attributes while ensuring tabster exists
4
- */
5
- export declare const useTabsterAttributes: (props: TabsterTypes.TabsterAttributeProps) => TabsterTypes.TabsterDOMAttribute;
@@ -1,4 +0,0 @@
1
- export { useArrowNavigationGroup, useFocusableGroup, useFocusFinders, useKeyboardNavAttribute, useModalAttributes, useTabsterAttributes, } from './hooks/index';
2
- export type { UseArrowNavigationGroupOptions, UseFocusableGroupOptions, UseModalAttributesOptions, } from './hooks/index';
3
- export { createCustomFocusIndicatorStyle, createFocusOutlineStyle } from './focus/index';
4
- export type { CreateCustomFocusIndicatorStyleOptions, CreateFocusOutlineStyleOptions, FocusOutlineOffset, FocusOutlineStyleOptions, } from './focus/index';