UNPKG

@senka-ai/ui

Version:

A modern, type-safe Svelte 5 UI component library with full theme support, accessibility standards, and robust state management patterns

55 lines 2.4 kB
import type { BaseProps } from '../../type/component'; /** * Dialog component props interface * A modal dialog that interrupts the user journey for important actions or information */ interface Props extends BaseProps { /** Whether the dialog is open @default false */ open?: boolean; /** Dialog title text */ title?: string; /** Dialog description/body text */ description?: string; /** Whether to show the title @default true */ showTitle?: boolean; /** Whether to show the description @default true */ showDescription?: boolean; /** Whether to show the close button (X) @default true */ showCloseButton?: boolean; /** Whether clicking the backdrop closes the dialog @default true */ closeOnBackdrop?: boolean; /** Whether pressing Escape closes the dialog @default true */ closeOnEscape?: boolean; /** Primary button text @default 'OK' */ primaryButtonText?: string; /** Secondary button text @default 'Cancel' */ secondaryButtonText?: string; /** Tertiary button text (for 3-button variant) */ tertiaryButtonText?: string; /** Primary button variant @default 'primary' */ primaryButtonVariant?: 'primary' | 'secondary' | 'tertiary'; /** Secondary button variant @default 'secondary' */ secondaryButtonVariant?: 'primary' | 'secondary' | 'tertiary'; /** Tertiary button variant @default 'tertiary' */ tertiaryButtonVariant?: 'primary' | 'secondary' | 'tertiary'; /** Whether to show the primary button @default true */ showPrimaryButton?: boolean; /** Whether to show the secondary button @default true */ showSecondaryButton?: boolean; /** Whether to show the tertiary button @default false */ showTertiaryButton?: boolean; /** Called when the primary button is clicked */ onPrimaryClick?: () => void; /** Called when the secondary button is clicked */ onSecondaryClick?: () => void; /** Called when the tertiary button is clicked */ onTertiaryClick?: () => void; /** Called when the dialog should be closed (close button, backdrop, escape) */ onClose?: () => void; /** Custom dialog content (overrides title/description) */ children?: any; } declare const Dialog: import("svelte").Component<Props, {}, "">; type Dialog = ReturnType<typeof Dialog>; export default Dialog; //# sourceMappingURL=Dialog.svelte.d.ts.map