import type { KeyboardEvent, MouseEvent, ReactNode } from 'react'; import React from 'react'; type AccordionItemType = 'box' | 'panel'; export interface Props { /** * Accordion item title */ title: string; /** * Unique ID for the component */ id?: string; /** * Allows to change the styling of component * * @param {AccordionItemType} box Styled as Box component with level set to `none` * @param {AccordionItemType} panel With transparent background and line as separation * * @default 'box' */ type?: AccordionItemType; /** * Content of Accordion Item */ children?: ReactNode; /** * Allows to expand or collapse the component * * @default false */ isExpanded?: boolean; /** * Allows to set item title highlight of Accordion Item when it is in expanded state. * Affects also highlight of CSS :hover and :active states * * @default true For `panel` type * @default false For `box` type */ highlightSelected?: boolean; /** * Display close button in the item content * * @default false */ hasCloseButton?: boolean; /** * Label to show for the open icon for accessibility */ openLabel?: string; /** * Label to show for the close button in the content */ closeLabel?: string; /** * On component title and close button mouse click callback * Use `e.currentTarget.parentElement` to get AccordionItem element */ onClick?: (e: MouseEvent) => void; /** * On component title and close button keyboard key down callback * Use `e.currentTarget.parentElement` to get AccordionItem element */ onKeyDown?: (e: KeyboardEvent) => void; /** * Allows to pass a custom className */ className?: string; /** * Allows to pass testid string for testing purposes */ 'data-testid'?: string; } /** @visibleName Accordion Item */ declare const AccordionItem: ({ "data-testid": dataTestId, type, hasCloseButton, highlightSelected, ...props }: Props) => React.JSX.Element; /** @component */ export default AccordionItem;