Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

View File

@@ -0,0 +1,78 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useFocusFinders", {
enumerable: true,
get: function() {
return useFocusFinders;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const _useTabster = require("./useTabster");
const useFocusFinders = ()=>{
const tabsterRef = (0, _useTabster.useTabster)();
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
// Narrow props for now and let need dictate additional props in the future
const findAllFocusable = _react.useCallback((container, acceptCondition)=>{
var _tabsterRef_current;
return container && ((_tabsterRef_current = tabsterRef.current) === null || _tabsterRef_current === void 0 ? void 0 : _tabsterRef_current.focusable.findAll({
container,
acceptCondition
})) || [];
}, [
tabsterRef
]);
const findFirstFocusable = _react.useCallback((container)=>{
var _tabsterRef_current;
return container && ((_tabsterRef_current = tabsterRef.current) === null || _tabsterRef_current === void 0 ? void 0 : _tabsterRef_current.focusable.findFirst({
container
}));
}, [
tabsterRef
]);
const findLastFocusable = _react.useCallback((container)=>{
var _tabsterRef_current;
return container && ((_tabsterRef_current = tabsterRef.current) === null || _tabsterRef_current === void 0 ? void 0 : _tabsterRef_current.focusable.findLast({
container
}));
}, [
tabsterRef
]);
const findNextFocusable = _react.useCallback((currentElement, options = {})=>{
if (!tabsterRef.current || !targetDocument || !currentElement) {
return null;
}
const { container = targetDocument.body } = options;
return tabsterRef.current.focusable.findNext({
currentElement,
container
});
}, [
tabsterRef,
targetDocument
]);
const findPrevFocusable = _react.useCallback((currentElement, options = {})=>{
if (!tabsterRef.current || !targetDocument || !currentElement) {
return null;
}
const { container = targetDocument.body } = options;
return tabsterRef.current.focusable.findPrev({
currentElement,
container
});
}, [
tabsterRef,
targetDocument
]);
return {
findAllFocusable,
findFirstFocusable,
findLastFocusable,
findNextFocusable,
findPrevFocusable
};
};