Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
import { ImmutableSet } from '../utils/ImmutableSet';
import { ImmutableMap } from '../utils/ImmutableMap';
/**
* @internal
*/ const defaultTreeContextValue = {
level: 0,
contextType: 'root',
treeType: 'nested',
selectionMode: 'none',
openItems: ImmutableSet.empty,
checkedItems: ImmutableMap.empty,
requestTreeResponse: noop,
forceUpdateRovingTabIndex: noop,
appearance: 'subtle',
size: 'medium',
navigationMode: 'tree'
};
function noop() {
/* noop */ }
/**
* @internal
*/ export const TreeContext = createContext(undefined);
export const useTreeContext_unstable = (selector)=>useContextSelector(TreeContext, (ctx = defaultTreeContextValue)=>selector(ctx));