UNPKG

govuk-angular

Version:

Angular components port of govuk-frontend nunjucks macros.

71 lines (70 loc) 2.77 kB
import { EventEmitter } from '@angular/core'; import { ErrorMessage } from './error/error-message.model'; import { Fieldset, Legend } from './fieldset/fieldset'; import { Hint } from './hint/hint'; import { Label } from './label/label'; import * as i0 from "@angular/core"; export declare class GovUKDataCaptureComponent<T> { /** id: Required: id for each select box */ id: string; /** name: Optional will default to id */ name: string; /** classes to add to the root component. */ classes: string; /** * One or more element IDs to add to the input aria-describedby attribute **without a fieldset**, * used to provide additional descriptive information for screenreader users */ describeBy?: string; /** { text: string; classes: string; } */ hint: Hint; /** { text: string; classes: string; } */ errorMessage: ErrorMessage; /** Use to bind the model to the component input */ model: T; modelChange: EventEmitter<T>; static ɵfac: i0.ɵɵFactoryDeclaration<GovUKDataCaptureComponent<any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GovUKDataCaptureComponent<any>, "ng-component", never, { "id": "id"; "name": "name"; "classes": "classes"; "describeBy": "describeBy"; "hint": "hint"; "errorMessage": "errorMessage"; "model": "model"; }, { "modelChange": "modelChange"; }, never, never>; } export interface GovUKComponent { /** id: Required: unique id */ id: string; /** name: Optional will default to id if empty*/ name: string; /** classes to add to the root component. */ classes: string; } export interface GovUKDataCapture<T> extends GovUKComponent { /** * One or more element IDs to add to the input aria-describedby attribute **without a fieldset**, * used to provide additional descriptive information for screenreader users */ describeBy?: string; /** * Options for the hint component: @example { text: string; classes: string; } * ```javascript * [hint]="{ text: 'Try the link below '}" * ``` */ hint: Hint; /** { text: string; classes: string; } */ errorMessage: ErrorMessage; /** Use to bind the model to the component */ model: T; modelChange: EventEmitter<T>; /** Label text @example {text: string; classes: string; isPageHeading: boolean;} */ label?: Label; /** * {describedBy?: string, classes: string; role?: string;} */ fieldset?: Fieldset; /** * {text: string; classes: string; isPageHeading: boolean;} * ```javascript * [legend]="{ text: 'Have you changed your name?', * classes: 'govuk-fieldset__legend--l', * isPageHeading: false}" * ``` */ legend?: Legend; }