truly-ui
Version:
Web Components for Desktop Applications.
147 lines (146 loc) • 3.43 kB
TypeScript
import { AfterViewInit, EventEmitter } from '@angular/core';
import { ComponentHasModelBase } from '../core/base/component-has-model.base';
import { TabIndexService } from '../form/tabIndex.service';
import { IdGeneratorService } from '../core/helper/idgenerator.service';
import { NameGeneratorService } from '../core/helper/namegenerator.service';
/**
* Input Component personalized with few features.
*
* import { InputModule } from 'truly-ui';
*
* @Component({
* selector: 'my-app-comp',
* template: '
* <tl-input
* [(ngModel)]="title"
* [iconBefore]="'ion-email'"
* [iconAfter]="'ion-email'"
* [textBefore]="'R$'"
* [textAfter]="'00,00'"
* [placeholder]="'Meu Input'"
* [clearButton]="true"
* [readonly]="true"
* [disabled]="true"
* [toUpperCase]="true">
* </tl-input>
* '
* })
*/
export declare class TlInput extends ComponentHasModelBase implements AfterViewInit {
/**
* Text placed before Input.
* @type {string}
*/
textBefore: string;
/**
* Text placed before Input.
* @type {string}
*/
textAfter: string;
/**
* Property to label placement [default]='left'
* 'left' | 'top'
* @type {string}
*/
labelPlacement: string;
/**
* Property to labelSize
* @type {string}
*/
labelSize: string;
/**
* Label of Input
* @type {string}
*/
label: string;
/**
* Class of an Icon placed Before Input. Example usage:
*
* ```html
* <tl-input [iconBefore]="'ion-email'"></tl-input>
* ```
*
* ```html
* <tl-input [iconBefore]="'fa fa-user'"></tl-input>
* ```
*/
iconBefore: string;
/**
* Class of an Icon placed After Input.
*
* ```html
* <tl-input [iconAfter]="'ion-email'"></tl-input>
* ```
*
* ```html
* <tl-input [iconAfter]="'fa fa-address-card'"></tl-input>
* ```
*/
iconAfter: string;
/**
* Controller to display clear button after type something [default] = false.
* @type {boolean}
*/
clearButton: boolean;
/**
* Controller to make an input readonly.
* @type {boolean}
*/
readonly: boolean;
/**
* Controller to make an input disabled.
* @type {boolean}
*/
disabled: boolean;
/**
* Property to control autocomplete input
*/
autocomplete: boolean;
/**
* Property required.
* @type {boolean}
*/
required: boolean;
/**
* TabIndex of Element;
*/
tabindex: number;
/**
* Define the alignment of the text inside of the input.
*/
textAlign: any;
/**
* The element itself to be manipulated
*/
input: any;
/**
* View for textAfter
*/
textClearButton: any;
/**
* View for textAfter
*/
iconClearButton: any;
/**
* Output event for clear button
* @type {EventEmitter}
*/
clear: EventEmitter<any>;
/**
* Control the position of the clearButton.
*/
private clearButtonPosition;
/**
* Constructor
*/
constructor(tabIndexService: TabIndexService, idService: IdGeneratorService, nameService: NameGeneratorService);
/**
* LifeHook Angular
*/
ngAfterViewInit(): void;
validateClearButtonPosition(): void;
/**
* Function to clear input value.
*/
clearInput(): void;
}