import { FASTElement } from '@microsoft/fast-element'; /** * The base class for a component with a toggleable checked state. * * @fires { Event } change - Fires a custom 'change' event when the checked state changes * @fires { Event } input - Fires a custom 'input' event when the checked state changes * * @public */ export declare class BaseCheckbox extends FASTElement { /** * The element's current checked state. * * @public */ get checked(): boolean; set checked(next: boolean); /** * The disabled state of the control. * * @public */ disabled?: boolean; /** * Toggles the disabled state when the user changes the `disabled` property. * * @internal */ protected disabledChanged(prev: boolean | undefined, next: boolean | undefined): void; /** * The initial disabled state of the control. * * @public * @remarks * HTML Attribute: `disabled` */ disabledAttribute?: boolean; /** * Sets the disabled state when the `disabled` attribute changes. * * @param prev - the previous value * @param next - the current value * @internal */ protected disabledAttributeChanged(prev: boolean | undefined, next: boolean | undefined): void; /** * The id of a form to associate the element to. * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute * * @public * @remarks * HTML Attribute: `form` */ formAttribute?: string; /** * The initial checked state of the element. * * @public * @remarks * HTML Attribute: `checked` */ initialChecked?: boolean; /** * Updates the checked state when the `checked` attribute is changed, unless the checked state has been changed by the user. * * @param prev - The previous initial checked state * @param next - The current initial checked state * @internal */ protected initialCheckedChanged(prev: boolean | undefined, next: boolean | undefined): void; /** * The initial value of the input. * * @public * @remarks * HTML Attribute: `value` */ initialValue: string; /** * Sets the value of the input when the `value` attribute changes. * * @param prev - The previous initial value * @param next - The current initial value * @internal */ protected initialValueChanged(prev: string, next: string): void; /** * Tracks whether the space key was pressed down while the checkbox was focused. * This is used to prevent inadvertently checking a required, unchecked checkbox when the space key is pressed on a * submit button and field validation is triggered. * * @internal */ private _keydownPressed; /** * The name of the element. This element's value will be surfaced during form submission under the provided name. * * @public * @remarks * HTML Attribute: `name` */ name: string; /** * The element's required state. * * @public * @remarks * HTML Attribute: `required` */ required: boolean; /** * Sets the validity of the control when the required state changes. * * @param prev - The previous required state * @param next - The current required state * @internal */ protected requiredChanged(prev: boolean, next: boolean): void; /** * The internal checked state of the control. * * @internal */ private _checked?; /** * Indicates that the checked state has been changed by the user. * * @internal */ private dirtyChecked; /** * The associated `
` element. * * @public * @remarks * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property. */ get form(): HTMLFormElement | null; /** * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component. * * @internal */ elementInternals: ElementInternals; /** * The form-associated flag. * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements} * * @public */ static formAssociated: boolean; /** * A reference to all associated `