UNPKG

@loadsmart/miranda-wc

Version:

Miranda Web Components component library

76 lines (75 loc) 1.9 kB
import type { PropertyValues } from 'lit'; import { Component } from '../component'; import type { FieldStatus, FieldSize } from './field.types'; import type { StackProps } from '../layout/stack'; import '../layout/group'; import '../layout/stack'; import '../close-button'; import './field-hint'; import './field-label'; export interface FieldProps { hint?: string; label?: string; size?: FieldSize; status?: FieldStatus; required?: boolean; align?: StackProps['align']; } export declare class Field extends Component implements FieldProps { static styles: import("lit").CSSResult[][]; static get properties(): { label: { type: StringConstructor; }; hint: { type: StringConstructor; }; required: { type: BooleanConstructor; }; status: { type: StringConstructor; reflect: boolean; }; size: { type: StringConstructor; }; align: { type: StringConstructor; }; }; /** * Label that describes what this field is about. */ label: FieldProps['label']; /** * Auxiliary message to help the user with the field purpose or its `status`. */ hint: FieldProps['hint']; /** * Is this field required. */ required: FieldProps['required']; /** * Field [validation] status. */ status: FieldProps['status']; /** * Field size. */ size: FieldProps['size']; /** * Value for the m-stack `align` attribute. */ align: FieldProps['align']; private provider; static define(): void; constructor(); update(changedProperties: PropertyValues): void; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'm-field': Field; } }