UNPKG

@llamaindex/ui

Version:

A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications

29 lines (26 loc) 1.75 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as react_hook_form from 'react-hook-form'; import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form'; import * as React from 'react'; import * as LabelPrimitive from '@radix-ui/react-label'; import { Slot } from '@radix-ui/react-slot'; declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element; declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element; declare const useFormField: () => { invalid: boolean; isDirty: boolean; isTouched: boolean; isValidating: boolean; error?: react_hook_form.FieldError; id: string; name: string; formItemId: string; formDescriptionId: string; formMessageId: string; }; declare function FormItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element; declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element; declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element; declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element; declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null; export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };