@logo-elements/component-base
Version:
A set of mixins used by Logo Elements which is extended from Vaadin components.
36 lines (30 loc) • 1.15 kB
TypeScript
/**
* @license
* Copyright LOGO YAZILIM SANAYİ VE TİCARET A.Ş.
*
* Save to the extent permitted by law, you may not use, copy, modify,
* distribute or create derivative works of this material or any part
* of it without the prior written consent of LOGO YAZILIM SANAYİ VE TİCARET A.Ş. Limited.
* Any reproduction of this material must contain this notice.
*/
// @ts-ignore
import { Constructor } from '@open-wc/dedupe-mixin';
/**
* A mixin to handle `focused` and `focus-ring` attributes based on focus.
*/
export declare function FocusMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<FocusMixinClass>;
export declare class FocusMixinClass {
protected readonly _keyboardActive: boolean;
/**
* Override to change how focused and focus-ring attributes are set.
*/
protected _setFocused(focused: boolean): void;
/**
* Override to define if the field receives focus based on the event.
*/
protected _shouldSetFocus(event: FocusEvent): boolean;
/**
* Override to define if the field loses focus based on the event.
*/
protected _shouldRemoveFocus(event: FocusEvent): boolean;
}