tgui-angular
Version:
🚀 Angular UI library for Telegram Web Apps with modern components and theming support | 💼 Author is open to work opportunities | 📧 Contact: a.blagovestnov@gmail.com | 💬 Telegram: @ablagovestnov
52 lines (51 loc) • 3.44 kB
TypeScript
import { TemplateRef } from '@angular/core';
import { PlatformService } from '../../../services/platform.service';
import * as i0 from "@angular/core";
/**
* FormInput is a base wrapper component for form elements.
* It provides common styling, layout, and behavior for form inputs.
*
* Features:
* - Platform-specific styling (iOS vs base)
* - Status handling (default, error, focused)
* - Support for content before and after the input (as string or TemplateRef)
* - Optional header display
* - Focus and blur handling
*/
export declare class FormInputComponent {
protected platformService: PlatformService;
private elementRef;
/** Defines the visual state of the form input */
status: import("@angular/core").InputSignal<"error" | "default" | "focused">;
/** Optional header content, displayed above the form input on base platform */
header: import("@angular/core").InputSignal<string | null>;
/** Content to be displayed before the form input (can be string or TemplateRef) */
inputBefore: import("@angular/core").InputSignal<string | TemplateRef<any> | null>;
/** Content to be displayed after the form input (can be string or TemplateRef) */
inputAfter: import("@angular/core").InputSignal<string | TemplateRef<any> | null>;
/** Indicates if there's content to be displayed before the form input (legacy support) */
before: import("@angular/core").InputSignal<boolean>;
/** Indicates if there's content to be displayed after the form input (legacy support) */
after: import("@angular/core").InputSignal<boolean>;
/** Indicates if the form input is disabled */
disabled: import("@angular/core").InputSignal<boolean>;
private isFocused;
/** Combines explicitly set status with internal focus state */
effectiveStatus: import("@angular/core").Signal<"error" | "default" | "focused">;
/** Checks if there's content to display before the input */
hasBefore: import("@angular/core").Signal<boolean>;
/** Checks if there's content to display after the input */
hasAfter: import("@angular/core").Signal<boolean>;
/** Checks if the before content is a string */
isBeforeString: import("@angular/core").Signal<boolean>;
/** Checks if the after content is a string */
isAfterString: import("@angular/core").Signal<boolean>;
/** Returns the before content as a TemplateRef if it is one */
beforeTemplate: import("@angular/core").Signal<TemplateRef<any> | null>;
/** Returns the after content as a TemplateRef if it is one */
afterTemplate: import("@angular/core").Signal<TemplateRef<any> | null>;
onFocusIn(): void;
onFocusOut(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormInputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormInputComponent, "tgui-form-input", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "inputBefore": { "alias": "inputBefore"; "required": false; "isSignal": true; }; "inputAfter": { "alias": "inputAfter"; "required": false; "isSignal": true; }; "before": { "alias": "before"; "required": false; "isSignal": true; }; "after": { "alias": "after"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["[tguiFormInputBefore]", "*", "[tguiFormInputAfter]"], true, never>;
}