61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
/*!
|
|
* Bootstrap Native Alert v5.1.10 (https://thednp.github.io/bootstrap.native/)
|
|
* Copyright 2026 © thednp
|
|
* Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)
|
|
*/
|
|
"use strict";
|
|
|
|
import { PointerEvent } from "@thednp/shorty";
|
|
|
|
//#region src/interface/baseComponent.d.ts
|
|
interface BaseOptions {
|
|
[key: string]: unknown;
|
|
}
|
|
//#endregion
|
|
//#region src/components/base-component.d.ts
|
|
/** Returns a new `BaseComponent` instance. */
|
|
declare class BaseComponent {
|
|
element: Element;
|
|
options?: BaseOptions;
|
|
/**
|
|
* @param target `Element` or selector string
|
|
* @param config component instance options
|
|
*/
|
|
constructor(target: Element | string, config?: BaseOptions);
|
|
get version(): string;
|
|
get name(): string;
|
|
get defaults(): {};
|
|
/** just to have something to extend from */
|
|
_toggleEventListeners: () => void;
|
|
/** Removes component from target element. */
|
|
dispose(): void;
|
|
}
|
|
//#endregion
|
|
//#region src/components/alert.d.ts
|
|
/** Creates a new Alert instance. */
|
|
declare class Alert extends BaseComponent {
|
|
static selector: string;
|
|
static init: (element: Element) => Alert;
|
|
static getInstance: (element: Element) => Alert | null;
|
|
dismiss: HTMLElement | null;
|
|
constructor(target: Element | string);
|
|
/** Returns component name string. */
|
|
get name(): string;
|
|
/**
|
|
* Public method that hides the `.alert` element from the user,
|
|
* disposes the instance once animation is complete, then
|
|
* removes the element from the DOM.
|
|
*/
|
|
close: (e?: PointerEvent<HTMLElement>) => void;
|
|
/**
|
|
* Toggle on / off the `click` event listener.
|
|
*
|
|
* @param add when `true`, event listener is added
|
|
*/
|
|
_toggleEventListeners: (add?: boolean) => void;
|
|
/** Remove the component from target element. */
|
|
dispose(): void;
|
|
}
|
|
//#endregion
|
|
export { Alert as default };
|
|
//# sourceMappingURL=alert.d.mts.map
|