import type { Placement, TextBreak, TooltipTransitionBehavior } from '../types';
/**
* Options for configuring a tooltip via data attributes
*/
export interface TipPropsOptions {
/** Tooltip content (required) */
tip: string;
/** Unique identifier for the tooltip target */
id?: string;
/** Tooltip placement relative to target */
placement?: Placement;
/** Delay before showing tooltip (ms) */
showDelay?: number;
/** Delay before hiding tooltip (ms) */
hideDelay?: number;
/** Disable the tooltip */
disabled?: boolean;
/** Enable text truncation with ellipsis */
ellipsis?: boolean;
/** Maximum lines before truncation */
maxLines?: number;
/** Enable word wrapping */
wordWrap?: boolean;
/**
* Text break behavior - controls where words can break
* - 'normal': Break at word boundaries (default)
* - 'break-all': Can break in middle of words (for long URLs, codes)
* - 'keep-all': Don't break CJK characters (for Asian languages)
*/
textBreak?: TextBreak;
/** Maximum width in pixels */
maxWidth?: number;
/** Parse content as HTML */
html?: boolean;
/** Keep tooltip visible when hovering over it */
interactive?: boolean;
/** Transition behavior when moving between targets */
transitionBehavior?: TooltipTransitionBehavior;
/** Duration of move transition animation (ms) */
moveTransitionDuration?: number;
/** Show or hide the arrow (default: true) */
showArrow?: boolean;
/** Keyboard shortcut to display alongside the tooltip content */
shortcut?: string;
/** Show tooltip when element receives keyboard focus */
showOnFocus?: boolean;
}
/**
* Return type of getTipProps - data attributes for tooltip
*/
export interface TipPropsResult {
'data-tip': string;
'data-tip-id'?: string;
'data-tip-placement'?: Placement;
'data-tip-delay'?: string;
'data-tip-hide-delay'?: string;
'data-tip-disabled'?: '';
'data-tip-ellipsis'?: '';
'data-tip-max-lines'?: string;
'data-tip-word-wrap'?: '';
'data-tip-text-break'?: TextBreak;
'data-tip-max-width'?: string;
'data-tip-html'?: '';
'data-tip-interactive'?: '';
'data-tip-move'?: '';
'data-tip-jump'?: '';
'data-tip-move-duration'?: string;
'data-tip-no-arrow'?: '';
'data-tip-shortcut'?: string;
'data-tip-show-on-focus'?: '';
}
/**
* Creates data attribute props for a tooltip.
* Use this to configure tooltips with TypeScript support and spread onto elements.
*
* @example
* ```tsx
* const tipProps = getTipProps({
* tip: 'Save changes',
* placement: 'bottom',
* showDelay: 100,
* });
*
*
* ```
*
* @example
* ```tsx
* // With keyboard shortcut
* const tipProps = getTipProps({
* tip: 'Copy',
* shortcut: '⌘C',
* hideDelay: 500,
* });
*
*
* ```
*/
export declare function getTipProps(options: TipPropsOptions): TipPropsResult;
//# sourceMappingURL=getTipProps.d.ts.map