/** * Stimulus controllers for Sonner Vanilla * Use with Rails Hotwire to display flash messages as toasts */ import { Controller } from '@hotwired/stimulus'; import { toast, type Position, type Theme, type ToasterOptions } from 'sonner-vanilla'; /** * Toaster Controller - Initializes the toast container * * Usage in your HTML: * ```html *
*
* ``` */ export declare class ToasterController extends Controller { static values: { position: { type: StringConstructor; default: string; }; theme: { type: StringConstructor; default: string; }; richColors: { type: BooleanConstructor; default: boolean; }; closeButton: { type: BooleanConstructor; default: boolean; }; expand: { type: BooleanConstructor; default: boolean; }; duration: { type: NumberConstructor; default: number; }; visibleToasts: { type: NumberConstructor; default: number; }; gap: { type: NumberConstructor; default: number; }; offset: { type: StringConstructor; default: string; }; }; positionValue: string; themeValue: string; richColorsValue: boolean; closeButtonValue: boolean; expandValue: boolean; durationValue: number; visibleToastsValue: number; gapValue: number; offsetValue: string; private toaster; connect(): void; disconnect(): void; } /** * Toast Controller - Displays a toast message * * Usage in your HTML (for flash messages): * ```html *
*
* ``` * * Or with Turbo Streams: * ```erb * <%= turbo_stream.append "flash" do %> *
*
* <% end %> * ``` */ export declare class ToastController extends Controller { static values: { type: { type: StringConstructor; default: string; }; message: StringConstructor; description: StringConstructor; duration: NumberConstructor; dismissible: { type: BooleanConstructor; default: boolean; }; richColors: BooleanConstructor; closeButton: BooleanConstructor; position: StringConstructor; id: StringConstructor; }; typeValue: string; messageValue: string; descriptionValue: string; durationValue: number; dismissibleValue: boolean; richColorsValue: boolean; closeButtonValue: boolean; positionValue: string; idValue: string; hasTypeValue: boolean; hasMessageValue: boolean; hasDescriptionValue: boolean; hasDurationValue: boolean; hasDismissibleValue: boolean; hasRichColorsValue: boolean; hasCloseButtonValue: boolean; hasPositionValue: boolean; hasIdValue: boolean; connect(): void; private showToast; } /** * Dismiss Controller - Dismisses a specific toast or all toasts * * Usage: * ```html * * * * * ``` */ export declare class ToastDismissController extends Controller { static values: { id: StringConstructor; }; idValue: string; hasIdValue: boolean; dismiss(): void; dismissAll(): void; } export { toast }; export type { Position, Theme, ToasterOptions }; declare const _default: { toaster: typeof ToasterController; toast: typeof ToastController; 'toast-dismiss': typeof ToastDismissController; }; export default _default; //# sourceMappingURL=index.d.ts.map