/** @jsxImportSource react */ import type { Instance } from "../../ui/Instance"; import type { RenderingContext } from "../../ui/RenderingContext"; import { Field, FieldConfig, FieldInstance } from "./Field"; import { BooleanProp, Prop, StringProp } from "../../ui/Prop"; export interface CheckboxConfig extends FieldConfig { /** Value of the checkbox. */ value?: Prop; /** Set to `true` to make the checkbox read-only. */ readOnly?: BooleanProp; /** Base CSS class to be applied to the element. Defaults to `checkbox`. */ baseClass?: string; /** Use native checkbox HTML element. */ native?: boolean; /** Set to `true` to display a square icon to indicate `null` or `undefined` value. */ indeterminate?: boolean; /** Checked value alias for `value`. */ checked?: Prop; /** Text description. */ text?: StringProp; /** Set to true to disable focusing on the checkbox. Used in grids to avoid conflicts. */ unfocusable?: boolean; /** View mode text. */ viewText?: StringProp; /** Custom validation function. */ onValidate?: string | ((value: boolean, instance: Instance, validationParams: Record) => unknown); } export declare class Checkbox extends Field { baseClass: string; checked?: unknown; value?: unknown; indeterminate?: boolean; unfocusable?: boolean; native?: boolean; constructor(config?: CheckboxConfig); init(): void; declareData(...args: Record[]): void; renderWrap(context: RenderingContext, instance: FieldInstance, key: string, content: React.ReactNode): React.ReactElement; validateRequired(context: RenderingContext, instance: FieldInstance): string | undefined; renderNativeCheck(context: RenderingContext, instance: FieldInstance): React.ReactElement; renderCheck(context: RenderingContext, instance: FieldInstance): React.ReactElement; renderInput(context: RenderingContext, instance: FieldInstance, key: string): React.ReactElement; renderValue(context: RenderingContext, instance: FieldInstance): React.ReactNode; formatValue(context: RenderingContext, instance: Instance): React.ReactNode | string; handleClick(e: React.MouseEvent, instance: Instance): void; handleChange(e: React.ChangeEvent | React.MouseEvent, instance: Instance, checked?: boolean): void; } //# sourceMappingURL=Checkbox.d.ts.map