UNPKG

@logo-elements/component-base

Version:

A set of mixins used by Logo Elements which is extended from Vaadin components.

33 lines (29 loc) 1.19 kB
/** * @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 that manages keyboard handling. * The mixin subscribes to the keyboard events while an actual implementation * for the event handlers is left to the client (a component or another mixin). */ export declare function KeyboardMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<KeyboardMixinClass>; export declare class KeyboardMixinClass { /** * A handler for the `keydown` event. By default, it does nothing. * Override the method to implement your own behavior. */ protected _onKeyDown(event: KeyboardEvent): void; /** * A handler for the `keyup` event. By default, it does nothing. * Override the method to implement your own behavior. */ protected _onKeyUp(event: KeyboardEvent): void; }