import * as _angular_core from '@angular/core'; import { InjectionToken } from '@angular/core'; import { FormCheckboxControl } from '@angular/forms/signals'; import { FormUiControlBase } from 'forty-cdk/core'; /** * Injection key the `[forCheckboxIndicator]` uses to resolve its parent * checkbox, decoupled from the concrete `ForCheckbox` class. `ForCheckbox` * provides itself under this token, so a design system wrapping the checkbox * by subclassing re-points it at the subclass with a single provider * (`{ provide: FOR_CHECKBOX, useExisting: MtxCheckbox }`) and the indicator * keeps resolving — see `docs/wrapping-form-primitives.md`. */ declare const FOR_CHECKBOX: InjectionToken; /** * Headless checkbox implementing the * [WAI-ARIA Checkbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/) * with optional tri-state (`indeterminate`) support, plus Angular's * `FormCheckboxControl` from `@angular/forms/signals` for `[formField]` * auto-wiring. * * Works on a native ` * I agree to the terms. * * *
* * * * ``` */ declare class ForCheckbox extends FormUiControlBase implements FormCheckboxControl { #private; protected readonly buttonType: _angular_core.Signal; /** Two-way bindable on/off state. Required by `FormCheckboxControl`. */ readonly checked: _angular_core.ModelSignal; /** * Two-way bindable indeterminate state. When true, `aria-checked="mixed"` * is announced regardless of `checked`. Activation clears it. * * Not part of `FormCheckboxControl` — the field's value stays binary. * Indeterminate is a UI-only concern (e.g. a parent "select all" reflecting * children with mixed selection). */ readonly indeterminate: _angular_core.ModelSignal; protected readonly ariaChecked: _angular_core.Signal<"true" | "false" | "mixed">; /** * Logical state reflected on `data-state`: `'checked'`, `'unchecked'`, or * `'indeterminate'`. Exposed so `ForCheckboxIndicator` can mirror it without * re-deriving the same mapping. */ readonly dataState: _angular_core.Signal<"checked" | "unchecked" | "indeterminate">; protected readonly tabindex: _angular_core.Signal; constructor(); protected onClick(): void; protected onKeydown(event: KeyboardEvent): void; protected onKeyup(event: KeyboardEvent): void; protected onBlur(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Optional indicator slot inside a `ForCheckbox`. Apply on the element * the consumer wants to show only while the checkbox is `checked` or * `indeterminate` (typically a check icon, dash, or filled square). The * directive mirrors `data-state` from the parent so the consumer can * style transitions without per-state bindings; hide the unchecked state * via `[data-state="unchecked"] { display: none }` or `@if`. * * Purely a styling convenience — consumers happy with CSS `:has` * selectors or `[data-state]` checks on the parent can skip it entirely. */ declare class ForCheckboxIndicator { protected readonly parent: ForCheckbox; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Exact public names of every `ForCheckbox` input, its models included. Spread it into the * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the * primitive's full surface — the Signal Forms members `[formField]` binds among them — * without hand-maintaining the list. Always spread into an inline object literal as shown * below: the literal is what keeps the entry statically analyzable for consumers compiling * against the published package. An anti-drift spec fails when this list no longer matches * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported * wrapping patterns. * * @example * ```ts * @Component({ * selector: 'button[myCheckbox]', * template: '', * hostDirectives: [ * { * directive: ForCheckbox, * inputs: [...FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS], * outputs: [...FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS], * }, * ], * }) * export class MyCheckbox {} * ``` */ declare const FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS: readonly ["checked", "indeterminate", "dirty", "disabled", "errors", "invalid", "name", "pending", "readonly", "required", "touched"]; /** * Exact public names of every `ForCheckbox` output, the Signal Forms `touch` output * included. Spread it into the `outputs` array of the same `hostDirectives` entry as * {@link FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS}. */ declare const FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS: readonly ["checkedChange", "indeterminateChange", "touchedChange", "touch"]; export { FOR_CHECKBOX, FOR_CHECKBOX_HOST_DIRECTIVE_INPUTS, FOR_CHECKBOX_HOST_DIRECTIVE_OUTPUTS, ForCheckbox, ForCheckboxIndicator };