import { Component, VNode } from 'vue'; import { BaseSurfaceMode } from '../../base-surface/src/types'; declare const trustedDialogHtmlBrand: unique symbol; /** * HTML that has been explicitly reviewed and marked safe by the caller. * * This type does not sanitize. It prevents accidental bare string usage on * dialog HTML props while keeping the default `message` path plain text. * * @public */ export type TrustedDialogHtml = string & { readonly [trustedDialogHtmlBrand]: true; }; /** * Dialog HTML prop value. Empty string is allowed for Vue prop defaults. * * @public */ export type DialogMessageHtml = TrustedDialogHtml | ''; /** * Mark already-sanitized or otherwise trusted dialog HTML for explicit use. * * @public */ export declare function asTrustedDialogHtml(html: string): TrustedDialogHtml; /** * Button type for visual styling. * * @public */ export type DialogButtonType = 'info' | 'warning' | 'error' | 'success'; /** * Interface for dialog button configuration. * * @public */ export interface DialogButton { /** * The text content displayed on the button. */ content: string; /** * The visual type/style of the button. */ type?: DialogButtonType; /** * Leading glyph for the row, as an icon class the host's icon pipeline * generates (`i-carbon-trash`). Omitted, the row renders its label alone at * the same inset. The class must appear statically in host source — an icon * name only ever built at runtime is never generated by UnoCSS. */ icon?: string; /** * Auto-click countdown timer in seconds. * When provided, the button will automatically click after the specified time. */ time?: number; /** * Click handler function. * Return true to close the dialog, false to keep it open. */ onClick: () => Promise | boolean; /** * Loading callback function. * Called with a done function that should be invoked when loading is complete. */ loading?: (done: () => void) => void; } /** * The panel material, shared by every dialog variant. * * @public */ export interface DialogSurfaceProps { /** * Material of the panel. * @default 'refraction' */ surface?: BaseSurfaceMode; /** * Colour laid under the material; follows the theme by default. * @default '' */ surfaceColor?: string; /** * Opacity of that colour (0–1): 0.96 under `mask`, 0.5 under the other materials. */ surfaceOpacity?: number; } /** * Props interface for the TxBottomDialog component. * * @public */ export interface BottomDialogProps extends DialogSurfaceProps { /** * The title displayed in the dialog header. * @default '' */ title?: string; /** * The message content of the dialog. * Rendered as plain text. New lines are preserved by component styles. * @default '' */ message?: string; /** * Reserved auto-close duration prop. The current runtime does not start a * timer from `stay` alone; auto-close only occurs via a button's `time` * countdown. Kept for API compatibility. * @default 0 */ stay?: number; /** * Callback function to close the dialog. */ close: () => void; /** * Array of button configurations. * @default [] */ btns?: DialogButton[]; /** * Legacy icon class prop. Not rendered by the current template; kept for * API compatibility. * @default '' */ icon?: string; /** * Z-index offset for the dialog. * Final z-index = baseZIndex + index. * @default 0 */ index?: number; /** * Accessible label for the header's close button. * @default 'Close' */ closeLabel?: string; } /** * Props interface for the TxBlowDialog component. * * @public */ export interface BlowDialogProps extends DialogSurfaceProps { /** * Callback function to close the dialog. */ close: () => void; /** * The title displayed in the dialog. * @default '' */ title?: string; /** * The message content of the dialog. * Rendered as plain text. New lines are preserved by component styles. * @default '' */ message?: string; /** * Trusted HTML message content. Use only for sanitized internal call sites. * @default '' */ messageHtml?: DialogMessageHtml; /** * Confirm button text. * @default 'Confirm' */ confirmText?: string; /** * A Vue component to render in the dialog. */ comp?: Component; /** * A render function that returns a VNode. */ render?: () => VNode; } /** * Emits interface for dialog components. * * @public */ export interface DialogEmits { /** * Emitted when the dialog is closed. */ (e: 'close'): void; } export interface PopperDialogProps extends DialogSurfaceProps { close: () => void; title?: string; message?: string; messageHtml?: DialogMessageHtml; confirmText?: string; comp?: Component; render?: () => VNode; } export interface TouchTipButton { content: string; type?: DialogButtonType; onClick: () => Promise | boolean; loading?: (done: () => void) => void; } export interface TouchTipProps extends DialogSurfaceProps { title?: string; message?: string; messageHtml?: DialogMessageHtml; buttons: TouchTipButton[]; close: () => void; } export {};