-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-headless-components-preview): add headless Tree component family #36058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
dmytrokirpa
wants to merge
3
commits into
microsoft:master
Choose a base branch
from
dmytrokirpa:feat/headless-tree
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
590d327
test(react-tree): add unit tests for useTree_unstable, useFlatTree_un…
dmytrokirpa e4c8de8
feat(react-tree): export useTreeItemPersonaLayoutContextValues_unstab…
dmytrokirpa 0c79341
feat(react-headless-components-preview): add headless Tree component …
dmytrokirpa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
change/@fluentui-react-tree-bbd9207d-d370-4635-b213-bbe2b2d53a24.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Export useTreeItemPersonaLayoutContextValues_unstable and TreeItemPersonaLayoutContextValues from @fluentui/react-tree", | ||
| "packageName": "@fluentui/react-tree", | ||
| "email": "dmytrokirpa@microsoft.com", | ||
| "dependentChangeType": "patch", | ||
| "date": "2026-04-26T20:21:03.202Z" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
packages/react-components/react-headless-components-preview/library/src/Tree.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| export { Tree, renderTree, useTree, useTreeContextValues } from './components/Tree'; | ||
| export type { | ||
| TreeSlots, | ||
| TreeProps, | ||
| TreeState, | ||
| TreeContextValues, | ||
| TreeCheckedChangeData, | ||
| TreeCheckedChangeEvent, | ||
| TreeNavigationData_unstable, | ||
| TreeNavigationEvent_unstable, | ||
| TreeNavigationDataParam, | ||
| TreeNavigationMode, | ||
| TreeOpenChangeData, | ||
| TreeOpenChangeEvent, | ||
| TreeSelectionValue, | ||
| } from './components/Tree'; | ||
|
|
||
| export { | ||
| FlatTree, | ||
| renderFlatTree, | ||
| useFlatTree, | ||
| useFlatTreeContextValues, | ||
| useHeadlessFlatTree, | ||
| } from './components/Tree/FlatTree'; | ||
| export type { | ||
| FlatTreeSlots, | ||
| FlatTreeProps, | ||
| FlatTreeState, | ||
| FlatTreeContextValues, | ||
| HeadlessFlatTree, | ||
| HeadlessFlatTreeItem, | ||
| HeadlessFlatTreeItemProps, | ||
| HeadlessFlatTreeOptions, | ||
| } from './components/Tree/FlatTree'; | ||
|
|
||
| export { FlatTreeItem } from './components/Tree/FlatTreeItem'; | ||
| export type { FlatTreeItemProps } from './components/Tree/FlatTreeItem'; | ||
|
|
||
| export { TreeItem, renderTreeItem, useTreeItem, useTreeItemContextValues } from './components/Tree/TreeItem'; | ||
| export type { | ||
| TreeItemSlots, | ||
| TreeItemProps, | ||
| TreeItemState, | ||
| TreeItemContextValues, | ||
| TreeItemType, | ||
| TreeItemValue, | ||
| TreeItemCSSProperties, | ||
| TreeItemOpenChangeData, | ||
| TreeItemOpenChangeEvent, | ||
| } from './components/Tree/TreeItem'; | ||
|
|
||
| export { TreeItemLayout, renderTreeItemLayout, useTreeItemLayout } from './components/Tree/TreeItemLayout'; | ||
| export type { | ||
| TreeItemLayoutSlots, | ||
| TreeItemLayoutProps, | ||
| TreeItemLayoutState, | ||
| TreeItemLayoutActionSlotProps, | ||
| TreeItemLayoutActionVisibilityChangeData, | ||
| } from './components/Tree/TreeItemLayout'; | ||
|
|
||
| export { | ||
| TreeItemPersonaLayout, | ||
| renderTreeItemPersonaLayout, | ||
| useTreeItemPersonaLayout, | ||
| useTreeItemPersonaLayoutContextValues, | ||
| } from './components/Tree/TreeItemPersonaLayout'; | ||
| export type { | ||
| TreeItemPersonaLayoutSlots, | ||
| TreeItemPersonaLayoutProps, | ||
| TreeItemPersonaLayoutState, | ||
| TreeItemPersonaLayoutContextValues, | ||
| } from './components/Tree/TreeItemPersonaLayout'; |
13 changes: 13 additions & 0 deletions
13
...nents/react-headless-components-preview/library/src/components/Tree/FlatTree/FlatTree.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| 'use client'; | ||
| import * as React from 'react'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import type { FlatTreeProps } from './FlatTree.types'; | ||
| import { useFlatTree, useFlatTreeContextValues } from './useFlatTree'; | ||
| import { renderFlatTree } from './renderFlatTree'; | ||
|
|
||
| export const FlatTree: ForwardRefComponent<FlatTreeProps> = React.forwardRef((props, ref) => { | ||
| const state = useFlatTree(props, ref); | ||
| const contextValues = useFlatTreeContextValues(state); | ||
| return renderFlatTree(state, contextValues); | ||
| }); | ||
| FlatTree.displayName = 'FlatTree'; |
10 changes: 10 additions & 0 deletions
10
.../react-headless-components-preview/library/src/components/Tree/FlatTree/FlatTree.types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export type { | ||
| FlatTreeSlots, | ||
| FlatTreeProps, | ||
| FlatTreeState, | ||
| FlatTreeContextValues, | ||
| HeadlessFlatTree, | ||
| HeadlessFlatTreeItem, | ||
| HeadlessFlatTreeItemProps, | ||
| HeadlessFlatTreeOptions, | ||
| } from '@fluentui/react-tree'; |
13 changes: 13 additions & 0 deletions
13
...omponents/react-headless-components-preview/library/src/components/Tree/FlatTree/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| export { FlatTree } from './FlatTree'; | ||
| export { renderFlatTree } from './renderFlatTree'; | ||
| export { useFlatTree, useFlatTreeContextValues, useHeadlessFlatTree } from './useFlatTree'; | ||
| export type { | ||
| FlatTreeSlots, | ||
| FlatTreeProps, | ||
| FlatTreeState, | ||
| FlatTreeContextValues, | ||
| HeadlessFlatTree, | ||
| HeadlessFlatTreeItem, | ||
| HeadlessFlatTreeItemProps, | ||
| HeadlessFlatTreeOptions, | ||
| } from './FlatTree.types'; |
2 changes: 2 additions & 0 deletions
2
.../react-headless-components-preview/library/src/components/Tree/FlatTree/renderFlatTree.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { renderFlatTree_unstable as renderFlatTree } from '@fluentui/react-tree'; |
12 changes: 12 additions & 0 deletions
12
...nts/react-headless-components-preview/library/src/components/Tree/FlatTree/useFlatTree.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 'use client'; | ||
| import { | ||
| useFlatTree_unstable, | ||
| useFlatTreeContextValues_unstable, | ||
| useHeadlessFlatTree_unstable, | ||
| } from '@fluentui/react-tree'; | ||
| import type { FlatTreeState, FlatTreeContextValues } from './FlatTree.types'; | ||
| export const useFlatTree = useFlatTree_unstable; | ||
| export const useFlatTreeContextValues = useFlatTreeContextValues_unstable as ( | ||
| state: FlatTreeState, | ||
| ) => FlatTreeContextValues; | ||
| export const useHeadlessFlatTree = useHeadlessFlatTree_unstable; |
2 changes: 2 additions & 0 deletions
2
...act-headless-components-preview/library/src/components/Tree/FlatTreeItem/FlatTreeItem.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { FlatTreeItem } from '@fluentui/react-tree'; |
1 change: 1 addition & 0 deletions
1
...eadless-components-preview/library/src/components/Tree/FlatTreeItem/FlatTreeItem.types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export type { FlatTreeItemProps } from '@fluentui/react-tree'; |
2 changes: 2 additions & 0 deletions
2
...nents/react-headless-components-preview/library/src/components/Tree/FlatTreeItem/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export { FlatTreeItem } from './FlatTreeItem'; | ||
| export type { FlatTreeItemProps } from './FlatTreeItem.types'; |
15 changes: 15 additions & 0 deletions
15
...ct-components/react-headless-components-preview/library/src/components/Tree/Tree.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import * as React from 'react'; | ||
| import { render } from '@testing-library/react'; | ||
| import { Tree } from './Tree'; | ||
|
|
||
| describe('Tree', () => { | ||
| it('renders without crashing', () => { | ||
| const { container } = render(<Tree />); | ||
| expect(container.firstChild).toBeTruthy(); | ||
| }); | ||
|
|
||
| it('applies className', () => { | ||
| const { container } = render(<Tree className="custom" />); | ||
| expect(container.firstChild).toHaveClass('custom'); | ||
| }); | ||
| }); |
13 changes: 13 additions & 0 deletions
13
...s/react-components/react-headless-components-preview/library/src/components/Tree/Tree.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| 'use client'; | ||
| import * as React from 'react'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import type { TreeProps } from './Tree.types'; | ||
| import { useTree, useTreeContextValues } from './useTree'; | ||
| import { renderTree } from './renderTree'; | ||
|
|
||
| export const Tree: ForwardRefComponent<TreeProps> = React.forwardRef((props, ref) => { | ||
| const state = useTree(props, ref); | ||
| const contextValues = useTreeContextValues(state); | ||
| return renderTree(state, contextValues); | ||
| }); | ||
| Tree.displayName = 'Tree'; |
15 changes: 15 additions & 0 deletions
15
...ct-components/react-headless-components-preview/library/src/components/Tree/Tree.types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| export type { | ||
| TreeSlots, | ||
| TreeProps, | ||
| TreeState, | ||
| TreeContextValues, | ||
| TreeCheckedChangeData, | ||
| TreeCheckedChangeEvent, | ||
| TreeNavigationData_unstable, | ||
| TreeNavigationEvent_unstable, | ||
| TreeNavigationDataParam, | ||
| TreeNavigationMode, | ||
| TreeOpenChangeData, | ||
| TreeOpenChangeEvent, | ||
| TreeSelectionValue, | ||
| } from '@fluentui/react-tree'; |
13 changes: 13 additions & 0 deletions
13
...nents/react-headless-components-preview/library/src/components/Tree/TreeItem/TreeItem.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| 'use client'; | ||
| import * as React from 'react'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import type { TreeItemProps } from './TreeItem.types'; | ||
| import { useTreeItem, useTreeItemContextValues } from './useTreeItem'; | ||
| import { renderTreeItem } from './renderTreeItem'; | ||
|
|
||
| export const TreeItem: ForwardRefComponent<TreeItemProps> = React.forwardRef((props, ref) => { | ||
| const state = useTreeItem(props, ref); | ||
| const contextValues = useTreeItemContextValues(state); | ||
| return renderTreeItem(state, contextValues); | ||
| }); | ||
| TreeItem.displayName = 'TreeItem'; |
11 changes: 11 additions & 0 deletions
11
.../react-headless-components-preview/library/src/components/Tree/TreeItem/TreeItem.types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| export type { | ||
| TreeItemSlots, | ||
| TreeItemProps, | ||
| TreeItemState, | ||
| TreeItemContextValues, | ||
| TreeItemType, | ||
| TreeItemValue, | ||
| TreeItemCSSProperties, | ||
| TreeItemOpenChangeData, | ||
| TreeItemOpenChangeEvent, | ||
| } from '@fluentui/react-tree'; |
14 changes: 14 additions & 0 deletions
14
...omponents/react-headless-components-preview/library/src/components/Tree/TreeItem/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| export { TreeItem } from './TreeItem'; | ||
| export { renderTreeItem } from './renderTreeItem'; | ||
| export { useTreeItem, useTreeItemContextValues } from './useTreeItem'; | ||
| export type { | ||
| TreeItemSlots, | ||
| TreeItemProps, | ||
| TreeItemState, | ||
| TreeItemContextValues, | ||
| TreeItemType, | ||
| TreeItemValue, | ||
| TreeItemCSSProperties, | ||
| TreeItemOpenChangeData, | ||
| TreeItemOpenChangeEvent, | ||
| } from './TreeItem.types'; |
2 changes: 2 additions & 0 deletions
2
.../react-headless-components-preview/library/src/components/Tree/TreeItem/renderTreeItem.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { renderTreeItem_unstable as renderTreeItem } from '@fluentui/react-tree'; |
7 changes: 7 additions & 0 deletions
7
...nts/react-headless-components-preview/library/src/components/Tree/TreeItem/useTreeItem.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| 'use client'; | ||
| import { useTreeItem_unstable, useTreeItemContextValues_unstable } from '@fluentui/react-tree'; | ||
| import type { TreeItemState, TreeItemContextValues } from './TreeItem.types'; | ||
| export const useTreeItem = useTreeItem_unstable; | ||
| export const useTreeItemContextValues = useTreeItemContextValues_unstable as ( | ||
| state: TreeItemState, | ||
| ) => TreeItemContextValues; |
11 changes: 11 additions & 0 deletions
11
...headless-components-preview/library/src/components/Tree/TreeItemLayout/TreeItemLayout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| 'use client'; | ||
| import * as React from 'react'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import type { TreeItemLayoutProps } from './TreeItemLayout.types'; | ||
| import { useTreeItemLayout } from './useTreeItemLayout'; | ||
| import { renderTreeItemLayout } from './renderTreeItemLayout'; | ||
|
|
||
| export const TreeItemLayout: ForwardRefComponent<TreeItemLayoutProps> = React.forwardRef((props, ref) => { | ||
| return renderTreeItemLayout(useTreeItemLayout(props, ref)); | ||
| }); | ||
| TreeItemLayout.displayName = 'TreeItemLayout'; |
7 changes: 7 additions & 0 deletions
7
...ess-components-preview/library/src/components/Tree/TreeItemLayout/TreeItemLayout.types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export type { | ||
| TreeItemLayoutSlots, | ||
| TreeItemLayoutProps, | ||
| TreeItemLayoutState, | ||
| TreeItemLayoutActionSlotProps, | ||
| TreeItemLayoutActionVisibilityChangeData, | ||
| } from '@fluentui/react-tree'; |
10 changes: 10 additions & 0 deletions
10
...nts/react-headless-components-preview/library/src/components/Tree/TreeItemLayout/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export { TreeItemLayout } from './TreeItemLayout'; | ||
| export { renderTreeItemLayout } from './renderTreeItemLayout'; | ||
| export { useTreeItemLayout } from './useTreeItemLayout'; | ||
| export type { | ||
| TreeItemLayoutSlots, | ||
| TreeItemLayoutProps, | ||
| TreeItemLayoutState, | ||
| TreeItemLayoutActionSlotProps, | ||
| TreeItemLayoutActionVisibilityChangeData, | ||
| } from './TreeItemLayout.types'; |
2 changes: 2 additions & 0 deletions
2
...ess-components-preview/library/src/components/Tree/TreeItemLayout/renderTreeItemLayout.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { renderTreeItemLayout_unstable as renderTreeItemLayout } from '@fluentui/react-tree'; |
2 changes: 2 additions & 0 deletions
2
...adless-components-preview/library/src/components/Tree/TreeItemLayout/useTreeItemLayout.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { useTreeItemLayout_unstable as useTreeItemLayout } from '@fluentui/react-tree'; |
13 changes: 13 additions & 0 deletions
13
...nents-preview/library/src/components/Tree/TreeItemPersonaLayout/TreeItemPersonaLayout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| 'use client'; | ||
| import * as React from 'react'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import type { TreeItemPersonaLayoutProps } from './TreeItemPersonaLayout.types'; | ||
| import { useTreeItemPersonaLayout, useTreeItemPersonaLayoutContextValues } from './useTreeItemPersonaLayout'; | ||
| import { renderTreeItemPersonaLayout } from './renderTreeItemPersonaLayout'; | ||
|
|
||
| export const TreeItemPersonaLayout: ForwardRefComponent<TreeItemPersonaLayoutProps> = React.forwardRef((props, ref) => { | ||
| const state = useTreeItemPersonaLayout(props, ref); | ||
| const contextValues = useTreeItemPersonaLayoutContextValues(state); | ||
| return renderTreeItemPersonaLayout(state, contextValues); | ||
| }); | ||
| TreeItemPersonaLayout.displayName = 'TreeItemPersonaLayout'; |
6 changes: 6 additions & 0 deletions
6
...-preview/library/src/components/Tree/TreeItemPersonaLayout/TreeItemPersonaLayout.types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| export type { | ||
| TreeItemPersonaLayoutSlots, | ||
| TreeItemPersonaLayoutProps, | ||
| TreeItemPersonaLayoutState, | ||
| TreeItemPersonaLayoutContextValues, | ||
| } from '@fluentui/react-tree'; |
9 changes: 9 additions & 0 deletions
9
...ct-headless-components-preview/library/src/components/Tree/TreeItemPersonaLayout/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| export { TreeItemPersonaLayout } from './TreeItemPersonaLayout'; | ||
| export { renderTreeItemPersonaLayout } from './renderTreeItemPersonaLayout'; | ||
| export { useTreeItemPersonaLayout, useTreeItemPersonaLayoutContextValues } from './useTreeItemPersonaLayout'; | ||
| export type { | ||
| TreeItemPersonaLayoutSlots, | ||
| TreeItemPersonaLayoutProps, | ||
| TreeItemPersonaLayoutState, | ||
| TreeItemPersonaLayoutContextValues, | ||
| } from './TreeItemPersonaLayout.types'; |
2 changes: 2 additions & 0 deletions
2
...-preview/library/src/components/Tree/TreeItemPersonaLayout/renderTreeItemPersonaLayout.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { renderTreeItemPersonaLayout_unstable as renderTreeItemPersonaLayout } from '@fluentui/react-tree'; |
10 changes: 10 additions & 0 deletions
10
...nts-preview/library/src/components/Tree/TreeItemPersonaLayout/useTreeItemPersonaLayout.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| 'use client'; | ||
| import { | ||
| useTreeItemPersonaLayout_unstable, | ||
| useTreeItemPersonaLayoutContextValues_unstable, | ||
| } from '@fluentui/react-tree'; | ||
| import type { TreeItemPersonaLayoutState, TreeItemPersonaLayoutContextValues } from './TreeItemPersonaLayout.types'; | ||
| export const useTreeItemPersonaLayout = useTreeItemPersonaLayout_unstable; | ||
| export const useTreeItemPersonaLayoutContextValues = useTreeItemPersonaLayoutContextValues_unstable as ( | ||
| state: TreeItemPersonaLayoutState, | ||
| ) => TreeItemPersonaLayoutContextValues; |
18 changes: 18 additions & 0 deletions
18
...s/react-components/react-headless-components-preview/library/src/components/Tree/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| export { Tree } from './Tree'; | ||
| export { renderTree } from './renderTree'; | ||
| export { useTree, useTreeContextValues } from './useTree'; | ||
| export type { | ||
| TreeSlots, | ||
| TreeProps, | ||
| TreeState, | ||
| TreeContextValues, | ||
| TreeCheckedChangeData, | ||
| TreeCheckedChangeEvent, | ||
| TreeNavigationData_unstable, | ||
| TreeNavigationEvent_unstable, | ||
| TreeNavigationDataParam, | ||
| TreeNavigationMode, | ||
| TreeOpenChangeData, | ||
| TreeOpenChangeEvent, | ||
| TreeSelectionValue, | ||
| } from './Tree.types'; |
2 changes: 2 additions & 0 deletions
2
...ct-components/react-headless-components-preview/library/src/components/Tree/renderTree.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use client'; | ||
| export { renderTree_unstable as renderTree } from '@fluentui/react-tree'; |
5 changes: 5 additions & 0 deletions
5
...react-components/react-headless-components-preview/library/src/components/Tree/useTree.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| 'use client'; | ||
| import { useTree_unstable, useTreeContextValues_unstable } from '@fluentui/react-tree'; | ||
| import type { TreeState, TreeContextValues } from './Tree.types'; | ||
| export const useTree = useTree_unstable; | ||
| export const useTreeContextValues = useTreeContextValues_unstable as (state: TreeState) => TreeContextValues; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/CalendarCompat 4 screenshots
vr-tests-react-components/Charts-DonutChart 1 screenshots
vr-tests-react-components/Positioning 2 screenshots
vr-tests-react-components/ProgressBar converged 2 screenshots
vr-tests-react-components/TagPicker 3 screenshots
There were 4 duplicate changes discarded. Check the build logs for more information.