import { PropsWithChildren, ReactNode } from 'react'; import { HelpTextProps } from '../text'; import type { VerticalAlignment } from '../stack'; import { CSSValueWithLength } from '../../styles'; import { FormHelperTextProps } from './FormHelperText'; import { InputSize, InputStatus } from '../input/types'; type FormFieldAlignment = Extract; type FormFieldPosition = 'left' | 'top'; export interface FormFieldProps { className?: string; /** * FormField의 상태를 지정하면 children과 formHelperText 상태를 공유합니다. * PDS의 Input, Dropdown, DropdownInput, NumericInput 컴포넌트만 공유하도록 제한합니다. * 다른 컴포넌트는 사용하더라도 formHelperText에만 status가 적용됩니다. */ status?: InputStatus; label?: ReactNode; /** * 라벨 우측 렌더링될 Addon 요소 */ rightAddon?: ReactNode; required?: boolean; /** * HelpTextProps 타입으로 넘길 경우 라벨 우측 IconHelp14에 자동으로 popover 처리됩니다. */ helper?: HelpTextProps; /** * FormHelperText 컴포넌트로 children 아래에 메세지를 표시합니다. */ formHelperText?: ReactNode; formHelperTextProps?: Omit; /** * 최소너비 80px이상인 경우 라벨 너비를 지정할 수 있습니다. * * @default 80 */ labelWidth?: CSSValueWithLength; /** * @deprecated FormField는 항상 상단 정렬합니다. 이 prop은 다음 major에서 제거될 예정입니다. */ alignment?: FormFieldAlignment; /** * label 위치를 지정할 수 있습니다. * - position 이 top 인 경우 좌측 정렬 고정입니다. * * @default 'left' */ position?: FormFieldPosition; /** * 라벨 영역과 children wrapper의 최소 높이를 form control size에 맞춥니다. * * children의 size는 자동으로 변경하지 않습니다. * * @default 'medium' */ size?: InputSize; children?: ReactNode; /** @default '100%' */ width?: CSSValueWithLength; } export declare const FormField: ({ className, label, status, rightAddon, required, helper, formHelperText, formHelperTextProps, width, labelWidth, position, size, children, }: PropsWithChildren) => import("@emotion/react/jsx-runtime").JSX.Element; export {};