@aofl/select
Version:
The <aofl-select-list> takes any number of <aofl-list-option>. Selecting any option will give it a selected attribute with. Selecting an option emits an event with the selected value. The <aofl-multiselect-list> takes any number of <aofl-list-option>. Sel
68 lines (66 loc) • 2.02 kB
TypeScript
declare module "@aofl/select" {
/**
* Creates an instance of AoflListOption.
*/
class AoflListOption extends AoflElement {
static readonly is: string;
static readonly properties: any;
keydownCallback(e: Event): void;
/**
* Update selected value in the parent list
*/
select(): void;
connectedCallback(): void;
render(): any;
disconnectedCallback(): void;
}
/**
* Similar to select multi
*/
class AoflMultiselectList extends AoflElement {
static readonly is: string;
static readonly properties: any;
connectedCallback(): void;
render(): any;
/**
* Handle the tab and arrow focus logic within the list
*/
keydownCallback(e: Event): void;
/**
* Focus list options that are hovered over
*/
mouseoverCallback(e: Event): void;
/**
* Toggle selected on list element and dispatch custom change event
*/
updateSelected(dispatch?: boolean): void;
/**
* Remove all items from selected array and remove selected attributes from all list options
*/
clearSelected(): void;
/**
* Add an option to be selected
*/
addOption(option: string): void;
disconnectedCallback(): void;
}
/**
* Similar to select tag it supports a single select list of aofl-options.
*/
class AoflSelectList extends AoflElement {
static readonly is: string;
keydownCallback(e: Event): void;
mouseoverCallback(e: Event): void;
/**
* Updated selected value and dispatches a custom event with that value
*/
updateSelected(dispatch?: boolean): void;
/**
* Add an option to be selected
*/
addOption(option: string): void;
connectedCallback(): void;
render(): any;
disconnectedCallback(): void;
}
}