@react-aria/disclosure
Advanced tools
Comparing version 3.0.0-nightly-262cc758b-241115 to 3.0.0-nightly-326f48154-241212
@@ -24,3 +24,3 @@ import { AriaButtonProps } from "@react-types/button"; | ||
* @param state - State for the disclosure, as returned by `useDisclosureState`. | ||
* @param ref - A ref for the disclosure content. | ||
* @param ref - A ref for the disclosure panel. | ||
*/ | ||
@@ -27,0 +27,0 @@ export function useDisclosure(props: AriaDisclosureProps, state: DisclosureState, ref: RefObject<Element | null>): DisclosureAria; |
@@ -29,3 +29,3 @@ var $l3cx6$reactdom = require("react-dom"); | ||
let triggerId = (0, $l3cx6$reactariautils.useId)(); | ||
let contentId = (0, $l3cx6$reactariautils.useId)(); | ||
let panelId = (0, $l3cx6$reactariautils.useId)(); | ||
let isSSR = (0, $l3cx6$reactariassr.useIsSSR)(); | ||
@@ -72,3 +72,3 @@ let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body; | ||
'aria-expanded': state.isExpanded, | ||
'aria-controls': contentId, | ||
'aria-controls': panelId, | ||
onPress: (e)=>{ | ||
@@ -83,3 +83,3 @@ if (!isDisabled && e.pointerType !== 'keyboard') state.toggle(); | ||
panelProps: { | ||
id: contentId, | ||
id: panelId, | ||
// This can be overridden at the panel element level. | ||
@@ -86,0 +86,0 @@ role: 'group', |
@@ -23,3 +23,3 @@ import {flushSync as $6wN6e$flushSync} from "react-dom"; | ||
let triggerId = (0, $6wN6e$useId)(); | ||
let contentId = (0, $6wN6e$useId)(); | ||
let panelId = (0, $6wN6e$useId)(); | ||
let isSSR = (0, $6wN6e$useIsSSR)(); | ||
@@ -66,3 +66,3 @@ let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body; | ||
'aria-expanded': state.isExpanded, | ||
'aria-controls': contentId, | ||
'aria-controls': panelId, | ||
onPress: (e)=>{ | ||
@@ -77,3 +77,3 @@ if (!isDisabled && e.pointerType !== 'keyboard') state.toggle(); | ||
panelProps: { | ||
id: contentId, | ||
id: panelId, | ||
// This can be overridden at the panel element level. | ||
@@ -80,0 +80,0 @@ role: 'group', |
{ | ||
"name": "@react-aria/disclosure", | ||
"version": "3.0.0-nightly-262cc758b-241115", | ||
"version": "3.0.0-nightly-326f48154-241212", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,21 +25,15 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/button": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-aria/selection": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-aria/ssr": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-aria/utils": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-stately/disclosure": "3.0.0-nightly-262cc758b-241115", | ||
"@react-stately/toggle": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-stately/tree": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-types/button": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-types/shared": "^3.0.0-nightly-262cc758b-241115", | ||
"@react-aria/ssr": "3.0.0-nightly-326f48154-241212", | ||
"@react-aria/utils": "3.0.0-nightly-326f48154-241212", | ||
"@react-stately/disclosure": "3.0.0-nightly-326f48154-241212", | ||
"@react-types/button": "3.0.0-nightly-326f48154-241212", | ||
"@swc/helpers": "^0.5.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0", | ||
"react-dom": "^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", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"stableVersion": "3.0.0-alpha.1" | ||
} | ||
} |
@@ -42,3 +42,3 @@ /* | ||
* @param state - State for the disclosure, as returned by `useDisclosureState`. | ||
* @param ref - A ref for the disclosure content. | ||
* @param ref - A ref for the disclosure panel. | ||
*/ | ||
@@ -50,3 +50,3 @@ export function useDisclosure(props: AriaDisclosureProps, state: DisclosureState, ref: RefObject<Element | null>): DisclosureAria { | ||
let triggerId = useId(); | ||
let contentId = useId(); | ||
let panelId = useId(); | ||
let isSSR = useIsSSR(); | ||
@@ -100,3 +100,3 @@ let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body; | ||
'aria-expanded': state.isExpanded, | ||
'aria-controls': contentId, | ||
'aria-controls': panelId, | ||
onPress: (e) => { | ||
@@ -115,3 +115,3 @@ if (!isDisabled && e.pointerType !== 'keyboard') { | ||
panelProps: { | ||
id: contentId, | ||
id: panelId, | ||
// This can be overridden at the panel element level. | ||
@@ -118,0 +118,0 @@ role: 'group', |
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
7
35132
+ Added@react-aria/ssr@3.0.0-nightly-326f48154-241212(transitive)
+ Added@react-aria/utils@3.0.0-nightly-326f48154-241212(transitive)
+ Added@react-stately/disclosure@3.0.0-nightly-326f48154-241212(transitive)
+ Added@react-stately/utils@3.0.0-nightly-326f48154-241212(transitive)
+ Added@react-types/button@3.0.0-nightly-326f48154-241212(transitive)
+ Added@react-types/shared@3.0.0-nightly-326f48154-241212(transitive)
- Removed@react-aria/selection@^3.0.0-nightly-262cc758b-241115
- Removed@react-stately/toggle@^3.0.0-nightly-262cc758b-241115
- Removed@react-stately/tree@^3.0.0-nightly-262cc758b-241115
- Removed@react-types/shared@^3.0.0-nightly-262cc758b-241115
- Removed@formatjs/ecma402-abstract@2.3.2(transitive)
- Removed@formatjs/fast-memoize@2.2.6(transitive)
- Removed@formatjs/icu-messageformat-parser@2.10.0(transitive)
- Removed@formatjs/icu-skeleton-parser@1.8.12(transitive)
- Removed@formatjs/intl-localematcher@0.5.10(transitive)
- Removed@internationalized/date@3.7.0(transitive)
- Removed@internationalized/message@3.1.6(transitive)
- Removed@internationalized/number@3.6.0(transitive)
- Removed@internationalized/string@3.2.5(transitive)
- Removed@react-aria/button@3.11.1(transitive)
- Removed@react-aria/focus@3.19.1(transitive)
- Removed@react-aria/i18n@3.12.5(transitive)
- Removed@react-aria/interactions@3.23.0(transitive)
- Removed@react-aria/selection@3.22.0(transitive)
- Removed@react-aria/ssr@3.9.7(transitive)
- Removed@react-aria/toolbar@3.0.0-beta.12(transitive)
- Removed@react-aria/utils@3.27.0(transitive)
- Removed@react-stately/collections@3.12.1(transitive)
- Removed@react-stately/disclosure@3.0.0-nightly-262cc758b-241115(transitive)
- Removed@react-stately/selection@3.19.0(transitive)
- Removed@react-stately/toggle@3.8.1(transitive)
- Removed@react-stately/tree@3.8.7(transitive)
- Removed@react-stately/utils@3.10.5(transitive)
- Removed@react-types/button@3.10.2(transitive)
- Removed@react-types/checkbox@3.9.1(transitive)
- Removed@react-types/shared@3.27.0(transitive)
- Removeddecimal.js@10.4.3(transitive)
- Removedintl-messageformat@10.7.12(transitive)
Updated@react-stately/disclosure@3.0.0-nightly-326f48154-241212