@react-stately/disclosure
Advanced tools
Comparing version 3.0.0-nightly-987f174ba-241015 to 3.0.0-nightly-993de98ad-241210
@@ -1,2 +0,2 @@ | ||
import { Expandable, Key } from "@react-types/shared"; | ||
import { Key } from "@react-types/shared"; | ||
export interface DisclosureProps { | ||
@@ -27,3 +27,3 @@ /** Whether the disclosure is expanded (controlled). */ | ||
export function useDisclosureState(props: DisclosureProps): DisclosureState; | ||
export interface DisclosureGroupProps extends Expandable { | ||
export interface DisclosureGroupProps { | ||
/** Whether multiple items can be expanded at the same time. */ | ||
@@ -33,2 +33,8 @@ allowsMultipleExpanded?: boolean; | ||
isDisabled?: boolean; | ||
/** The currently expanded keys in the group (controlled). */ | ||
expandedKeys?: Iterable<Key>; | ||
/** The initial expanded keys in the group (uncontrolled). */ | ||
defaultExpandedKeys?: Iterable<Key>; | ||
/** Handler that is called when items are expanded or collapsed. */ | ||
onExpandedChange?: (keys: Set<Key>) => any; | ||
} | ||
@@ -35,0 +41,0 @@ export interface DisclosureGroupState { |
{ | ||
"name": "@react-stately/disclosure", | ||
"version": "3.0.0-nightly-987f174ba-241015", | ||
"version": "3.0.0-nightly-993de98ad-241210", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,8 +25,8 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-stately/utils": "^3.0.0-nightly-987f174ba-241015", | ||
"@react-types/shared": "^3.0.0-nightly-987f174ba-241015", | ||
"@react-stately/utils": "^3.0.0-nightly-993de98ad-241210", | ||
"@react-types/shared": "^3.0.0-nightly-993de98ad-241210", | ||
"@swc/helpers": "^0.5.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
@@ -36,3 +36,3 @@ "publishConfig": { | ||
}, | ||
"stableVersion": "3.0.0-alpha.0" | ||
"stableVersion": "3.0.0" | ||
} |
@@ -13,11 +13,17 @@ /* | ||
import {Expandable, Key} from '@react-types/shared'; | ||
import {Key} from '@react-types/shared'; | ||
import {useControlledState} from '@react-stately/utils'; | ||
import {useEffect, useMemo} from 'react'; | ||
export interface DisclosureGroupProps extends Expandable { | ||
export interface DisclosureGroupProps { | ||
/** Whether multiple items can be expanded at the same time. */ | ||
allowsMultipleExpanded?: boolean, | ||
/** Whether all items are disabled. */ | ||
isDisabled?: boolean | ||
isDisabled?: boolean, | ||
/** The currently expanded keys in the group (controlled). */ | ||
expandedKeys?: Iterable<Key>, | ||
/** The initial expanded keys in the group (uncontrolled). */ | ||
defaultExpandedKeys?: Iterable<Key>, | ||
/** Handler that is called when items are expanded or collapsed. */ | ||
onExpandedChange?: (keys: Set<Key>) => any | ||
} | ||
@@ -24,0 +30,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43388
519