import { BoxProps, ElementProps, Factory, FloatingPosition, StylesApiProps } from '@mantine/core'; import { type ReactNode } from 'react'; import { type InfoTokenSizes } from '../InfoToken/InfoToken.js'; export type ContextualHelpVariant = 'text' | 'interactive'; export type ContextualHelpStylesNames = 'root' | 'dropdown'; export interface ContextualHelpProps extends BoxProps, StylesApiProps, ElementProps<'button', 'children' | 'ref'> { /** * The help content. Use the `interactive` variant when it contains links or other interactive elements. */ children: ReactNode; /** * How the help content is displayed. * - `text`: for short, plain text content, shown in a tooltip * - `interactive`: for content with links or other interactive elements, shown in a hover card * * @default 'text' */ variant?: ContextualHelpVariant; /** * The size of the question icon. * * @default 'xs' */ size?: InfoTokenSizes; /** * The position of the help content relative to the icon. * * @default 'top' */ position?: FloatingPosition; /** * Whether the icon is a focusable button. Set it to `false` only inside an interactive container (e.g. a card * rendered as a button), where a nested button is invalid. The help then opens on hover only and can't be reached * with the keyboard. Inside a RadioCard label, it defaults to `false`. * * @default true */ focusable?: boolean; /** * The accessible name of the icon button. * * @default 'More information' */ 'aria-label'?: string; } export type ContextualHelpFactory = Factory<{ props: ContextualHelpProps; ref: HTMLElement; stylesNames: ContextualHelpStylesNames; variant: ContextualHelpVariant; }>; export declare const ContextualHelp: import("@mantine/core").MantineComponent<{ props: ContextualHelpProps; ref: HTMLElement; stylesNames: ContextualHelpStylesNames; variant: ContextualHelpVariant; }>; export declare namespace ContextualHelp { type Props = ContextualHelpProps; type StylesNames = ContextualHelpStylesNames; type Factory = ContextualHelpFactory; } //# sourceMappingURL=ContextualHelp.d.ts.map