import { ReactNode, RefObject } from 'react'; import { AriaButtonProps as RaButtonProps } from 'react-aria'; import { HTMLChakraProps, SlotRecipeProps } from '@chakra-ui/react/styled-system'; import { OmitInternalProps } from '../../type-utils/omit-props'; export type CollapsibleMotionRecipeProps = SlotRecipeProps<"nimbusCollapsibleMotion">; export type CollapsibleMotionRootSlotProps = HTMLChakraProps<"div", CollapsibleMotionRecipeProps>; export type CollapsibleMotionTriggerSlotProps = HTMLChakraProps<"button">; export type CollapsibleMotionContentSlotProps = HTMLChakraProps<"div">; export type CollapsibleMotionContextValue = { isDisabled: boolean; isExpanded: boolean; buttonProps: RaButtonProps<"button">; panelProps: React.HTMLAttributes; panelRef: RefObject; }; export type CollapsibleMotionRootProps = OmitInternalProps & { /** * Content of the collapsible component */ children: ReactNode; /** * Default expanded state (uncontrolled mode) * @default false */ defaultExpanded?: boolean; /** * Controlled expanded state */ isExpanded?: boolean; /** * Callback fired when expanded state changes */ onExpandedChange?: (isExpanded: boolean) => void; /** * Whether the component is disabled * @default false */ isDisabled?: boolean; /** * Data attributes for testing or custom metadata */ [key: `data-${string}`]: unknown; }; export type CollapsibleMotionTriggerProps = OmitInternalProps & { /** * Content to display in the trigger button */ children: React.ReactNode; /** * Whether to render as a child component * @default false */ asChild?: boolean; }; export type CollapsibleMotionContentProps = OmitInternalProps & { /** * Content to display inside the collapsible area */ children: ReactNode; };