You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@react-aria/tree

Package Overview
Dependencies
Maintainers
2
Versions
428
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/tree - npm Package Compare versions

Comparing version

to
3.0.0-nightly-e97af2b53-250726

dist/useTreeItem.main.js

7

dist/main.js
var $0caa22fd4e1b3c7e$exports = require("./useTree.main.js");
var $41ae298c995bc55f$exports = require("./useTreeGridList.main.js");
var $89b99a0b1379ba07$exports = require("./useTreeGridListItem.main.js");
var $739d43f6fe8a5583$exports = require("./useTreeItem.main.js");

@@ -11,4 +10,3 @@

$parcel$export(module.exports, "useTree", () => $0caa22fd4e1b3c7e$exports.useTree);
$parcel$export(module.exports, "useTreeGridList", () => $41ae298c995bc55f$exports.useTreeGridList);
$parcel$export(module.exports, "useTreeGridListItem", () => $89b99a0b1379ba07$exports.useTreeGridListItem);
$parcel$export(module.exports, "useTreeItem", () => $739d43f6fe8a5583$exports.useTreeItem);
/*

@@ -28,3 +26,2 @@ * Copyright 2020 Adobe. All rights reserved.

//# sourceMappingURL=main.js.map
import {useTree as $6d8a57ce39fda2fa$export$fb0040ce9d6e8bd1} from "./useTree.module.js";
import {useTreeGridList as $1642482277341dec$export$abb2211d46906a63} from "./useTreeGridList.module.js";
import {useTreeGridListItem as $0cbbe9a595ac1615$export$8001083cb3f61028} from "./useTreeGridListItem.module.js";
import {useTreeItem as $b41e0bc5ca49db3d$export$e4bcc4675b2b123a} from "./useTreeItem.module.js";

@@ -19,4 +18,3 @@ /*

export {$6d8a57ce39fda2fa$export$fb0040ce9d6e8bd1 as useTree, $1642482277341dec$export$abb2211d46906a63 as useTreeGridList, $0cbbe9a595ac1615$export$8001083cb3f61028 as useTreeGridListItem};
export {$6d8a57ce39fda2fa$export$fb0040ce9d6e8bd1 as useTree, $b41e0bc5ca49db3d$export$e4bcc4675b2b123a as useTreeItem};
//# sourceMappingURL=module.js.map

@@ -5,8 +5,7 @@ import { AriaGridListOptions, AriaGridListProps, GridListProps, AriaGridListItemOptions, GridListItemAria } from "@react-aria/gridlist";

import { AriaButtonProps } from "@react-types/button";
export function useTree(): {};
export interface TreeGridListProps<T> extends GridListProps<T> {
export interface TreeProps<T> extends GridListProps<T> {
}
export interface AriaTreeGridListProps<T> extends Omit<AriaGridListProps<T>, 'keyboardNavigationBehavior'> {
export interface AriaTreeProps<T> extends Omit<AriaGridListProps<T>, 'keyboardNavigationBehavior'> {
}
export interface AriaTreeGridListOptions<T> extends Omit<AriaGridListOptions<T>, 'children' | 'shouldFocusWrap'> {
export interface AriaTreeOptions<T> extends Omit<AriaGridListOptions<T>, 'children' | 'shouldFocusWrap'> {
/**

@@ -18,3 +17,3 @@ * An optional keyboard delegate implementation for type to select,

}
export interface TreeGridListAria {
export interface TreeAria {
/** Props for the treegrid element. */

@@ -30,8 +29,8 @@ gridProps: DOMAttributes;

