import type { StringLike } from "@ariakit/core/form/types"; import type { BooleanOrCallback } from "@ariakit/core/utils/types"; import type { ElementType, FocusEvent } from "react"; import type { CollectionItemOptions } from "../collection/collection-item.tsx"; import type { Props } from "../utils/types.ts"; import type { FormStore } from "./form-store.ts"; declare const TagName = "input"; type TagName = typeof TagName; /** * Returns props to create a `FormControl` component. Unlike `useFormInput`, * this hook doesn't automatically returns the `value` and `onChange` props. * This is so we can use it not only for native form elements but also for * custom components whose value is not controlled by the native `value` and * `onChange` props. * @see https://ariakit.com/components/form * @example * ```jsx * const store = useFormStore({ defaultValues: { content: "" } }); * const props = useFormControl({ store, name: store.names.content }); * const value = store.useValue(store.names.content); * *
* ``` */ export declare const useFormControl: import("../utils/types.ts").Hook<"input", FormControlOptions<"input">>; /** * Abstract component that renders a form control. Unlike * [`FormInput`](https://ariakit.com/reference/form-input), this component * doesn't automatically pass the `value` and `onChange` props down to the * underlying element. This is so we can use it not only for native form * elements but also for custom components whose value is not controlled by the * native `value` and `onChange` props. * @see https://ariakit.com/components/form * @example * ```jsx {11-19} * const form = useFormStore({ * defaultValues: { * content: "", * }, * }); * * const value = form.useValue(form.names.content); * * * ``` */ export declare const FormControl: (props: FormControlProps) => import("react").ReactElement