@kushki/ng-suka
Version:
<p align="center"> <h1 align="center">Suka Components Angular</h1> <p align="center"> An Angular implementation of the Suka Design System </p> </p>
83 lines (82 loc) • 2.35 kB
TypeScript
import { ElementRef, EventEmitter, TemplateRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
export declare class Select implements ControlValueAccessor {
/**
* Tracks the total number of selects instantiated. Used to generate unique IDs
*/
static selectCount: number;
private _value;
/**
* `inline` or `default` select displays
*/
display: 'inline' | 'default';
/**
* Label for the select. Appears above the input.
*/
label: string | TemplateRef<any>;
/**
* Optional helper text that appears under the label.
*/
helperText: string | TemplateRef<any>;
/**
* Sets the invalid text.
*/
invalidText: string | TemplateRef<any>;
/**
* Sets the unique ID. Defaults to `select-${total count of selects instantiated}`
*/
id: string;
/**
* Set to true to disable component.
*/
disabled: boolean;
/**
* Set to true for a loading select.
*/
skeleton: boolean;
/**
* Set to `true` for an invalid select component.
*/
invalid: boolean;
/**
* Set to `true` for an valid select component.
*/
valid: boolean;
/**
* emits the selected options `value`
*/
selected: EventEmitter<any>;
select: ElementRef;
value: string;
/**
* Receives a value from the model.
*/
writeValue(obj: any): void;
/**
* Registers a listener that notifies the model when the control updates
*/
registerOnChange(fn: any): void;
/**
* Registers a listener that notifies the model when the control is blurred
*/
registerOnTouched(fn: any): void;
/**
* Sets the disabled state through the model
*/
setDisabledState(isDisabled: boolean): void;
/**
* Handles the change event from the `select`.
* Sends events to the change handler and emits a `selected` event.
*/
onChange(event: any): void;
/**
* Listens for the host blurring, and notifies the model
*/
onBlur(target: any): void;
isTemplate(value: any): boolean;
/**
* placeholder declarations. Replaced by the functions provided to `registerOnChange` and `registerOnTouched`
*/
protected onChangeHandler: (_: any) => void;
protected onTouchedHandler: () => void;
}