import { LitElement } from 'lit';
import { LabelPosition } from '../../../shared/form-control-utils';
export type InputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'textarea';
export type InputSize = 'small' | 'default' | 'large';
/**
* Input component properties for type safety
*/
export interface InputProps {
label?: string;
labelHidden?: boolean;
labelPosition?: LabelPosition;
noLabel?: boolean;
ariaLabel?: string;
name?: string;
type?: InputType;
value?: string;
placeholder?: string;
rows?: number;
cols?: number;
size?: InputSize;
capsule?: boolean;
rounded?: boolean;
underlined?: boolean;
underlinedWithBackground?: boolean;
inline?: boolean;
min?: string;
max?: string;
required?: boolean;
disabled?: boolean;
readonly?: boolean;
invalid?: boolean;
errorMessage?: string;
helpText?: string;
onClick?: (event: MouseEvent) => void;
onInput?: (event: InputEvent) => void;
onChange?: (event: Event) => void;
onFocus?: (event: FocusEvent) => void;
onBlur?: (event: FocusEvent) => void;
}
declare const AgInput_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement;
export declare class AgInput extends AgInput_base implements InputProps {
static shadowRootOptions: {
delegatesFocus: boolean;
clonable?: boolean;
customElementRegistry?: CustomElementRegistry;
mode: ShadowRootMode;
serializable?: boolean;
slotAssignment?: SlotAssignmentMode;
};
static styles: import('lit').CSSResult[];
private _ids;
private _inputElement?;
label: string;
labelHidden: boolean;
labelPosition: LabelPosition;
noLabel: boolean;
ariaLabel: string;
type: InputType;
value: string;
placeholder: string;
rows: number;
cols: number;
size: InputSize;
capsule: boolean;
rounded: boolean;
underlined: boolean;
underlinedWithBackground: boolean;
inline: boolean;
min: string;
max: string;
required: boolean;
disabled: boolean;
readonly: boolean;
invalid: boolean;
errorMessage: string;
helpText: string;
onClick?: (event: MouseEvent) => void;
onInput?: (event: InputEvent) => void;
onChange?: (event: Event) => void;
onFocus?: (event: FocusEvent) => void;
onBlur?: (event: FocusEvent) => void;
private _hasLeftAddon;
private _hasRightAddon;
constructor();
/**
* Expose the internal input element for external access
*/
get controlElement(): HTMLInputElement | HTMLTextAreaElement | undefined;
/**
* Get the current value of the input
*/
getValue(): string;
/**
* Set the value of the input
*/
setValue(value: string): void;
/**
* Select the text in the input
*/
select(): void;
/**
* FACE lifecycle: called when the parent form is reset.
* Restores value to empty and clears validity state.
*/
formResetCallback(): void;
/**
* FACE lifecycle: called on session restore or browser autofill.
* Restores the input value from the previously saved form state.
*/
formStateRestoreCallback(state: File | string | FormData | null, _mode: 'restore' | 'autocomplete'): void;
/**
* Sync CustomStateSet states so :state() pseudo-classes work from external CSS.
*
* Must be called AFTER _syncValidity() so that :state(invalid) reads the
* freshly-updated _internals.validity.valid value.
*
* Exposed states:
* :state(disabled) — input is disabled
* :state(readonly) — input is read-only
* :state(required) — input is required
* :state(invalid) — FACE constraint validation is failing
*/
private _syncStates;
/**
* Sync the inner input's native validity state to ElementInternals.
* Delegates constraint validation (required, minlength, type=email, etc.)
* to the inner rather than reimplementing it from scratch.
* Uses the shared syncInnerInputValidity() helper from face-mixin.ts.
*/
private _syncValidity;
/**
* Handle slot changes to detect addons
*/
private _handleSlotChange;
/**
* Handle input events
*/
private _handleInput;
/**
* Handle change events
*/
private _handleChange;
/**
* Handle focus events
*/
private _handleFocus;
/**
* Handle blur events
*/
private _handleBlur;
/**
* Handle click events
*/
private _handleClick;
/**
* Build ARIA describedby attribute
*/
private _getAriaDescribedBy;
/**
* Render the input or textarea element
*/
private _supportsMinMax;
private _renderInputElement;
updated(changedProperties: Map): void;
firstUpdated(): void;
/**
* Render custom label for Input (using shared utility but customized for Input)
*/
private _renderLabel;
/**
* Render custom helper text for Input
*/
private _renderHelper;
/**
* Render custom error message for Input.
* role="alert" + aria-atomic="true" ensures screen readers announce the
* message immediately when it becomes visible (e.g. after blur or submit).
* The live region is always in the DOM so ATs register it on page load;
* content is populated only when invalid so announcements fire on change.
*/
private _renderError;
render(): import('lit').TemplateResult<1>;
}
export {};
//# sourceMappingURL=_Input.d.ts.map