UNPKG

@sixbell-telco/sdk

Version:

A collection of reusable components designed for use in Sixbell Telco Angular projects

92 lines (91 loc) 3.35 kB
import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; /** Possible checkbox color variants */ export type CheckboxVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'warning' | 'info' | 'error' | null | undefined; /** Possible checkbox size variants */ export type CheckboxSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined; /** Configuration object for checkbox styling */ export type CheckboxProps = { variant?: CheckboxVariantProps; size?: CheckboxSizeProps; }; /** * A customizable checkbox component with various styling options * * @remarks * Implements ControlValueAccessor for seamless integration with Angular forms. * Supports both standalone usage and form integration with reactive/template-driven forms. * * @example * ```html * <!-- Basic usage --> * <st-checkbox [(value)]="isChecked"></st-checkbox> * ``` * * @example * ```html * <!-- With label and custom styling --> * <st-checkbox * variant="success" * size="lg" * label="Accept terms" * [(value)]="termsAccepted" * ></st-checkbox> * ``` */ export declare class CheckboxComponent implements ControlValueAccessor { /** * Checkbox color variant * @defaultValue 'primary' */ variant: import("@angular/core").InputSignal<CheckboxVariantProps>; /** * Checkbox size variant * @defaultValue 'md' */ size: import("@angular/core").InputSignal<CheckboxSizeProps>; /** * Label text displayed next to the checkbox */ label: import("@angular/core").InputSignal<string>; /** * HTML name attribute for the checkbox */ name: import("@angular/core").InputSignal<string | null>; /** * Two-way bindable checkbox state */ value: import("@angular/core").ModelSignal<boolean>; /** * Event emitted when checkbox state changes */ valueUpdated: import("@angular/core").OutputEmitterRef<boolean>; private onControlChange; private onControlTouch; /** * Whether the checkbox is disabled * @defaultValue false */ disabled: import("@angular/core").ModelSignal<boolean>; /** * @internal * Computed class string for the checkbox */ componentClass: import("@angular/core").Signal<string>; writeValue(obj: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; /** * @internal * Handles checkbox state changes */ handleChange(): void; /** * @internal * Handles blur event */ handleBlur(): void; static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "st-checkbox", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valueUpdated": "valueUpdated"; "disabled": "disabledChange"; }, never, never, true, never>; }