@fluentui/react-tabster
Advanced tools
Comparing version 9.23.0 to 9.23.1
@@ -17,3 +17,2 @@ import { dispatchGroupperMoveFocusEvent } from 'tabster'; | ||
import * as React_2 from 'react'; | ||
import type { RefObject } from 'react'; | ||
import { TabsterMoveFocusEvent } from 'tabster'; | ||
@@ -1453,3 +1452,3 @@ import { TabsterMoveFocusEventName } from 'tabster'; | ||
*/ | ||
export declare function useKeyboardNavAttribute<E extends HTMLElement>(): RefObject<E>; | ||
export declare function useKeyboardNavAttribute<E extends HTMLElement>(): React_2.RefObject<E>; | ||
@@ -1456,0 +1455,0 @@ /** |
@@ -5,6 +5,25 @@ "use strict"; | ||
}); | ||
const _export_star = require("@swc/helpers/_/_export_star"); | ||
_export_star._(require("./createCustomFocusIndicatorStyle"), exports); | ||
_export_star._(require("./createFocusOutlineStyle"), exports); | ||
_export_star._(require("./focusVisiblePolyfill"), exports); | ||
_export_star._(require("./focusWithinPolyfill"), exports); | ||
function _export(target, all) { | ||
for(var name in all)Object.defineProperty(target, name, { | ||
enumerable: true, | ||
get: all[name] | ||
}); | ||
} | ||
_export(exports, { | ||
applyFocusVisiblePolyfill: function() { | ||
return _focusVisiblePolyfill.applyFocusVisiblePolyfill; | ||
}, | ||
applyFocusWithinPolyfill: function() { | ||
return _focusWithinPolyfill.applyFocusWithinPolyfill; | ||
}, | ||
createCustomFocusIndicatorStyle: function() { | ||
return _createCustomFocusIndicatorStyle.createCustomFocusIndicatorStyle; | ||
}, | ||
createFocusOutlineStyle: function() { | ||
return _createFocusOutlineStyle.createFocusOutlineStyle; | ||
} | ||
}); | ||
const _createCustomFocusIndicatorStyle = require("./createCustomFocusIndicatorStyle"); | ||
const _createFocusOutlineStyle = require("./createFocusOutlineStyle"); | ||
const _focusVisiblePolyfill = require("./focusVisiblePolyfill"); | ||
const _focusWithinPolyfill = require("./focusWithinPolyfill"); |
@@ -5,19 +5,80 @@ "use strict"; | ||
}); | ||
const _export_star = require("@swc/helpers/_/_export_star"); | ||
_export_star._(require("./useArrowNavigationGroup"), exports); | ||
_export_star._(require("./useFocusableGroup"), exports); | ||
_export_star._(require("./useFocusFinders"), exports); | ||
_export_star._(require("./useFocusVisible"), exports); | ||
_export_star._(require("./useFocusWithin"), exports); | ||
_export_star._(require("./useKeyboardNavAttribute"), exports); | ||
_export_star._(require("./useOnKeyboardNavigationChange"), exports); | ||
_export_star._(require("./useModalAttributes"), exports); | ||
_export_star._(require("./useTabsterAttributes"), exports); | ||
_export_star._(require("./useObservedElement"), exports); | ||
_export_star._(require("./useMergeTabsterAttributes"), exports); | ||
_export_star._(require("./useFocusObserved"), exports); | ||
_export_star._(require("./useRestoreFocus"), exports); | ||
_export_star._(require("./useUncontrolledFocus"), exports); | ||
_export_star._(require("./useIsNavigatingWithKeyboard"), exports); | ||
_export_star._(require("./useSetKeyboardNavigation"), exports); | ||
_export_star._(require("./useFocusedElementChange"), exports); | ||
function _export(target, all) { | ||
for(var name in all)Object.defineProperty(target, name, { | ||
enumerable: true, | ||
get: all[name] | ||
}); | ||
} | ||
_export(exports, { | ||
useArrowNavigationGroup: function() { | ||
return _useArrowNavigationGroup.useArrowNavigationGroup; | ||
}, | ||
useFocusFinders: function() { | ||
return _useFocusFinders.useFocusFinders; | ||
}, | ||
useFocusObserved: function() { | ||
return _useFocusObserved.useFocusObserved; | ||
}, | ||
useFocusVisible: function() { | ||
return _useFocusVisible.useFocusVisible; | ||
}, | ||
useFocusWithin: function() { | ||
return _useFocusWithin.useFocusWithin; | ||
}, | ||
useFocusableGroup: function() { | ||
return _useFocusableGroup.useFocusableGroup; | ||
}, | ||
useFocusedElementChange: function() { | ||
return _useFocusedElementChange.useFocusedElementChange; | ||
}, | ||
useIsNavigatingWithKeyboard: function() { | ||
return _useIsNavigatingWithKeyboard.useIsNavigatingWithKeyboard; | ||
}, | ||
useKeyboardNavAttribute: function() { | ||
return _useKeyboardNavAttribute.useKeyboardNavAttribute; | ||
}, | ||
useMergedTabsterAttributes_unstable: function() { | ||
return _useMergeTabsterAttributes.useMergedTabsterAttributes_unstable; | ||
}, | ||
useModalAttributes: function() { | ||
return _useModalAttributes.useModalAttributes; | ||
}, | ||
useObservedElement: function() { | ||
return _useObservedElement.useObservedElement; | ||
}, | ||
useOnKeyboardNavigationChange: function() { | ||
return _useOnKeyboardNavigationChange.useOnKeyboardNavigationChange; | ||
}, | ||
useRestoreFocusSource: function() { | ||
return _useRestoreFocus.useRestoreFocusSource; | ||
}, | ||
useRestoreFocusTarget: function() { | ||
return _useRestoreFocus.useRestoreFocusTarget; | ||
}, | ||
useSetKeyboardNavigation: function() { | ||
return _useSetKeyboardNavigation.useSetKeyboardNavigation; | ||
}, | ||
useTabsterAttributes: function() { | ||
return _useTabsterAttributes.useTabsterAttributes; | ||
}, | ||
useUncontrolledFocus: function() { | ||
return _useUncontrolledFocus.useUncontrolledFocus; | ||
} | ||
}); | ||
const _useArrowNavigationGroup = require("./useArrowNavigationGroup"); | ||
const _useFocusableGroup = require("./useFocusableGroup"); | ||
const _useFocusFinders = require("./useFocusFinders"); | ||
const _useFocusVisible = require("./useFocusVisible"); | ||
const _useFocusWithin = require("./useFocusWithin"); | ||
const _useKeyboardNavAttribute = require("./useKeyboardNavAttribute"); | ||
const _useOnKeyboardNavigationChange = require("./useOnKeyboardNavigationChange"); | ||
const _useModalAttributes = require("./useModalAttributes"); | ||
const _useTabsterAttributes = require("./useTabsterAttributes"); | ||
const _useObservedElement = require("./useObservedElement"); | ||
const _useMergeTabsterAttributes = require("./useMergeTabsterAttributes"); | ||
const _useFocusObserved = require("./useFocusObserved"); | ||
const _useRestoreFocus = require("./useRestoreFocus"); | ||
const _useUncontrolledFocus = require("./useUncontrolledFocus"); | ||
const _useIsNavigatingWithKeyboard = require("./useIsNavigatingWithKeyboard"); | ||
const _useSetKeyboardNavigation = require("./useSetKeyboardNavigation"); | ||
const _useFocusedElementChange = require("./useFocusedElementChange"); |
@@ -11,4 +11,5 @@ "use strict"; | ||
}); | ||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard"); | ||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react")); | ||
const _keyborg = require("keyborg"); | ||
const _react = require("react"); | ||
const _constants = require("../focus/constants"); | ||
@@ -18,7 +19,7 @@ const _reactsharedcontexts = require("@fluentui/react-shared-contexts"); | ||
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)(); | ||
const keyborg = (0, _react.useMemo)(()=>targetDocument && (0, _keyborg.createKeyborg)(targetDocument.defaultView), [ | ||
const keyborg = _react.useMemo(()=>targetDocument && (0, _keyborg.createKeyborg)(targetDocument.defaultView), [ | ||
targetDocument | ||
]); | ||
const ref = (0, _react.useRef)(null); | ||
(0, _react.useEffect)(()=>{ | ||
const ref = _react.useRef(null); | ||
_react.useEffect(()=>{ | ||
if (keyborg) { | ||
@@ -25,0 +26,0 @@ setBooleanAttribute(ref, _constants.KEYBOARD_NAV_ATTRIBUTE, keyborg.isNavigatingWithKeyboard()); |
@@ -1,4 +0,4 @@ | ||
export * from './createCustomFocusIndicatorStyle'; | ||
export * from './createFocusOutlineStyle'; | ||
export * from './focusVisiblePolyfill'; | ||
export * from './focusWithinPolyfill'; | ||
export { createCustomFocusIndicatorStyle } from './createCustomFocusIndicatorStyle'; | ||
export { createFocusOutlineStyle } from './createFocusOutlineStyle'; | ||
export { applyFocusVisiblePolyfill } from './focusVisiblePolyfill'; | ||
export { applyFocusWithinPolyfill } from './focusWithinPolyfill'; |
@@ -1,17 +0,17 @@ | ||
export * from './useArrowNavigationGroup'; | ||
export * from './useFocusableGroup'; | ||
export * from './useFocusFinders'; | ||
export * from './useFocusVisible'; | ||
export * from './useFocusWithin'; | ||
export * from './useKeyboardNavAttribute'; | ||
export * from './useOnKeyboardNavigationChange'; | ||
export * from './useModalAttributes'; | ||
export * from './useTabsterAttributes'; | ||
export * from './useObservedElement'; | ||
export * from './useMergeTabsterAttributes'; | ||
export * from './useFocusObserved'; | ||
export * from './useRestoreFocus'; | ||
export * from './useUncontrolledFocus'; | ||
export * from './useIsNavigatingWithKeyboard'; | ||
export * from './useSetKeyboardNavigation'; | ||
export * from './useFocusedElementChange'; | ||
export { useArrowNavigationGroup } from './useArrowNavigationGroup'; | ||
export { useFocusableGroup } from './useFocusableGroup'; | ||
export { useFocusFinders } from './useFocusFinders'; | ||
export { useFocusVisible } from './useFocusVisible'; | ||
export { useFocusWithin } from './useFocusWithin'; | ||
export { useKeyboardNavAttribute } from './useKeyboardNavAttribute'; | ||
export { useOnKeyboardNavigationChange } from './useOnKeyboardNavigationChange'; | ||
export { useModalAttributes } from './useModalAttributes'; | ||
export { useTabsterAttributes } from './useTabsterAttributes'; | ||
export { useObservedElement } from './useObservedElement'; | ||
export { useMergedTabsterAttributes_unstable } from './useMergeTabsterAttributes'; | ||
export { useFocusObserved } from './useFocusObserved'; | ||
export { useRestoreFocusSource, useRestoreFocusTarget } from './useRestoreFocus'; | ||
export { useUncontrolledFocus } from './useUncontrolledFocus'; | ||
export { useIsNavigatingWithKeyboard } from './useIsNavigatingWithKeyboard'; | ||
export { useSetKeyboardNavigation } from './useSetKeyboardNavigation'; | ||
export { useFocusedElementChange } from './useFocusedElementChange'; |
@@ -0,3 +1,3 @@ | ||
import * as React from 'react'; | ||
import { createKeyborg } from 'keyborg'; | ||
import { useEffect, useMemo, useRef } from 'react'; | ||
import { KEYBOARD_NAV_ATTRIBUTE } from '../focus/constants'; | ||
@@ -11,7 +11,7 @@ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts'; | ||
const { targetDocument } = useFluent(); | ||
const keyborg = useMemo(()=>targetDocument && createKeyborg(targetDocument.defaultView), [ | ||
const keyborg = React.useMemo(()=>targetDocument && createKeyborg(targetDocument.defaultView), [ | ||
targetDocument | ||
]); | ||
const ref = useRef(null); | ||
useEffect(()=>{ | ||
const ref = React.useRef(null); | ||
React.useEffect(()=>{ | ||
if (keyborg) { | ||
@@ -18,0 +18,0 @@ setBooleanAttribute(ref, KEYBOARD_NAV_ATTRIBUTE, keyborg.isNavigatingWithKeyboard()); |
{ | ||
"name": "@fluentui/react-tabster", | ||
"version": "9.23.0", | ||
"version": "9.23.1", | ||
"description": "Utilities for focus management and facade for tabster", | ||
@@ -20,5 +20,5 @@ "main": "lib-commonjs/index.js", | ||
"dependencies": { | ||
"@fluentui/react-shared-contexts": "^9.21.0", | ||
"@fluentui/react-theme": "^9.1.22", | ||
"@fluentui/react-utilities": "^9.18.17", | ||
"@fluentui/react-shared-contexts": "^9.21.1", | ||
"@fluentui/react-theme": "^9.1.23", | ||
"@fluentui/react-utilities": "^9.18.18", | ||
"@griffel/react": "^1.5.22", | ||
@@ -25,0 +25,0 @@ "@swc/helpers": "^0.5.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
477337
3680