/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { LitElement } from 'lit'; type Constructor = new (...args: any[]) => T; /** * Options for focus behavior */ export interface FocusOptions { preventScroll?: boolean; selectText?: boolean; } /** * Options for blur behavior */ export interface BlurOptions { relatedTarget?: Element | null; } /** * Interface for components that support focus operations */ export interface FocusCapable { /** * Focus the input element * @param options - Focus options */ focus(options?: FocusOptions): void; /** * Blur the input element * @param options - Blur options */ blur(options?: BlurOptions): void; /** * Check if the input is currently focused * @returns True if focused */ isFocused(): boolean; } /** * Mixin that provides focus management capabilities to input components * * @param superClass - The base class to extend * @returns Enhanced class with focus capabilities * * @example * ```typescript * export class MyInput extends FocusMixin(LitElement) { * @query('input') input!: HTMLInputElement; * * handleClick() { * this.focus({ selectText: true }); * } * } * ``` */ export declare const FocusMixin: >(superClass: T) => Constructor & T; export {}; //# sourceMappingURL=focus-mixin.d.ts.map