import { type MouseEvent, type PropsWithChildren, type ReactNode } from "react"; import type { SX } from "../../theme"; import { type IconName } from "../Icon"; import { textVariantMapping } from "../Text"; export type ActionListVariant = "borderless" | "bordered" | "compact" | "compact-bordered"; export interface ActionListProps extends PropsWithChildren { variant?: ActionListVariant; gap?: 0 | 4 | 8; sx?: SX; } export declare function ActionList(props: ActionListProps): JSX.Element; type Color = "grey" | "tomato"; export type ActionListItemProps = { children?: ReactNode; color?: Color; backgroundColor?: "grey" | "transparent"; description?: ReactNode; disabled?: boolean; selected?: boolean; onClick?: (event: MouseEvent) => void; onMouseDown?: (event: MouseEvent) => void; renderEndIcon?: (icon: ReactNode) => ReactNode; renderStartIcon?: (icon: ReactNode) => ReactNode; startIcon?: IconName; readOnly?: boolean; textVariant?: keyof typeof textVariantMapping; /** * For progress step use-case, * mandatory to pass the boolean value for each item, even if `false`. */ completed?: boolean; /** * Change the default rendered element for the one passed as a child, * merging their props and behavior. * @default false */ asChild?: boolean; /** * Override the variant from ActionList */ variant?: ActionListVariant; /** * If true, the item title and description will be rendered on a single line. */ oneLine?: boolean; /** * If true, title won't be wrapped */ noWrapTitle?: boolean; /** * If true, description will not shrink */ noShrinkDescription?: boolean; /** * If true, the item title and description won't be wrapped */ noWrap?: boolean; /** * The variant of the selected item. */ selectedVariant?: "default" | "shadow"; } & ActionListItemEndProps; export type ActionListItemEndProps = { endAdornment?: ReactNode; endIcon?: IconName; endOverlay?: never; } | { endAdornment?: never; endIcon?: never; /** * An overlay element that will be rendered on top of the item at the end. * Useful when you cannot use the `endAdornment` prop, * ie. when you have to render a button on the right and the ActionListItem itself is a Link. * (you cannot nest buttons inside links in HTML, but you can display them on top of the link) */ endOverlay: ReactNode; }; export declare const ActionListItem: (props: ActionListItemProps & import("react").RefAttributes) => import("react").ReactElement> | null; interface SlotChildProps { children: ReactNode; /** * Children passed by the user. */ externalChildren?: ReactNode; asChild: boolean; } /** * This component is used to properly render Slot's children. */ export declare const SlotChild: (props: SlotChildProps & import("react").RefAttributes) => import("react").ReactElement> | null; export declare function ActionListLabel(props: PropsWithChildren): JSX.Element; export declare function ActionListHeader(props: PropsWithChildren): JSX.Element; export {};