import * as i0 from '@angular/core'; import { Signal, ElementRef, InputSignal, ModelSignal, OutputEmitterRef } from '@angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; /** Checkbox size variants. */ type CheckboxSize = 'sm' | 'md' | 'lg'; /** Checkbox color variants. */ type CheckboxVariant = 'primary' | 'accent' | 'warn'; /** * CVA variants for the visual checkbox box. * * Uses `peer` selectors to style based on native input state: * - `peer-checked:` for checked state * - `peer-indeterminate:` for indeterminate state * - `peer-focus-visible:` for keyboard focus * - `peer-disabled:` for disabled state * * @tokens `--color-border`, `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`, * `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`, * `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`, * `--color-disabled`, `--color-disabled-foreground`, `--color-ring`, `--radius-interactive-sm` */ declare const checkboxBoxVariants: (props?: { variant?: CheckboxVariant; size?: CheckboxSize; }) => string; /** Size-based classes for the checkmark SVG icon. */ declare const CHECKBOX_ICON_SIZES: Record; /** Size-based classes for the label content. */ declare const CHECKBOX_LABEL_SIZES: Record; /** Event emitted when checkbox state changes. */ interface CheckboxChange { checked: boolean; source: ComCheckbox; } /** * Production-grade checkbox component with full accessibility support. * * Uses a native `` for built-in keyboard handling, * `:checked` and `:indeterminate` pseudo-classes, and screen reader support. * * Implements `ControlValueAccessor` for Reactive Forms integration via * `NgControl` injection pattern (no `NG_VALUE_ACCESSOR` provider). * * @tokens `--color-border`, `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`, * `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`, * `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`, * `--color-disabled`, `--color-disabled-foreground`, `--color-ring` * * @example Basic usage * ```html * Enable feature * ``` * * @example With reactive forms * ```html * * I accept the terms and conditions * * ``` * * @example Indeterminate state * ```html * * Select all * * ``` * * @example Variants and sizes * ```html * Large accent checkbox * Small warning checkbox * ``` */ declare class ComCheckbox implements ControlValueAccessor { /** Optional NgControl for reactive forms integration. */ readonly ngControl: NgControl | null; /** Reference to the native input element. */ readonly inputRef: Signal | undefined>; /** Unique ID for this checkbox instance. */ private readonly uniqueId; readonly size: InputSignal; readonly variant: InputSignal; readonly checked: ModelSignal; readonly indeterminate: ModelSignal; readonly disabled: ModelSignal; readonly htmlValue: InputSignal; readonly name: InputSignal; readonly touched: ModelSignal; readonly invalid: InputSignal; readonly sfErrors: InputSignal; readonly sfRequired: InputSignal; readonly id: InputSignal; readonly ariaLabel: InputSignal; readonly ariaLabelledby: InputSignal; readonly ariaDescribedby: InputSignal; readonly changed: OutputEmitterRef; readonly inputId: Signal; protected readonly boxClasses: Signal; protected readonly iconSizeClass: Signal; protected readonly labelSizeClass: Signal; private onChange; protected onTouched: () => void; constructor(); writeValue(value: boolean): void; registerOnChange(fn: (value: boolean) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; protected onBlur(): void; protected onInputChange(event: Event): void; /** Focuses this checkbox's input element. */ focus(): void; /** Toggles the checkbox state programmatically. */ toggle(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { CHECKBOX_ICON_SIZES, CHECKBOX_LABEL_SIZES, ComCheckbox, checkboxBoxVariants }; export type { CheckboxChange, CheckboxSize, CheckboxVariant };