@ark-ui/react 4.2.0 → 4.3.0
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.
- package/dist/components/collection.cjs +2 -0
- package/dist/components/collection.d.cts +4 -1
- package/dist/components/collection.d.ts +4 -1
- package/dist/components/collection.js +3 -2
- package/dist/components/combobox/combobox-root.cjs +0 -1
- package/dist/components/combobox/combobox-root.js +0 -1
- package/dist/components/field/field-textarea.cjs +14 -2
- package/dist/components/field/field-textarea.d.cts +5 -0
- package/dist/components/field/field-textarea.d.ts +5 -0
- package/dist/components/field/field-textarea.js +15 -3
- package/dist/components/index.cjs +7 -8
- package/dist/components/index.js +4 -5
- package/dist/components/toast/create-toaster.d.cts +1 -1
- package/dist/components/toast/create-toaster.d.ts +1 -1
- package/dist/components/tree-view/index.cjs +8 -8
- package/dist/components/tree-view/index.d.cts +4 -4
- package/dist/components/tree-view/index.d.ts +4 -4
- package/dist/components/tree-view/index.js +4 -4
- package/dist/components/tree-view/tree-view-branch-content.cjs +9 -5
- package/dist/components/tree-view/tree-view-branch-content.d.cts +2 -2
- package/dist/components/tree-view/tree-view-branch-content.d.ts +2 -2
- package/dist/components/tree-view/tree-view-branch-content.js +9 -5
- package/dist/components/tree-view/tree-view-branch-control.cjs +3 -3
- package/dist/components/tree-view/tree-view-branch-control.js +3 -3
- package/dist/components/tree-view/tree-view-branch-indent-guide.cjs +23 -0
- package/dist/components/tree-view/tree-view-branch-indent-guide.d.cts +7 -0
- package/dist/components/tree-view/tree-view-branch-indent-guide.d.ts +7 -0
- package/dist/components/tree-view/tree-view-branch-indent-guide.js +19 -0
- package/dist/components/tree-view/tree-view-branch-indicator.cjs +3 -3
- package/dist/components/tree-view/tree-view-branch-indicator.js +3 -3
- package/dist/components/tree-view/tree-view-branch-text.cjs +3 -3
- package/dist/components/tree-view/tree-view-branch-text.js +3 -3
- package/dist/components/tree-view/tree-view-branch-trigger.cjs +3 -3
- package/dist/components/tree-view/tree-view-branch-trigger.js +3 -3
- package/dist/components/tree-view/tree-view-branch.cjs +18 -9
- package/dist/components/tree-view/tree-view-branch.d.cts +3 -4
- package/dist/components/tree-view/tree-view-branch.d.ts +3 -4
- package/dist/components/tree-view/tree-view-branch.js +18 -9
- package/dist/components/tree-view/tree-view-context.d.cts +5 -4
- package/dist/components/tree-view/tree-view-context.d.ts +5 -4
- package/dist/components/tree-view/tree-view-item-indicator.cjs +3 -3
- package/dist/components/tree-view/tree-view-item-indicator.js +3 -3
- package/dist/components/tree-view/tree-view-item-text.cjs +3 -3
- package/dist/components/tree-view/tree-view-item-text.js +3 -3
- package/dist/components/tree-view/tree-view-item.cjs +4 -13
- package/dist/components/tree-view/tree-view-item.d.cts +3 -4
- package/dist/components/tree-view/tree-view-item.d.ts +3 -4
- package/dist/components/tree-view/tree-view-item.js +4 -13
- package/dist/components/tree-view/tree-view-node-context.cjs +10 -0
- package/dist/components/tree-view/tree-view-node-context.d.cts +6 -0
- package/dist/components/tree-view/tree-view-node-context.d.ts +6 -0
- package/dist/components/tree-view/tree-view-node-context.js +6 -0
- package/dist/components/tree-view/tree-view-node-provider.cjs +15 -0
- package/dist/components/tree-view/tree-view-node-provider.d.cts +8 -0
- package/dist/components/tree-view/tree-view-node-provider.d.ts +8 -0
- package/dist/components/tree-view/tree-view-node-provider.js +11 -0
- package/dist/components/tree-view/tree-view-root-provider.cjs +11 -10
- package/dist/components/tree-view/tree-view-root-provider.d.cts +8 -6
- package/dist/components/tree-view/tree-view-root-provider.d.ts +8 -6
- package/dist/components/tree-view/tree-view-root-provider.js +11 -10
- package/dist/components/tree-view/tree-view-root.cjs +8 -5
- package/dist/components/tree-view/tree-view-root.d.cts +6 -4
- package/dist/components/tree-view/tree-view-root.d.ts +6 -4
- package/dist/components/tree-view/tree-view-root.js +8 -5
- package/dist/components/tree-view/tree-view-tree.cjs +1 -2
- package/dist/components/tree-view/tree-view-tree.d.cts +2 -2
- package/dist/components/tree-view/tree-view-tree.d.ts +2 -2
- package/dist/components/tree-view/tree-view-tree.js +1 -2
- package/dist/components/tree-view/tree-view.cjs +6 -2
- package/dist/components/tree-view/tree-view.d.cts +16 -14
- package/dist/components/tree-view/tree-view.d.ts +16 -14
- package/dist/components/tree-view/tree-view.js +3 -1
- package/dist/components/tree-view/use-tree-view-context.d.cts +3 -2
- package/dist/components/tree-view/use-tree-view-context.d.ts +3 -2
- package/dist/components/tree-view/use-tree-view-node-context.cjs +17 -0
- package/dist/components/tree-view/use-tree-view-node-context.d.cts +5 -0
- package/dist/components/tree-view/use-tree-view-node-context.d.ts +5 -0
- package/dist/components/tree-view/use-tree-view-node-context.js +12 -0
- package/dist/components/tree-view/use-tree-view-node-props-context.cjs +15 -0
- package/dist/components/tree-view/use-tree-view-node-props-context.d.cts +5 -0
- package/dist/components/tree-view/use-tree-view-node-props-context.d.ts +5 -0
- package/dist/components/tree-view/use-tree-view-node-props-context.js +10 -0
- package/dist/components/tree-view/use-tree-view.cjs +25 -15
- package/dist/components/tree-view/use-tree-view.d.cts +8 -3
- package/dist/components/tree-view/use-tree-view.d.ts +8 -3
- package/dist/components/tree-view/use-tree-view.js +26 -16
- package/dist/index.cjs +7 -8
- package/dist/index.js +4 -5
- package/package.json +58 -57
- package/dist/components/tree-view/tree-view-item-context.cjs +0 -10
- package/dist/components/tree-view/tree-view-item-context.d.cts +0 -6
- package/dist/components/tree-view/tree-view-item-context.d.ts +0 -6
- package/dist/components/tree-view/tree-view-item-context.js +0 -6
- package/dist/components/tree-view/use-tree-view-branch-context.cjs +0 -15
- package/dist/components/tree-view/use-tree-view-branch-context.d.cts +0 -7
- package/dist/components/tree-view/use-tree-view-branch-context.d.ts +0 -7
- package/dist/components/tree-view/use-tree-view-branch-context.js +0 -10
- package/dist/components/tree-view/use-tree-view-depth-context.cjs +0 -15
- package/dist/components/tree-view/use-tree-view-depth-context.d.cts +0 -3
- package/dist/components/tree-view/use-tree-view-depth-context.d.ts +0 -3
- package/dist/components/tree-view/use-tree-view-depth-context.js +0 -10
- package/dist/components/tree-view/use-tree-view-item-context.cjs +0 -17
- package/dist/components/tree-view/use-tree-view-item-context.d.cts +0 -5
- package/dist/components/tree-view/use-tree-view-item-context.d.ts +0 -5
- package/dist/components/tree-view/use-tree-view-item-context.js +0 -12
- package/dist/components/tree-view/use-tree-view-item-props-context.cjs +0 -15
- package/dist/components/tree-view/use-tree-view-item-props-context.d.cts +0 -5
- package/dist/components/tree-view/use-tree-view-item-props-context.d.ts +0 -5
- package/dist/components/tree-view/use-tree-view-item-props-context.js +0 -10
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { RenderStrategyProps } from '../../utils/render-strategy';
|
|
2
|
+
import { TreeNode } from '../collection';
|
|
1
3
|
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
2
4
|
import { UseTreeViewProps } from './use-tree-view';
|
|
3
|
-
|
|
4
|
-
export interface TreeViewRootBaseProps extends UseTreeViewProps, PolymorphicProps {
|
|
5
|
+
export interface TreeViewRootBaseProps<T extends TreeNode> extends UseTreeViewProps<T>, RenderStrategyProps, PolymorphicProps {
|
|
5
6
|
}
|
|
6
|
-
export interface TreeViewRootProps extends HTMLProps<'div'>, TreeViewRootBaseProps {
|
|
7
|
+
export interface TreeViewRootProps<T extends TreeNode> extends HTMLProps<'div'>, TreeViewRootBaseProps<T> {
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
+
export type TreeViewComponent = <T extends TreeNode>(props: TreeViewRootProps<T> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
|
|
10
|
+
export declare const TreeViewRoot: TreeViewComponent;
|
|
@@ -3,12 +3,15 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { createSplitProps } from '../../utils/create-split-props.js';
|
|
6
|
+
import { splitRenderStrategyProps, RenderStrategyPropsProvider } from '../../utils/render-strategy.js';
|
|
6
7
|
import { ark } from '../factory.js';
|
|
7
8
|
import { useTreeView } from './use-tree-view.js';
|
|
8
9
|
import { TreeViewProvider } from './use-tree-view-context.js';
|
|
9
10
|
|
|
10
|
-
const
|
|
11
|
-
const [
|
|
11
|
+
const TreeViewImpl = (props, ref) => {
|
|
12
|
+
const [renderStrategyProps, treeViewProps] = splitRenderStrategyProps(props);
|
|
13
|
+
const [useTreeViewProps, localProps] = createSplitProps()(treeViewProps, [
|
|
14
|
+
"collection",
|
|
12
15
|
"defaultExpandedValue",
|
|
13
16
|
"defaultSelectedValue",
|
|
14
17
|
"expandedValue",
|
|
@@ -25,8 +28,8 @@ const TreeViewRoot = forwardRef((props, ref) => {
|
|
|
25
28
|
]);
|
|
26
29
|
const treeView = useTreeView(useTreeViewProps);
|
|
27
30
|
const mergedProps = mergeProps(treeView.getRootProps(), localProps);
|
|
28
|
-
return /* @__PURE__ */ jsx(TreeViewProvider, { value: treeView, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });
|
|
29
|
-
}
|
|
30
|
-
TreeViewRoot
|
|
31
|
+
return /* @__PURE__ */ jsx(TreeViewProvider, { value: treeView, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });
|
|
32
|
+
};
|
|
33
|
+
const TreeViewRoot = forwardRef(TreeViewImpl);
|
|
31
34
|
|
|
32
35
|
export { TreeViewRoot };
|
|
@@ -8,12 +8,11 @@ const react$1 = require('@zag-js/react');
|
|
|
8
8
|
const react = require('react');
|
|
9
9
|
const factory = require('../factory.cjs');
|
|
10
10
|
const useTreeViewContext = require('./use-tree-view-context.cjs');
|
|
11
|
-
const useTreeViewDepthContext = require('./use-tree-view-depth-context.cjs');
|
|
12
11
|
|
|
13
12
|
const TreeViewTree = react.forwardRef((props, ref) => {
|
|
14
13
|
const treeView = useTreeViewContext.useTreeViewContext();
|
|
15
14
|
const mergedProps = react$1.mergeProps(treeView.getTreeProps(), props);
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
17
16
|
});
|
|
18
17
|
TreeViewTree.displayName = "TreeViewTree";
|
|
19
18
|
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface TreeViewTreeBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface TreeViewTreeProps extends HTMLProps<'
|
|
5
|
+
export interface TreeViewTreeProps extends HTMLProps<'div'>, TreeViewTreeBaseProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const TreeViewTree: ForwardRefExoticComponent<TreeViewTreeProps & RefAttributes<
|
|
7
|
+
export declare const TreeViewTree: ForwardRefExoticComponent<TreeViewTreeProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface TreeViewTreeBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface TreeViewTreeProps extends HTMLProps<'
|
|
5
|
+
export interface TreeViewTreeProps extends HTMLProps<'div'>, TreeViewTreeBaseProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const TreeViewTree: ForwardRefExoticComponent<TreeViewTreeProps & RefAttributes<
|
|
7
|
+
export declare const TreeViewTree: ForwardRefExoticComponent<TreeViewTreeProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -4,12 +4,11 @@ import { mergeProps } from '@zag-js/react';
|
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { ark } from '../factory.js';
|
|
6
6
|
import { useTreeViewContext } from './use-tree-view-context.js';
|
|
7
|
-
import { TreeViewDepthProvider } from './use-tree-view-depth-context.js';
|
|
8
7
|
|
|
9
8
|
const TreeViewTree = forwardRef((props, ref) => {
|
|
10
9
|
const treeView = useTreeViewContext();
|
|
11
10
|
const mergedProps = mergeProps(treeView.getTreeProps(), props);
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
13
12
|
});
|
|
14
13
|
TreeViewTree.displayName = "TreeViewTree";
|
|
15
14
|
|
|
@@ -5,15 +5,17 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const treeViewBranch = require('./tree-view-branch.cjs');
|
|
6
6
|
const treeViewBranchContent = require('./tree-view-branch-content.cjs');
|
|
7
7
|
const treeViewBranchControl = require('./tree-view-branch-control.cjs');
|
|
8
|
+
const treeViewBranchIndentGuide = require('./tree-view-branch-indent-guide.cjs');
|
|
8
9
|
const treeViewBranchIndicator = require('./tree-view-branch-indicator.cjs');
|
|
9
10
|
const treeViewBranchText = require('./tree-view-branch-text.cjs');
|
|
10
11
|
const treeViewBranchTrigger = require('./tree-view-branch-trigger.cjs');
|
|
11
12
|
const treeViewContext = require('./tree-view-context.cjs');
|
|
12
13
|
const treeViewItem = require('./tree-view-item.cjs');
|
|
13
|
-
const treeViewItemContext = require('./tree-view-item-context.cjs');
|
|
14
14
|
const treeViewItemIndicator = require('./tree-view-item-indicator.cjs');
|
|
15
15
|
const treeViewItemText = require('./tree-view-item-text.cjs');
|
|
16
16
|
const treeViewLabel = require('./tree-view-label.cjs');
|
|
17
|
+
const treeViewNodeContext = require('./tree-view-node-context.cjs');
|
|
18
|
+
const treeViewNodeProvider = require('./tree-view-node-provider.cjs');
|
|
17
19
|
const treeViewRoot = require('./tree-view-root.cjs');
|
|
18
20
|
const treeViewRootProvider = require('./tree-view-root-provider.cjs');
|
|
19
21
|
const treeViewTree = require('./tree-view-tree.cjs');
|
|
@@ -23,15 +25,17 @@ const treeViewTree = require('./tree-view-tree.cjs');
|
|
|
23
25
|
exports.Branch = treeViewBranch.TreeViewBranch;
|
|
24
26
|
exports.BranchContent = treeViewBranchContent.TreeViewBranchContent;
|
|
25
27
|
exports.BranchControl = treeViewBranchControl.TreeViewBranchControl;
|
|
28
|
+
exports.BranchIndentGuide = treeViewBranchIndentGuide.TreeViewBranchIndentGuide;
|
|
26
29
|
exports.BranchIndicator = treeViewBranchIndicator.TreeViewBranchIndicator;
|
|
27
30
|
exports.BranchText = treeViewBranchText.TreeViewBranchText;
|
|
28
31
|
exports.BranchTrigger = treeViewBranchTrigger.TreeViewBranchTrigger;
|
|
29
32
|
exports.Context = treeViewContext.TreeViewContext;
|
|
30
33
|
exports.Item = treeViewItem.TreeViewItem;
|
|
31
|
-
exports.ItemContext = treeViewItemContext.TreeViewItemContext;
|
|
32
34
|
exports.ItemIndicator = treeViewItemIndicator.TreeViewItemIndicator;
|
|
33
35
|
exports.ItemText = treeViewItemText.TreeViewItemText;
|
|
34
36
|
exports.Label = treeViewLabel.TreeViewLabel;
|
|
37
|
+
exports.NodeContext = treeViewNodeContext.TreeViewNodeContext;
|
|
38
|
+
exports.NodeProvider = treeViewNodeProvider.TreeViewNodeProvider;
|
|
35
39
|
exports.Root = treeViewRoot.TreeViewRoot;
|
|
36
40
|
exports.RootProvider = treeViewRootProvider.TreeViewRootProvider;
|
|
37
41
|
exports.Tree = treeViewTree.TreeViewTree;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
export type { ExpandedChangeDetails, FocusChangeDetails, SelectionChangeDetails, } from '@zag-js/tree-view';
|
|
2
|
-
export { TreeViewBranch as Branch, type
|
|
3
|
-
export { TreeViewBranchContent as BranchContent, type
|
|
4
|
-
export { TreeViewBranchControl as BranchControl, type
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
2
|
+
export { TreeViewBranch as Branch, type TreeViewBranchBaseProps as BranchBaseProps, type TreeViewBranchProps as BranchProps, } from './tree-view-branch';
|
|
3
|
+
export { TreeViewBranchContent as BranchContent, type TreeViewBranchContentBaseProps as BranchContentBaseProps, type TreeViewBranchContentProps as BranchContentProps, } from './tree-view-branch-content';
|
|
4
|
+
export { TreeViewBranchControl as BranchControl, type TreeViewBranchControlBaseProps as BranchControlBaseProps, type TreeViewBranchControlProps as BranchControlProps, } from './tree-view-branch-control';
|
|
5
|
+
export { TreeViewBranchIndentGuide as BranchIndentGuide, type TreeViewBranchIndentGuideBaseProps as BranchIndentGuideBaseProps, type TreeViewBranchIndentGuideProps as BranchIndentGuideProps, } from './tree-view-branch-indent-guide';
|
|
6
|
+
export { TreeViewBranchIndicator as BranchIndicator, type TreeViewBranchIndicatorBaseProps as BranchIndicatorBaseProps, type TreeViewBranchIndicatorProps as BranchIndicatorProps, } from './tree-view-branch-indicator';
|
|
7
|
+
export { TreeViewBranchText as BranchText, type TreeViewBranchTextBaseProps as BranchTextBaseProps, type TreeViewBranchTextProps as BranchTextProps, } from './tree-view-branch-text';
|
|
8
|
+
export { TreeViewBranchTrigger as BranchTrigger, type TreeViewBranchTriggerBaseProps as BranchTriggerBaseProps, type TreeViewBranchTriggerProps as BranchTriggerProps, } from './tree-view-branch-trigger';
|
|
8
9
|
export { TreeViewContext as Context, type TreeViewContextProps as ContextProps, } from './tree-view-context';
|
|
9
|
-
export { TreeViewItem as Item, type
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
10
|
+
export { TreeViewItem as Item, type TreeViewItemBaseProps as ItemBaseProps, type TreeViewItemProps as ItemProps, } from './tree-view-item';
|
|
11
|
+
export { TreeViewItemIndicator as ItemIndicator, type TreeViewItemIndicatorBaseProps as ItemIndicatorBaseProps, type TreeViewItemIndicatorProps as ItemIndicatorProps, } from './tree-view-item-indicator';
|
|
12
|
+
export { TreeViewItemText as ItemText, type TreeViewItemTextBaseProps as ItemTextBaseProps, type TreeViewItemTextProps as ItemTextProps, } from './tree-view-item-text';
|
|
13
|
+
export { TreeViewLabel as Label, type TreeViewLabelBaseProps as LabelBaseProps, type TreeViewLabelProps as LabelProps, } from './tree-view-label';
|
|
14
|
+
export { TreeViewNodeContext as NodeContext, type TreeViewNodeContextProps as NodeContextProps, } from './tree-view-node-context';
|
|
15
|
+
export { TreeViewNodeProvider as NodeProvider, type TreeViewNodeProviderBaseProps as NodeProviderBaseProps, type TreeViewNodeProviderProps as NodeProviderProps, } from './tree-view-node-provider';
|
|
16
|
+
export { TreeViewRoot as Root, type TreeViewRootBaseProps as RootBaseProps, type TreeViewRootProps as RootProps, } from './tree-view-root';
|
|
17
|
+
export { TreeViewRootProvider as RootProvider, type TreeViewRootProviderBaseProps as RootProviderBaseProps, type TreeViewRootProviderProps as RootProviderProps, } from './tree-view-root-provider';
|
|
18
|
+
export { TreeViewTree as Tree, type TreeViewTreeBaseProps as TreeBaseProps, type TreeViewTreeProps as TreeProps, } from './tree-view-tree';
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
export type { ExpandedChangeDetails, FocusChangeDetails, SelectionChangeDetails, } from '@zag-js/tree-view';
|
|
2
|
-
export { TreeViewBranch as Branch, type
|
|
3
|
-
export { TreeViewBranchContent as BranchContent, type
|
|
4
|
-
export { TreeViewBranchControl as BranchControl, type
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
2
|
+
export { TreeViewBranch as Branch, type TreeViewBranchBaseProps as BranchBaseProps, type TreeViewBranchProps as BranchProps, } from './tree-view-branch';
|
|
3
|
+
export { TreeViewBranchContent as BranchContent, type TreeViewBranchContentBaseProps as BranchContentBaseProps, type TreeViewBranchContentProps as BranchContentProps, } from './tree-view-branch-content';
|
|
4
|
+
export { TreeViewBranchControl as BranchControl, type TreeViewBranchControlBaseProps as BranchControlBaseProps, type TreeViewBranchControlProps as BranchControlProps, } from './tree-view-branch-control';
|
|
5
|
+
export { TreeViewBranchIndentGuide as BranchIndentGuide, type TreeViewBranchIndentGuideBaseProps as BranchIndentGuideBaseProps, type TreeViewBranchIndentGuideProps as BranchIndentGuideProps, } from './tree-view-branch-indent-guide';
|
|
6
|
+
export { TreeViewBranchIndicator as BranchIndicator, type TreeViewBranchIndicatorBaseProps as BranchIndicatorBaseProps, type TreeViewBranchIndicatorProps as BranchIndicatorProps, } from './tree-view-branch-indicator';
|
|
7
|
+
export { TreeViewBranchText as BranchText, type TreeViewBranchTextBaseProps as BranchTextBaseProps, type TreeViewBranchTextProps as BranchTextProps, } from './tree-view-branch-text';
|
|
8
|
+
export { TreeViewBranchTrigger as BranchTrigger, type TreeViewBranchTriggerBaseProps as BranchTriggerBaseProps, type TreeViewBranchTriggerProps as BranchTriggerProps, } from './tree-view-branch-trigger';
|
|
8
9
|
export { TreeViewContext as Context, type TreeViewContextProps as ContextProps, } from './tree-view-context';
|
|
9
|
-
export { TreeViewItem as Item, type
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
10
|
+
export { TreeViewItem as Item, type TreeViewItemBaseProps as ItemBaseProps, type TreeViewItemProps as ItemProps, } from './tree-view-item';
|
|
11
|
+
export { TreeViewItemIndicator as ItemIndicator, type TreeViewItemIndicatorBaseProps as ItemIndicatorBaseProps, type TreeViewItemIndicatorProps as ItemIndicatorProps, } from './tree-view-item-indicator';
|
|
12
|
+
export { TreeViewItemText as ItemText, type TreeViewItemTextBaseProps as ItemTextBaseProps, type TreeViewItemTextProps as ItemTextProps, } from './tree-view-item-text';
|
|
13
|
+
export { TreeViewLabel as Label, type TreeViewLabelBaseProps as LabelBaseProps, type TreeViewLabelProps as LabelProps, } from './tree-view-label';
|
|
14
|
+
export { TreeViewNodeContext as NodeContext, type TreeViewNodeContextProps as NodeContextProps, } from './tree-view-node-context';
|
|
15
|
+
export { TreeViewNodeProvider as NodeProvider, type TreeViewNodeProviderBaseProps as NodeProviderBaseProps, type TreeViewNodeProviderProps as NodeProviderProps, } from './tree-view-node-provider';
|
|
16
|
+
export { TreeViewRoot as Root, type TreeViewRootBaseProps as RootBaseProps, type TreeViewRootProps as RootProps, } from './tree-view-root';
|
|
17
|
+
export { TreeViewRootProvider as RootProvider, type TreeViewRootProviderBaseProps as RootProviderBaseProps, type TreeViewRootProviderProps as RootProviderProps, } from './tree-view-root-provider';
|
|
18
|
+
export { TreeViewTree as Tree, type TreeViewTreeBaseProps as TreeBaseProps, type TreeViewTreeProps as TreeProps, } from './tree-view-tree';
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export { TreeViewBranch as Branch } from './tree-view-branch.js';
|
|
2
2
|
export { TreeViewBranchContent as BranchContent } from './tree-view-branch-content.js';
|
|
3
3
|
export { TreeViewBranchControl as BranchControl } from './tree-view-branch-control.js';
|
|
4
|
+
export { TreeViewBranchIndentGuide as BranchIndentGuide } from './tree-view-branch-indent-guide.js';
|
|
4
5
|
export { TreeViewBranchIndicator as BranchIndicator } from './tree-view-branch-indicator.js';
|
|
5
6
|
export { TreeViewBranchText as BranchText } from './tree-view-branch-text.js';
|
|
6
7
|
export { TreeViewBranchTrigger as BranchTrigger } from './tree-view-branch-trigger.js';
|
|
7
8
|
export { TreeViewContext as Context } from './tree-view-context.js';
|
|
8
9
|
export { TreeViewItem as Item } from './tree-view-item.js';
|
|
9
|
-
export { TreeViewItemContext as ItemContext } from './tree-view-item-context.js';
|
|
10
10
|
export { TreeViewItemIndicator as ItemIndicator } from './tree-view-item-indicator.js';
|
|
11
11
|
export { TreeViewItemText as ItemText } from './tree-view-item-text.js';
|
|
12
12
|
export { TreeViewLabel as Label } from './tree-view-label.js';
|
|
13
|
+
export { TreeViewNodeContext as NodeContext } from './tree-view-node-context.js';
|
|
14
|
+
export { TreeViewNodeProvider as NodeProvider } from './tree-view-node-provider.js';
|
|
13
15
|
export { TreeViewRoot as Root } from './tree-view-root.js';
|
|
14
16
|
export { TreeViewRootProvider as RootProvider } from './tree-view-root-provider.js';
|
|
15
17
|
export { TreeViewTree as Tree } from './tree-view-tree.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { TreeNode } from '../collection';
|
|
1
2
|
import { UseTreeViewReturn } from './use-tree-view';
|
|
2
3
|
import { Provider } from 'react';
|
|
3
|
-
export interface UseTreeViewContext extends UseTreeViewReturn {
|
|
4
|
+
export interface UseTreeViewContext<T extends TreeNode> extends UseTreeViewReturn<T> {
|
|
4
5
|
}
|
|
5
|
-
export declare const TreeViewProvider: Provider<UseTreeViewContext
|
|
6
|
+
export declare const TreeViewProvider: Provider<UseTreeViewContext<any>>, useTreeViewContext: () => UseTreeViewContext<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { TreeNode } from '../collection';
|
|
1
2
|
import { UseTreeViewReturn } from './use-tree-view';
|
|
2
3
|
import { Provider } from 'react';
|
|
3
|
-
export interface UseTreeViewContext extends UseTreeViewReturn {
|
|
4
|
+
export interface UseTreeViewContext<T extends TreeNode> extends UseTreeViewReturn<T> {
|
|
4
5
|
}
|
|
5
|
-
export declare const TreeViewProvider: Provider<UseTreeViewContext
|
|
6
|
+
export declare const TreeViewProvider: Provider<UseTreeViewContext<any>>, useTreeViewContext: () => UseTreeViewContext<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const createContext = require('../../utils/create-context.cjs');
|
|
7
|
+
|
|
8
|
+
const [TreeViewNodeProvider, useTreeViewNodeContext] = createContext.createContext(
|
|
9
|
+
{
|
|
10
|
+
name: "TreeViewNodeContext",
|
|
11
|
+
hookName: "useTreeViewNodeContext",
|
|
12
|
+
providerName: "<TreeViewNodeProvider />"
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
exports.TreeViewNodeProvider = TreeViewNodeProvider;
|
|
17
|
+
exports.useTreeViewNodeContext = useTreeViewNodeContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NodeState } from '@zag-js/tree-view';
|
|
2
|
+
import { Provider } from 'react';
|
|
3
|
+
export interface UseTreeViewNodeContext extends NodeState {
|
|
4
|
+
}
|
|
5
|
+
export declare const TreeViewNodeProvider: Provider<UseTreeViewNodeContext>, useTreeViewNodeContext: () => UseTreeViewNodeContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NodeState } from '@zag-js/tree-view';
|
|
2
|
+
import { Provider } from 'react';
|
|
3
|
+
export interface UseTreeViewNodeContext extends NodeState {
|
|
4
|
+
}
|
|
5
|
+
export declare const TreeViewNodeProvider: Provider<UseTreeViewNodeContext>, useTreeViewNodeContext: () => UseTreeViewNodeContext;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createContext } from '../../utils/create-context.js';
|
|
3
|
+
|
|
4
|
+
const [TreeViewNodeProvider, useTreeViewNodeContext] = createContext(
|
|
5
|
+
{
|
|
6
|
+
name: "TreeViewNodeContext",
|
|
7
|
+
hookName: "useTreeViewNodeContext",
|
|
8
|
+
providerName: "<TreeViewNodeProvider />"
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export { TreeViewNodeProvider, useTreeViewNodeContext };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const createContext = require('../../utils/create-context.cjs');
|
|
7
|
+
|
|
8
|
+
const [TreeViewNodePropsProvider, useTreeViewNodePropsContext] = createContext.createContext({
|
|
9
|
+
name: "TreeViewNodePropsContext",
|
|
10
|
+
hookName: "useTreeViewNodePropsContext",
|
|
11
|
+
providerName: "<TreeViewItemProvider />"
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
exports.TreeViewNodePropsProvider = TreeViewNodePropsProvider;
|
|
15
|
+
exports.useTreeViewNodePropsContext = useTreeViewNodePropsContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NodeProps } from '@zag-js/tree-view';
|
|
2
|
+
import { Provider } from 'react';
|
|
3
|
+
export interface UseTreeViewNodePropsContext extends NodeProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const TreeViewNodePropsProvider: Provider<UseTreeViewNodePropsContext>, useTreeViewNodePropsContext: () => UseTreeViewNodePropsContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NodeProps } from '@zag-js/tree-view';
|
|
2
|
+
import { Provider } from 'react';
|
|
3
|
+
export interface UseTreeViewNodePropsContext extends NodeProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const TreeViewNodePropsProvider: Provider<UseTreeViewNodePropsContext>, useTreeViewNodePropsContext: () => UseTreeViewNodePropsContext;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createContext } from '../../utils/create-context.js';
|
|
3
|
+
|
|
4
|
+
const [TreeViewNodePropsProvider, useTreeViewNodePropsContext] = createContext({
|
|
5
|
+
name: "TreeViewNodePropsContext",
|
|
6
|
+
hookName: "useTreeViewNodePropsContext",
|
|
7
|
+
providerName: "<TreeViewItemProvider />"
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { TreeViewNodePropsProvider, useTreeViewNodePropsContext };
|
|
@@ -29,26 +29,36 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const treeView__namespace = /*#__PURE__*/_interopNamespaceDefault(treeView);
|
|
31
31
|
|
|
32
|
-
const useTreeView = (props
|
|
33
|
-
const {
|
|
34
|
-
const
|
|
32
|
+
const useTreeView = (props) => {
|
|
33
|
+
const { collection, ...treeViewProps } = props;
|
|
34
|
+
const locale = useLocaleContext.useLocaleContext();
|
|
35
|
+
const environment = useEnvironmentContext.useEnvironmentContext();
|
|
35
36
|
const initialContext = {
|
|
36
37
|
id: react.useId(),
|
|
37
|
-
dir,
|
|
38
|
-
getRootNode,
|
|
38
|
+
dir: locale.dir,
|
|
39
|
+
getRootNode: environment.getRootNode,
|
|
39
40
|
selectedValue: props.defaultSelectedValue,
|
|
40
41
|
expandedValue: props.defaultExpandedValue,
|
|
41
|
-
|
|
42
|
+
collection,
|
|
43
|
+
...treeViewProps
|
|
42
44
|
};
|
|
43
|
-
const context = {
|
|
44
|
-
...initialContext
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
const context = (() => {
|
|
46
|
+
const { collection: _, ...restProps } = initialContext;
|
|
47
|
+
return {
|
|
48
|
+
...restProps,
|
|
49
|
+
selectedValue: props.selectedValue,
|
|
50
|
+
expandedValue: props.expandedValue,
|
|
51
|
+
onFocusChange: useEvent.useEvent(props.onFocusChange),
|
|
52
|
+
onExpandedChange: useEvent.useEvent(props.onExpandedChange, { sync: true }),
|
|
53
|
+
onSelectionChange: useEvent.useEvent(props.onSelectionChange, { sync: true })
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
const [state, send, service] = react$1.useMachine(treeView__namespace.machine(initialContext), {
|
|
57
|
+
context
|
|
58
|
+
});
|
|
59
|
+
react.useEffect(() => {
|
|
60
|
+
service.setContext({ collection });
|
|
61
|
+
}, [collection]);
|
|
52
62
|
return treeView__namespace.connect(state, send, react$1.normalizeProps);
|
|
53
63
|
};
|
|
54
64
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PropTypes } from '@zag-js/react';
|
|
2
2
|
import { Optional } from '../../types';
|
|
3
|
+
import { TreeCollection, TreeNode } from '../collection';
|
|
3
4
|
import * as treeView from '@zag-js/tree-view';
|
|
4
|
-
export interface UseTreeViewProps extends Optional<Omit<treeView.Context, 'dir' | 'getRootNode'>, 'id'> {
|
|
5
|
+
export interface UseTreeViewProps<T extends TreeNode> extends Optional<Omit<treeView.Context, 'dir' | 'getRootNode' | 'collection'>, 'id'> {
|
|
5
6
|
/**
|
|
6
7
|
* The initial selected items of the tree view.
|
|
7
8
|
* Use this when you do not need to control the state of the tree view.
|
|
@@ -12,7 +13,11 @@ export interface UseTreeViewProps extends Optional<Omit<treeView.Context, 'dir'
|
|
|
12
13
|
* Use this when you do not need to control the state of the tree view.
|
|
13
14
|
*/
|
|
14
15
|
defaultExpandedValue?: treeView.Context['expandedValue'];
|
|
16
|
+
/**
|
|
17
|
+
* The collection of tree nodes
|
|
18
|
+
*/
|
|
19
|
+
collection: TreeCollection<T>;
|
|
15
20
|
}
|
|
16
|
-
export interface UseTreeViewReturn extends treeView.Api<PropTypes> {
|
|
21
|
+
export interface UseTreeViewReturn<T extends TreeNode> extends treeView.Api<PropTypes, T> {
|
|
17
22
|
}
|
|
18
|
-
export declare const useTreeView: (props
|
|
23
|
+
export declare const useTreeView: <T extends unknown>(props: UseTreeViewProps<T>) => UseTreeViewReturn<T>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PropTypes } from '@zag-js/react';
|
|
2
2
|
import { Optional } from '../../types';
|
|
3
|
+
import { TreeCollection, TreeNode } from '../collection';
|
|
3
4
|
import * as treeView from '@zag-js/tree-view';
|
|
4
|
-
export interface UseTreeViewProps extends Optional<Omit<treeView.Context, 'dir' | 'getRootNode'>, 'id'> {
|
|
5
|
+
export interface UseTreeViewProps<T extends TreeNode> extends Optional<Omit<treeView.Context, 'dir' | 'getRootNode' | 'collection'>, 'id'> {
|
|
5
6
|
/**
|
|
6
7
|
* The initial selected items of the tree view.
|
|
7
8
|
* Use this when you do not need to control the state of the tree view.
|
|
@@ -12,7 +13,11 @@ export interface UseTreeViewProps extends Optional<Omit<treeView.Context, 'dir'
|
|
|
12
13
|
* Use this when you do not need to control the state of the tree view.
|
|
13
14
|
*/
|
|
14
15
|
defaultExpandedValue?: treeView.Context['expandedValue'];
|
|
16
|
+
/**
|
|
17
|
+
* The collection of tree nodes
|
|
18
|
+
*/
|
|
19
|
+
collection: TreeCollection<T>;
|
|
15
20
|
}
|
|
16
|
-
export interface UseTreeViewReturn extends treeView.Api<PropTypes> {
|
|
21
|
+
export interface UseTreeViewReturn<T extends TreeNode> extends treeView.Api<PropTypes, T> {
|
|
17
22
|
}
|
|
18
|
-
export declare const useTreeView: (props
|
|
23
|
+
export declare const useTreeView: <T extends unknown>(props: UseTreeViewProps<T>) => UseTreeViewReturn<T>;
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
3
3
|
import * as treeView from '@zag-js/tree-view';
|
|
4
|
-
import { useId } from 'react';
|
|
4
|
+
import { useId, useEffect } from 'react';
|
|
5
5
|
import { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';
|
|
6
6
|
import { useLocaleContext } from '../../providers/locale/use-locale-context.js';
|
|
7
7
|
import { useEvent } from '../../utils/use-event.js';
|
|
8
8
|
|
|
9
|
-
const useTreeView = (props
|
|
10
|
-
const {
|
|
11
|
-
const
|
|
9
|
+
const useTreeView = (props) => {
|
|
10
|
+
const { collection, ...treeViewProps } = props;
|
|
11
|
+
const locale = useLocaleContext();
|
|
12
|
+
const environment = useEnvironmentContext();
|
|
12
13
|
const initialContext = {
|
|
13
14
|
id: useId(),
|
|
14
|
-
dir,
|
|
15
|
-
getRootNode,
|
|
15
|
+
dir: locale.dir,
|
|
16
|
+
getRootNode: environment.getRootNode,
|
|
16
17
|
selectedValue: props.defaultSelectedValue,
|
|
17
18
|
expandedValue: props.defaultExpandedValue,
|
|
18
|
-
|
|
19
|
+
collection,
|
|
20
|
+
...treeViewProps
|
|
19
21
|
};
|
|
20
|
-
const context = {
|
|
21
|
-
...initialContext
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
const context = (() => {
|
|
23
|
+
const { collection: _, ...restProps } = initialContext;
|
|
24
|
+
return {
|
|
25
|
+
...restProps,
|
|
26
|
+
selectedValue: props.selectedValue,
|
|
27
|
+
expandedValue: props.expandedValue,
|
|
28
|
+
onFocusChange: useEvent(props.onFocusChange),
|
|
29
|
+
onExpandedChange: useEvent(props.onExpandedChange, { sync: true }),
|
|
30
|
+
onSelectionChange: useEvent(props.onSelectionChange, { sync: true })
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
const [state, send, service] = useMachine(treeView.machine(initialContext), {
|
|
34
|
+
context
|
|
35
|
+
});
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
service.setContext({ collection });
|
|
38
|
+
}, [collection]);
|
|
29
39
|
return treeView.connect(state, send, normalizeProps);
|
|
30
40
|
};
|
|
31
41
|
|
package/dist/index.cjs
CHANGED
|
@@ -567,21 +567,20 @@ const tooltip$1 = require('./components/tooltip/tooltip.cjs');
|
|
|
567
567
|
const treeViewBranch = require('./components/tree-view/tree-view-branch.cjs');
|
|
568
568
|
const treeViewBranchContent = require('./components/tree-view/tree-view-branch-content.cjs');
|
|
569
569
|
const treeViewBranchControl = require('./components/tree-view/tree-view-branch-control.cjs');
|
|
570
|
+
const treeViewBranchIndentGuide = require('./components/tree-view/tree-view-branch-indent-guide.cjs');
|
|
570
571
|
const treeViewBranchIndicator = require('./components/tree-view/tree-view-branch-indicator.cjs');
|
|
571
572
|
const treeViewBranchText = require('./components/tree-view/tree-view-branch-text.cjs');
|
|
572
573
|
const treeViewBranchTrigger = require('./components/tree-view/tree-view-branch-trigger.cjs');
|
|
573
|
-
const treeViewContext = require('./components/tree-view/tree-view-context.cjs');
|
|
574
574
|
const treeViewItem = require('./components/tree-view/tree-view-item.cjs');
|
|
575
|
-
const treeViewItemContext = require('./components/tree-view/tree-view-item-context.cjs');
|
|
576
575
|
const treeViewItemIndicator = require('./components/tree-view/tree-view-item-indicator.cjs');
|
|
577
576
|
const treeViewItemText = require('./components/tree-view/tree-view-item-text.cjs');
|
|
578
577
|
const treeViewLabel = require('./components/tree-view/tree-view-label.cjs');
|
|
578
|
+
const treeViewNodeContext = require('./components/tree-view/tree-view-node-context.cjs');
|
|
579
|
+
const treeViewNodeProvider = require('./components/tree-view/tree-view-node-provider.cjs');
|
|
579
580
|
const treeViewRoot = require('./components/tree-view/tree-view-root.cjs');
|
|
580
581
|
const treeViewRootProvider = require('./components/tree-view/tree-view-root-provider.cjs');
|
|
581
582
|
const treeViewTree = require('./components/tree-view/tree-view-tree.cjs');
|
|
582
583
|
const useTreeView = require('./components/tree-view/use-tree-view.cjs');
|
|
583
|
-
const useTreeViewContext = require('./components/tree-view/use-tree-view-context.cjs');
|
|
584
|
-
const useTreeViewItemContext = require('./components/tree-view/use-tree-view-item-context.cjs');
|
|
585
584
|
const treeView$1 = require('./components/tree-view/tree-view.cjs');
|
|
586
585
|
const environmentProvider = require('./providers/environment/environment-provider.cjs');
|
|
587
586
|
const useEnvironmentContext = require('./providers/environment/use-environment-context.cjs');
|
|
@@ -728,6 +727,7 @@ exports.useColorPicker = useColorPicker.useColorPicker;
|
|
|
728
727
|
exports.useColorPickerContext = useColorPickerContext.useColorPickerContext;
|
|
729
728
|
exports.ColorPicker = colorPicker$1;
|
|
730
729
|
exports.createListCollection = collection.createListCollection;
|
|
730
|
+
exports.createTreeCollection = collection.createTreeCollection;
|
|
731
731
|
exports.ComboboxClearTrigger = comboboxClearTrigger.ComboboxClearTrigger;
|
|
732
732
|
exports.ComboboxContent = comboboxContent.ComboboxContent;
|
|
733
733
|
exports.ComboboxContext = comboboxContext.ComboboxContext;
|
|
@@ -1197,21 +1197,20 @@ exports.Tooltip = tooltip$1;
|
|
|
1197
1197
|
exports.TreeViewBranch = treeViewBranch.TreeViewBranch;
|
|
1198
1198
|
exports.TreeViewBranchContent = treeViewBranchContent.TreeViewBranchContent;
|
|
1199
1199
|
exports.TreeViewBranchControl = treeViewBranchControl.TreeViewBranchControl;
|
|
1200
|
+
exports.TreeViewBranchIndentGuide = treeViewBranchIndentGuide.TreeViewBranchIndentGuide;
|
|
1200
1201
|
exports.TreeViewBranchIndicator = treeViewBranchIndicator.TreeViewBranchIndicator;
|
|
1201
1202
|
exports.TreeViewBranchText = treeViewBranchText.TreeViewBranchText;
|
|
1202
1203
|
exports.TreeViewBranchTrigger = treeViewBranchTrigger.TreeViewBranchTrigger;
|
|
1203
|
-
exports.TreeViewContext = treeViewContext.TreeViewContext;
|
|
1204
1204
|
exports.TreeViewItem = treeViewItem.TreeViewItem;
|
|
1205
|
-
exports.TreeViewItemContext = treeViewItemContext.TreeViewItemContext;
|
|
1206
1205
|
exports.TreeViewItemIndicator = treeViewItemIndicator.TreeViewItemIndicator;
|
|
1207
1206
|
exports.TreeViewItemText = treeViewItemText.TreeViewItemText;
|
|
1208
1207
|
exports.TreeViewLabel = treeViewLabel.TreeViewLabel;
|
|
1208
|
+
exports.TreeViewNodeContext = treeViewNodeContext.TreeViewNodeContext;
|
|
1209
|
+
exports.TreeViewNodeProvider = treeViewNodeProvider.TreeViewNodeProvider;
|
|
1209
1210
|
exports.TreeViewRoot = treeViewRoot.TreeViewRoot;
|
|
1210
1211
|
exports.TreeViewRootProvider = treeViewRootProvider.TreeViewRootProvider;
|
|
1211
1212
|
exports.TreeViewTree = treeViewTree.TreeViewTree;
|
|
1212
1213
|
exports.useTreeView = useTreeView.useTreeView;
|
|
1213
|
-
exports.useTreeViewContext = useTreeViewContext.useTreeViewContext;
|
|
1214
|
-
exports.useTreeViewItemContext = useTreeViewItemContext.useTreeViewItemContext;
|
|
1215
1214
|
exports.TreeView = treeView$1;
|
|
1216
1215
|
exports.EnvironmentProvider = environmentProvider.EnvironmentProvider;
|
|
1217
1216
|
exports.useEnvironmentContext = useEnvironmentContext.useEnvironmentContext;
|
package/dist/index.js
CHANGED
|
@@ -108,7 +108,7 @@ export { useColorPicker } from './components/color-picker/use-color-picker.js';
|
|
|
108
108
|
export { useColorPickerContext } from './components/color-picker/use-color-picker-context.js';
|
|
109
109
|
import * as colorPicker from './components/color-picker/color-picker.js';
|
|
110
110
|
export { colorPicker as ColorPicker };
|
|
111
|
-
export { createListCollection } from './components/collection.js';
|
|
111
|
+
export { createListCollection, createTreeCollection } from './components/collection.js';
|
|
112
112
|
export { ComboboxClearTrigger } from './components/combobox/combobox-clear-trigger.js';
|
|
113
113
|
export { ComboboxContent } from './components/combobox/combobox-content.js';
|
|
114
114
|
export { ComboboxContext } from './components/combobox/combobox-context.js';
|
|
@@ -603,21 +603,20 @@ export { tooltip as Tooltip };
|
|
|
603
603
|
export { TreeViewBranch } from './components/tree-view/tree-view-branch.js';
|
|
604
604
|
export { TreeViewBranchContent } from './components/tree-view/tree-view-branch-content.js';
|
|
605
605
|
export { TreeViewBranchControl } from './components/tree-view/tree-view-branch-control.js';
|
|
606
|
+
export { TreeViewBranchIndentGuide } from './components/tree-view/tree-view-branch-indent-guide.js';
|
|
606
607
|
export { TreeViewBranchIndicator } from './components/tree-view/tree-view-branch-indicator.js';
|
|
607
608
|
export { TreeViewBranchText } from './components/tree-view/tree-view-branch-text.js';
|
|
608
609
|
export { TreeViewBranchTrigger } from './components/tree-view/tree-view-branch-trigger.js';
|
|
609
|
-
export { TreeViewContext } from './components/tree-view/tree-view-context.js';
|
|
610
610
|
export { TreeViewItem } from './components/tree-view/tree-view-item.js';
|
|
611
|
-
export { TreeViewItemContext } from './components/tree-view/tree-view-item-context.js';
|
|
612
611
|
export { TreeViewItemIndicator } from './components/tree-view/tree-view-item-indicator.js';
|
|
613
612
|
export { TreeViewItemText } from './components/tree-view/tree-view-item-text.js';
|
|
614
613
|
export { TreeViewLabel } from './components/tree-view/tree-view-label.js';
|
|
614
|
+
export { TreeViewNodeContext } from './components/tree-view/tree-view-node-context.js';
|
|
615
|
+
export { TreeViewNodeProvider } from './components/tree-view/tree-view-node-provider.js';
|
|
615
616
|
export { TreeViewRoot } from './components/tree-view/tree-view-root.js';
|
|
616
617
|
export { TreeViewRootProvider } from './components/tree-view/tree-view-root-provider.js';
|
|
617
618
|
export { TreeViewTree } from './components/tree-view/tree-view-tree.js';
|
|
618
619
|
export { useTreeView } from './components/tree-view/use-tree-view.js';
|
|
619
|
-
export { useTreeViewContext } from './components/tree-view/use-tree-view-context.js';
|
|
620
|
-
export { useTreeViewItemContext } from './components/tree-view/use-tree-view-item-context.js';
|
|
621
620
|
import * as treeView from './components/tree-view/tree-view.js';
|
|
622
621
|
export { treeView as TreeView };
|
|
623
622
|
export { EnvironmentProvider } from './providers/environment/environment-provider.js';
|