UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

33 lines (24 loc) 2.15 kB
import * as react_hook_form from 'react-hook-form'; import { FormProviderProps, FieldValues, FieldPath, ControllerProps } from 'react-hook-form'; import * as React$1 from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { LabelProps } from '../label/index.cjs'; import * as _radix_ui_react_slot from '@radix-ui/react-slot'; import { Slot } from '@radix-ui/react-slot'; import 'radix-ui'; type FormProps = FormProviderProps; declare const Form: <TFieldValues extends react_hook_form.FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element; type FormItemProps = React$1.HTMLAttributes<HTMLDivElement>; declare const FormItem: React$1.ForwardRefExoticComponent<FormItemProps & React$1.RefAttributes<HTMLDivElement>>; declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element; type FormLabelProps = LabelProps & { caption?: React$1.ReactNode; }; declare const FormLabel: React$1.ForwardRefExoticComponent<Omit<FormLabelProps, "ref"> & React$1.RefAttributes<HTMLLabelElement>>; type FormControlProps = React$1.ComponentPropsWithoutRef<typeof Slot>; declare const FormControl: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>; type FormMessageProps = React$1.HTMLAttributes<HTMLParagraphElement>; declare const FormMessage: React$1.ForwardRefExoticComponent<FormMessageProps & React$1.RefAttributes<HTMLParagraphElement>>; type FormDescriptionProps = React$1.HTMLAttributes<HTMLParagraphElement>; declare const FormDescription: React$1.ForwardRefExoticComponent<FormDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>; export { Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, type FormProps };