import { useId } from "@radix-ui/react-id"; import { forwardRef, ReactNode } from "react"; import { FormProvider, UseFormReturn } from "react-hook-form"; import classNames from "@lib/classNames"; type InputProps = Omit & { name: string }; export const Input = forwardRef(function Input(props, ref) { return ( ); }); export function Label(props: JSX.IntrinsicElements["label"]) { return ( ); } export const TextField = forwardRef< HTMLInputElement, { label: ReactNode; } & React.ComponentProps & { labelProps?: React.ComponentProps; } >(function TextField(props, ref) { const id = useId(); const { label, ...passThroughToInput } = props; // TODO: use `useForm()` from RHF and get error state here too! return (
); }); // eslint-disable-next-line @typescript-eslint/no-explicit-any export const Form = forwardRef } & JSX.IntrinsicElements["form"]>( function Form(props, ref) { const { form, ...passThrough } = props; return (
{props.children}
); } ); export function FieldsetLegend(props: JSX.IntrinsicElements["legend"]) { return ( {props.children} ); } export function InputGroupBox(props: JSX.IntrinsicElements["div"]) { return (
{props.children}
); }