import * as React from 'react'; import { View } from 'react-native'; import type { ZestUIComponentProps } from '../../types'; import type { ZestChangeEventDetails } from '../../utils/createChangeEventDetails'; import type { REASONS } from '../../utils/reasons'; /** * Groups all parts of the accordion. * Renders a ``. * * Upstream's `orientation` and `loopFocus` props are omitted: both are * deprecated there (roving focus was removed) and neither has meaning without * a keyboard. */ export declare function AccordionRoot(componentProps: AccordionRoot.Props): React.JSX.Element; export type AccordionValue = Value[]; export interface AccordionRootState { /** * The current value. */ value: AccordionValue; /** * Whether the component should ignore user interaction. */ disabled: boolean; } export interface AccordionRootProps extends Omit>, 'value'> { /** * The controlled value of the item(s) that should be expanded. * Accepts a single value or an array of values. * * To render an uncontrolled accordion, use the `defaultValue` prop instead. */ value?: Value | AccordionValue | undefined; /** * The uncontrolled value of the item(s) that should be initially expanded. * Accepts a single value or an array of values. * * To render a controlled accordion, use the `value` prop instead. */ defaultValue?: Value | AccordionValue | undefined; /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean | undefined; /** * Whether to keep the element rendered while the panel is closed. * @default false */ keepMounted?: boolean | undefined; /** * Event handler called when an accordion item is expanded or collapsed. * Provides the new value as an argument. */ onValueChange?: ((value: AccordionValue, eventDetails: AccordionRoot.ChangeEventDetails) => void) | undefined; /** * Whether multiple items can be open at the same time. * @default false */ multiple?: boolean | undefined; } export type AccordionRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.none; export type AccordionRootChangeEventDetails = ZestChangeEventDetails; export declare namespace AccordionRoot { type Value = AccordionValue; type State = AccordionRootState; type Props = AccordionRootProps; type ChangeEventReason = AccordionRootChangeEventReason; type ChangeEventDetails = AccordionRootChangeEventDetails; } //# sourceMappingURL=AccordionRoot.d.ts.map