*/
export function useTreeGridList<T>(props: AriaTreeGridListOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement | null>): TreeGridListAria;
export interface AriaTreeGridListItemOptions extends Omit<AriaGridListItemOptions, 'isVirtualized'> {
export function useTree<T>(props: AriaTreeOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement | null>): TreeAria;
export interface AriaTreeItemOptions extends Omit<AriaGridListItemOptions, 'isVirtualized'> {
/** An object representing the treegrid item. Contains all the relevant information that makes up the treegrid row. */
node: Node<unknown>;
}
export interface TreeGridListItemAria extends GridListItemAria {
export interface TreeItemAria extends GridListItemAria {
/** Props for the tree grid row element. */

@@ -52,4 +51,4 @@ rowProps: DOMAttributes;

*/
export function useTreeGridListItem<T>(props: AriaTreeGridListItemOptions, state: TreeState<T>, ref: RefObject<FocusableElement | null>): TreeGridListItemAria;
export function useTreeItem<T>(props: AriaTreeItemOptions, state: TreeState<T>, ref: RefObject<FocusableElement | null>): TreeItemAria;
//# sourceMappingURL=types.d.ts.map

@@ -0,2 +1,4 @@

var $hREOp$reactariagridlist = require("@react-aria/gridlist");
function $parcel$export(e, n, v, s) {

@@ -8,3 +10,3 @@ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});

/*
* Copyright 2020 Adobe. All rights reserved.
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");

@@ -18,4 +20,9 @@ * you may not use this file except in compliance with the License. You may obtain a copy

* governing permissions and limitations under the License.
*/ function $0caa22fd4e1b3c7e$export$fb0040ce9d6e8bd1() {
return {};
*/
function $0caa22fd4e1b3c7e$export$fb0040ce9d6e8bd1(props, state, ref) {
let { gridProps: gridProps } = (0, $hREOp$reactariagridlist.useGridList)(props, state, ref);
gridProps.role = 'treegrid';
return {
gridProps: gridProps
};
}

@@ -22,0 +29,0 @@

@@ -0,3 +1,5 @@

import {useGridList as $gdAyK$useGridList} from "@react-aria/gridlist";
/*
* Copyright 2020 Adobe. All rights reserved.
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");

@@ -11,4 +13,9 @@ * you may not use this file except in compliance with the License. You may obtain a copy

* governing permissions and limitations under the License.
*/ function $6d8a57ce39fda2fa$export$fb0040ce9d6e8bd1() {
return {};
*/
function $6d8a57ce39fda2fa$export$fb0040ce9d6e8bd1(props, state, ref) {
let { gridProps: gridProps } = (0, $gdAyK$useGridList)(props, state, ref);
gridProps.role = 'treegrid';
return {
gridProps: gridProps
};
}

@@ -15,0 +22,0 @@

{
"name": "@react-aria/tree",
"version": "3.0.0-nightly-e94e36431-241203",
"version": "3.0.0-nightly-e97af2b53-250726",
"description": "Spectrum UI components in React",

@@ -9,3 +9,7 @@ "license": "Apache-2.0",

"exports": {
"types": "./dist/types.d.ts",
"source": "./src/index.ts",
"types": [
"./dist/types.d.ts",
"./src/index.ts"
],
"import": "./dist/import.mjs",

@@ -26,9 +30,9 @@ "require": "./dist/main.js"

"dependencies": {
"@react-aria/gridlist": "^3.0.0-nightly-e94e36431-241203",
"@react-aria/i18n": "^3.0.0-nightly-e94e36431-241203",
"@react-aria/selection": "^3.0.0-nightly-e94e36431-241203",
"@react-aria/utils": "^3.0.0-nightly-e94e36431-241203",
"@react-stately/tree": "^3.0.0-nightly-e94e36431-241203",
"@react-types/button": "^3.0.0-nightly-e94e36431-241203",
"@react-types/shared": "^3.0.0-nightly-e94e36431-241203",
"@react-aria/gridlist": "3.0.0-nightly-e97af2b53-250726",
"@react-aria/i18n": "3.0.0-nightly-e97af2b53-250726",
"@react-aria/selection": "3.0.0-nightly-e97af2b53-250726",
"@react-aria/utils": "3.0.0-nightly-e97af2b53-250726",
"@react-stately/tree": "3.0.0-nightly-e97af2b53-250726",
"@react-types/button": "3.0.0-nightly-e97af2b53-250726",
"@react-types/shared": "3.0.0-nightly-e97af2b53-250726",
"@swc/helpers": "^0.5.0"

@@ -42,4 +46,3 @@ },

"access": "public"
},
"stableVersion": "3.0.0-beta.2"
}
}

@@ -14,6 +14,5 @@ /*

export {useTree} from './useTree';
export {useTreeGridList} from './useTreeGridList';
export {useTreeGridListItem} from './useTreeGridListItem';
export {useTreeItem} from './useTreeItem';
export type {AriaTreeGridListOptions, AriaTreeGridListProps, TreeGridListAria, TreeGridListProps} from './useTreeGridList';
export type {AriaTreeGridListItemOptions, TreeGridListItemAria} from './useTreeGridListItem';
export type {AriaTreeOptions, AriaTreeProps, TreeAria, TreeProps} from './useTree';
export type {AriaTreeItemOptions, TreeItemAria} from './useTreeItem';
/*
* Copyright 2020 Adobe. All rights reserved.
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");

@@ -13,4 +13,40 @@ * you may not use this file except in compliance with the License. You may obtain a copy

export function useTree() {
return {};
import {AriaGridListOptions, AriaGridListProps, GridListProps, useGridList} from '@react-aria/gridlist';
import {
DOMAttributes,
KeyboardDelegate,
RefObject
} from '@react-types/shared';
import {TreeState} from '@react-stately/tree';
export interface TreeProps<T> extends GridListProps<T> {}
export interface AriaTreeProps<T> extends Omit<AriaGridListProps<T>, 'keyboardNavigationBehavior'> {}
export interface AriaTreeOptions<T> extends Omit<AriaGridListOptions<T>, 'children' | 'shouldFocusWrap'> {
/**
* An optional keyboard delegate implementation for type to select,
* to override the default.
*/
keyboardDelegate?: KeyboardDelegate
}
export interface TreeAria {
/** Props for the treegrid element. */
gridProps: DOMAttributes
}
/**
* Provides the behavior and accessibility implementation for a single column treegrid component with interactive children.
* A tree grid provides users with a way to navigate nested hierarchical information.
* @param props - Props for the treegrid.
* @param state - State for the treegrid, as returned by `useTreeState`.
* @param ref - The ref attached to the treegrid element.
*/
export function useTree<T>(props: AriaTreeOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement | null>): TreeAria {
let {gridProps} = useGridList(props, state, ref);
gridProps.role = 'treegrid';
return {
gridProps
};
}

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