import type { ReactNode, CSSProperties, TransitionEvent, MutableRefObject } from 'react'; type AriaBoolean = boolean | 'true' | 'false'; /** * React.Ref uses the readonly type `React.RefObject` instead of * `React.MutableRefObject`, We pretty much always assume ref objects are * mutable (at least when we create them), so this type is a workaround so some * of the weird mechanics of using refs with TS. */ export type AssignableRef = { bivarianceHack(instance: ValueType | null): void; }['bivarianceHack'] | MutableRefObject; export interface GetCollapsePropsOutput { id: string; onTransitionEnd: (e: TransitionEvent) => void; style: CSSProperties; 'aria-hidden': AriaBoolean; } export interface GetCollapsePropsInput { [key: string]: unknown; style?: CSSProperties; onTransitionEnd?: (e: TransitionEvent) => void; refKey?: string; ref?: (node: ReactNode) => void | null | undefined; } export interface UseCollapseInput { isExpanded?: boolean; defaultExpanded?: boolean; collapsedHeight?: number; expandStyles?: {}; collapseStyles?: {}; easing?: string; duration?: number; onCollapseStart?: () => void; onCollapseEnd?: () => void; onExpandStart?: () => void; onExpandEnd?: () => void; hasDisabledAnimation?: boolean; } export interface UseCollapseOutput { getCollapseProps: (config?: GetCollapsePropsInput) => GetCollapsePropsOutput; isExpanded: boolean; setExpanded: React.Dispatch>; exitAnimationEnded: boolean; } export type UseControlledStateOutput = readonly [ boolean, React.Dispatch> ]; export {}; //# sourceMappingURL=types.d.ts.map