import * as React from 'react'; import { View } from 'react-native'; import type { CollapsibleRootState } from '../root/CollapsibleRoot'; import type { TransitionStatus } from '../../internals/useTransitionStatus'; import type { ZestUIComponentProps } from '../../types'; import { type MeasurePadding } from './useCollapsiblePanel'; /** * A panel with the collapsible contents. * Renders a ``. * * The panel measures its natural content size and publishes it on the state * object as `height`/`width` — the React Native counterpart of the web version's * `--collapsible-panel-height` CSS variable. Drive an `Animated` value from * `state.height` and `state.transitionStatus` to animate the panel. * * ⚠️ **Padding footgun:** The measured `height`/`width` reflects the natural * content size of the panel's **children**, not the panel element itself. If you * apply `padding` on the Panel element via `style`, the clip height will not * account for it and content at the bottom will be clipped. To pad the panel, * put padding on a child View **inside** the Panel instead, or use a * `measurePadding` prop. See `Accordion.Panel` for the same caveat. */ export declare function CollapsiblePanel(componentProps: CollapsiblePanel.Props): React.JSX.Element; export interface CollapsiblePanelState extends CollapsibleRootState { /** * The transition status of the component. */ transitionStatus: TransitionStatus; /** * The measured natural height of the panel contents, or `undefined` before * the first measurement. */ height: number | undefined; /** * The measured natural width of the panel contents, or `undefined` before * the first measurement. */ width: number | undefined; } export interface CollapsiblePanelProps extends ZestUIComponentProps { /** * Whether to keep the element rendered while the panel is closed. * * Required to animate the panel closed: React Native cannot report when a * closing animation has finished, so an unmounted panel disappears at once. * @default false */ keepMounted?: boolean | undefined; /** * Padding applied to the inner measurement wrapper so the reported * `height`/`width` reflect the padded content size. * * Use this instead of `style.padding` on the panel element to avoid the * padding footgun where the clip height does not account for padding. * The padding is applied inside the clip, so the animation height * naturally includes it. */ measurePadding?: MeasurePadding | undefined; } export declare namespace CollapsiblePanel { type State = CollapsiblePanelState; type Props = CollapsiblePanelProps; } //# sourceMappingURL=CollapsiblePanel.d.ts.map