UNPKG

govuk-angular

Version:

Angular components port of govuk-frontend nunjucks macros.

43 lines (42 loc) 2.04 kB
import { EventEmitter } from '@angular/core'; import { Label } from '../label/label'; import { GovUKDataCapture } from '../data-capture.component'; import { LinkAction } from './link-action'; import { Hint } from '../hint/hint'; import { ErrorMessage } from '../error/error-message.model'; import * as i0 from "@angular/core"; /** * Input component with error handling. * * ```javascript * <govuk-input [id]="'with-date-fill'" * [(model)]="model.date" * [label]="{text:'What is the date today?', classes: 'govuk-label--m'}" * [linkAction]="{ text:'Use todays date', action: today } " * [hint]="{ text: 'Try the link below '}" * [classes]="'govuk-input--width-10'" * maxlength="10"></govuk-input> * ``` */ export declare class GovUKInputComponent implements GovUKDataCapture<string> { id: string; name: string; classes: string; /** Type of input control to render. Defaults to 'text' */ type: 'text'; describeBy?: string; label: Label; hint: Hint; errorMessage: ErrorMessage; model: string; modelChange: EventEmitter<string>; onInputBlur: EventEmitter<Event>; onInputFocus: EventEmitter<Event>; onInputSubmit: EventEmitter<Event>; onInputScroll: EventEmitter<Event>; maxlength: number; /** Can be use to set the input value on clicking the link */ linkAction: LinkAction; static ɵfac: i0.ɵɵFactoryDeclaration<GovUKInputComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GovUKInputComponent, "govuk-input", never, { "id": "id"; "name": "name"; "classes": "classes"; "type": "type"; "describeBy": "describeBy"; "label": "label"; "hint": "hint"; "errorMessage": "errorMessage"; "model": "model"; "maxlength": "maxlength"; "linkAction": "linkAction"; }, { "modelChange": "modelChange"; "onInputBlur": "onInputBlur"; "onInputFocus": "onInputFocus"; "onInputSubmit": "onInputSubmit"; "onInputScroll": "onInputScroll"; }, never, never>; }