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
51 lines (50 loc) • 2.82 kB
TypeScript
import { InputSignal } from '@angular/core';
import { PlatformService } from '../../../services/platform.service';
import * as i0 from "@angular/core";
/**
* Renders a color picker input within a form structure, displaying the selected color value.
* It adapts the text style based on the platform and supports additional properties like header and status.
*/
export declare class ColorInputComponent {
protected platformService: PlatformService;
protected platform: import("@angular/core").Signal<import("tgui-angular").PlatformType>;
/** The header label for the color input */
header: InputSignal<string | null>;
/** Content to be displayed before the color input */
before: InputSignal<any>;
/** The status of the input - error, default or focused */
status: InputSignal<"error" | "default" | "focused">;
/** The current color value */
value: InputSignal<string>;
/** The default color value */
defaultValue: InputSignal<string>;
/** Whether the input is disabled */
disabled: InputSignal<boolean>;
/** CSS class to apply to the component */
class: InputSignal<string>;
/** Event handler for color change */
onChange: InputSignal<((event: Event) => void) | undefined>;
private internalValue;
private temporaryValue;
constructor();
/** Current color value, combining input value or internal state */
protected colorValue: import("@angular/core").Signal<string>;
/** Classes for the wrapper element */
protected wrapperClasses: import("@angular/core").Signal<{
[x: string]: boolean;
wrapper: boolean;
'wrapper--ios': boolean;
}>;
/**
* Handle input event from the color picker
* This updates the UI immediately as the user selects colors
*/
protected handleInput(event: Event): void;
/**
* Handle change event from the color input
* This is triggered when the color picker is closed or Enter is pressed
*/
protected handleChange(event: Event): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ColorInputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ColorInputComponent, "tgui-color-input", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "before": { "alias": "before"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "onChange": { "alias": "onChange"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}