UNPKG

svelte-ux

Version:

- Increment version in `package.json` and commit as `Version bump to x.y.z` - `npm run publish`

30 lines (29 loc) 1.12 kB
/** * Auto focus node when rendered. Useful for inputs */ export declare function autoFocus(node: HTMLInputElement | HTMLTextAreaElement, options?: { delay?: number; }): SvelteActionReturnType; /** * Selects the text inside a text node when the node is focused */ export declare function selectOnFocus(node: HTMLInputElement | HTMLTextAreaElement): SvelteActionReturnType; /** * Blurs the node when Escape is pressed */ export declare function blurOnEscape(node: HTMLInputElement | HTMLTextAreaElement): SvelteActionReturnType; /** * Automatically resize textarea based on content * See: * - https://svelte.dev/repl/ead0f1fcd2d4402bbbd64eca1d665341?version=3.14.1 * - https://svelte.dev/repl/f1a7e24a08a54947bb4447f295c741fb?version=3.14.1 */ export declare function autoHeight(node: HTMLTextAreaElement): SvelteActionReturnType; /** * Debounce event handler (change, input, etc) */ export declare function debounceEvent(node: HTMLInputElement | HTMLTextAreaElement, { type, listener, timeout }: { type: string; listener: (e: Event) => any; timeout?: number; }): SvelteActionReturnType;