@react-stately/disclosure
Advanced tools
Comparing version 3.0.0-nightly-9421c1409-240923 to 3.0.0-nightly-987f174ba-241015
var $be8c72c0f1e8f9cb$exports = require("./useDisclosureState.main.js"); | ||
var $8654db152d40114d$exports = require("./useDisclosureGroupState.main.js"); | ||
@@ -9,2 +10,3 @@ | ||
$parcel$export(module.exports, "useDisclosureState", () => $be8c72c0f1e8f9cb$exports.useDisclosureState); | ||
$parcel$export(module.exports, "useDisclosureGroupState", () => $8654db152d40114d$exports.useDisclosureGroupState); | ||
/* | ||
@@ -23,2 +25,3 @@ * Copyright 2024 Adobe. All rights reserved. | ||
//# sourceMappingURL=main.js.map |
import {useDisclosureState as $bf996d45f4a36925$export$3fcbf6e4407997e0} from "./useDisclosureState.module.js"; | ||
import {useDisclosureGroupState as $9385b3affbdec831$export$f36461af0ef4707d} from "./useDisclosureGroupState.module.js"; | ||
@@ -16,3 +17,4 @@ /* | ||
export {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState}; | ||
export {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState, $9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState}; | ||
//# sourceMappingURL=module.js.map |
@@ -0,1 +1,2 @@ | ||
import { Expandable, Key } from "@react-types/shared"; | ||
export interface DisclosureProps { | ||
@@ -26,3 +27,26 @@ /** Whether the disclosure is expanded (controlled). */ | ||
export function useDisclosureState(props: DisclosureProps): DisclosureState; | ||
export interface DisclosureGroupProps extends Expandable { | ||
/** Whether multiple items can be expanded at the same time. */ | ||
allowsMultipleExpanded?: boolean; | ||
/** Whether all items are disabled. */ | ||
isDisabled?: boolean; | ||
} | ||
export interface DisclosureGroupState { | ||
/** Whether multiple items can be expanded at the same time. */ | ||
readonly allowsMultipleExpanded: boolean; | ||
/** Whether all items are disabled. */ | ||
readonly isDisabled: boolean; | ||
/** A set of keys for items that are expanded. */ | ||
readonly expandedKeys: Set<Key>; | ||
/** Toggles the expanded state for an item by its key. */ | ||
toggleKey(key: Key): void; | ||
/** Replaces the set of expanded keys. */ | ||
setExpandedKeys(keys: Set<Key>): void; | ||
} | ||
/** | ||
* Manages state for a group of disclosures, e.g. an accordion. | ||
* It supports both single and multiple expanded items. | ||
*/ | ||
export function useDisclosureGroupState(props: DisclosureGroupProps): DisclosureGroupState; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-stately/disclosure", | ||
"version": "3.0.0-nightly-9421c1409-240923", | ||
"version": "3.0.0-nightly-987f174ba-241015", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,4 +25,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-stately/utils": "^3.0.0-nightly-9421c1409-240923", | ||
"@react-types/shared": "^3.0.0-nightly-9421c1409-240923", | ||
"@react-stately/utils": "^3.0.0-nightly-987f174ba-241015", | ||
"@react-types/shared": "^3.0.0-nightly-987f174ba-241015", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -29,0 +29,0 @@ }, |
@@ -14,3 +14,5 @@ /* | ||
export {useDisclosureState} from './useDisclosureState'; | ||
export {useDisclosureGroupState} from './useDisclosureGroupState'; | ||
export type {DisclosureState, DisclosureProps} from './useDisclosureState'; | ||
export type {DisclosureGroupState, DisclosureGroupProps} from './useDisclosureGroupState'; |
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
42043
22
507
6