import { type ReactNode } from "react"; import { type IAccessibilityConfigBase } from "../../typings/accessibility.js"; import { type IconType } from "../@types/icon.js"; /** * Severity / visual kind of a message. * * @internal */ export type UiMessageVariant = "info" | "success" | "warning" | "error"; /** * @internal */ export type UiMessageSize = "small" | "medium"; /** * `hug` sizes the message to its content (up to a maximum width), `fill` stretches it over its container. * * @internal */ export type UiMessageWidth = "hug" | "fill"; /** * `role`, `ariaLabel`, `ariaLabelledBy` and `ariaDescribedBy` apply to the live region around the * message text. `role` defaults to `alert` for warning and error and to `status` otherwise. * * @internal */ export interface IUiMessageAccessibilityConfig extends Pick { /** * Accessible name of the close button. Defaults to the localized "Close". */ closeButtonLabel?: string; } /** * @internal */ export interface IUiMessageProps { /** * The message text. */ children: ReactNode; /** * Defaults to `info`. */ variant?: UiMessageVariant; /** * Defaults to `medium`. */ size?: UiMessageSize; /** * Defaults to `hug`. */ width?: UiMessageWidth; /** * Shows the leading icon. Defaults to `false`. */ showIcon?: boolean; /** * Overrides the default icon of the variant. */ icon?: IconType; /** * Additional text revealed by the "Show more" link placed right after the message text. */ detail?: ReactNode; /** * Controls whether the detail is shown. Leave undefined to let the message manage it. */ isExpanded?: boolean; /** * Fired when the user toggles the detail. */ onExpandedChange?: (isExpanded: boolean) => void; /** * When provided, a close button is shown at the right edge of the message. */ onClose?: () => void; accessibilityConfig?: IUiMessageAccessibilityConfig; dataTestId?: string; } /** * Inline, persistent feedback message for communicating status, results or important information. * * @internal */ export declare function UiMessage({ children, variant, size, width, showIcon, icon, detail, isExpanded: controlledIsExpanded, onExpandedChange, onClose, accessibilityConfig, dataTestId, }: IUiMessageProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=UiMessage.d.ts.map