1.4.11 • Published 6 months ago

@types/tether-drop v1.4.11

Weekly downloads
370
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/tether-drop

Summary

This package contains type definitions for Drop (https://github.hubspot.com/drop/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tether-drop.

index.d.ts

// Type definitions for Drop v1.4
// Project: https://github.hubspot.com/drop/
// Definitions by: Adi Dahiya <https://github.com/adidahiya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import Tether = require("tether");

export = Drop;
export as namespace Drop;

// global Drop constructor
declare class Drop {
    constructor(options: Drop.IDropOptions);

    public content: HTMLElement;
    public tether: Tether;
    public open(): void;
    public close(): void;
    public remove(): void;
    public toggle(): void;
    public isOpened(): boolean;
    public position(): void;
    public destroy(): void;

    /*
     * Drop instances fire "open" and "close" events.
     */
    public on(event: string, handler: Function, context?: any): void;
    public once(event: string, handler: Function, context?: any): void;
    public off(event: string, handler?: Function): void;

    public static createContext(options: Drop.IDropContextOptions): typeof Drop;
}

declare namespace Drop {
    interface IDropContextOptions {
        classPrefix?: string | undefined;
        defaults?: IDropOptions | undefined;
    }

    interface IDropOptions {
        target?: Element | undefined;
        content?: Element | string | ((drop?: Drop) => string) | ((drop?: Drop) => Element) | undefined;
        position?: string | undefined;
        openOn?: string | undefined;
        classes?: string | undefined;
        constrainToWindow?: boolean | undefined;
        constrainToScrollParent?: boolean | undefined;
        remove?: boolean | undefined;
        beforeClose?: ((event: Event, drop: Drop) => boolean) | undefined;
        openDelay?: number | undefined;
        closeDelay?: number | undefined;
        focusDelay?: number | undefined;
        blurDelay?: number | undefined;
        hoverOpenDelay?: number | undefined;
        hoverCloseDelay?: number | undefined;
        tetherOptions?: Tether.ITetherOptions | undefined;
    }
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 21:32:19 GMT
  • Dependencies: @types/tether
  • Global values: Drop

Credits

These definitions were written by Adi Dahiya.

1.4.11

6 months ago

1.4.10

7 months ago

1.4.9

3 years ago

1.4.8

7 years ago

1.4.7

7 years ago

1.4.6

7 years ago

1.4.5

8 years ago

1.4.4

8 years ago

1.4.3

8 years ago

1.4.2

8 years ago

1.4.1

8 years ago