import { default as React } from 'react'; import { PaletteNames } from '../../theme/palette'; import { ElementHeaderType } from '../ElementHeader/ElementHeader'; import { ListEditModeItemProps } from '../ListEditMode'; import { TitleTags } from '../Title'; export type ExpanderListColors = Extract; export interface ExpanderType extends React.FC { ElementHeader?: ElementHeaderType; } export interface ExpanderListCompound extends React.FC { Expander: ExpanderType; } export type ExpanderListVariant = 'line' | 'outline' | 'fill' | 'fill-negative'; export type ExpanderListStatus = 'none' | 'new'; interface ExpanderListProps { /** Toggles accordion functionality for the expanders. */ accordion?: boolean; /** Items in the ExpanderList */ children: React.ReactNode; /** Toggles padding of child elements */ childPadding?: boolean; /** Adds custom classes to the element. */ className?: string; /** Changes the colors of the list. */ color?: ExpanderListColors; /** Changes the font size. */ large?: boolean; /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */ renderChildrenWhenClosed?: boolean; /** Sets the data-testid attribute. */ testId?: string; /** Sets visual priority */ variant?: ExpanderListVariant; /** Overrides the default z-index of the expander header */ zIndex?: number; /** Highlights text in title and content. Used for search results */ highlightText?: string; /** * @experimental This prop is experimental and may change in the future. * Enables ListEditMode */ editMode?: boolean; /** Ref passed to the ul element */ ref?: React.Ref; } type Modify = Omit & R; type ExpanderProps = Modify, { id?: string; title: React.ReactElement | string; /** Changes the underlying element of the title. Default: span*/ titleHtmlMarkup?: TitleTags; children: React.ReactNode; className?: string; color?: ExpanderListColors; icon?: React.ReactElement; padding?: boolean; expanded?: boolean; large?: boolean; testId?: string; handleExpanderClick?: (event: React.MouseEvent) => void; /** Called when expander is open/closed. */ onExpand?: (isExpanded: boolean) => void; /** Overrides the default z-index of the expander header */ zIndex?: number; /** Highlights text in title and content. Override if different from list. */ highlightText?: string; /** Displays a status on the left side: default none */ status?: ExpanderListStatus; /** Ref passed to the li element */ ref?: React.Ref; }> & Pick & ListEditModeItemProps; export declare const Expander: ExpanderType; declare const ExpanderList: ExpanderListCompound; export default ExpanderList;