import { ReactNode } from "react"; import { CheckboxProps } from "../Checkbox/Checkbox"; import { FormGroupProps } from "../FormGroup/FormGroup"; type FormGroupExposedProps = Pick; export interface CheckboxFieldProps extends CheckboxProps, FormGroupExposedProps { /** * Text or ReactNode displayed next to the checkbox. This is the clickable label for the checkbox itself * (distinct from the `label` prop which labels the overall form group). */ checkboxLabel?: string | ReactNode; } /** * CheckboxField is a form-ready checkbox that wraps a `Checkbox` inside a `FormGroup`. * It provides a labeled checkbox with support for tooltips, help text, validation, and form group styling. * * ### When to use * Use CheckboxField for boolean inputs inside forms — for example, "I agree to terms" or toggling a feature on/off. * * ### When not to use * Do not use CheckboxField for multi-select lists — use checkbox filters or a select component. * For a standalone checkbox without form group wrapping, use `Checkbox` directly. * * @example Checkbox field in a form * ```tsx * import { CheckboxField } from "@trackunit/react-form-components"; * import { useState } from "react"; * * const TermsCheckbox = () => { * const [accepted, setAccepted] = useState(false); * return ( * setAccepted(!accepted)} * /> * ); * }; * ``` * @param {CheckboxFieldProps} props - The props for the CheckboxField component */ export declare const CheckboxField: { ({ label, id, tip, helpText, helpAddon, isInvalid, className, checked, "data-testid": dataTestId, checkboxLabel, onChange, ref, disabled, readOnly, required, ...rest }: CheckboxFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export {};