@logo-elements/component-base
Version:
A set of mixins used by Logo Elements which is extended from Vaadin components.
39 lines (35 loc) • 1.47 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';
import { DisabledMixinClass } from './disabled-mixin.js';
/**
* A mixin to toggle the `tabindex` attribute.
*
* By default, the attribute is set to 0 that makes the element focusable.
*
* The attribute is set to -1 whenever the user disables the element
* and restored with the last known value once the element is enabled.
*/
export declare function TabindexMixin<T extends Constructor<HTMLElement>>(
base: T
): T & Constructor<DisabledMixinClass> & Constructor<TabindexMixinClass>;
export declare class TabindexMixinClass {
/**
* Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
*/
tabindex: number | undefined | null;
/**
* When the user has changed tabindex while the element is disabled,
* the observer reverts tabindex to -1 and rather saves the new tabindex value to apply it later.
* The new value will be applied as soon as the element becomes enabled.
*/
protected _tabindexChanged(tabindex: number | undefined | null): void;
}