1 | import React from 'react';
|
2 | import type { ReactNode } from 'react';
|
3 | import { NativeProps } from '../../utils/native-props';
|
4 | import { ListProps } from '../list';
|
5 | import type { FormProps as RcFormProps, FormInstance as RCFormInstance } from 'rc-field-form';
|
6 | import { FormContextType } from './context';
|
7 | export declare type FormInstance = Pick<RCFormInstance, 'getFieldValue' | 'getFieldsValue' | 'getFieldError' | 'getFieldsError' | 'isFieldTouched' | 'isFieldsTouched' | 'resetFields' | 'setFields' | 'setFieldValue' | 'setFieldsValue' | 'submit' | 'validateFields'>;
|
8 | export declare type FormProps = Pick<RcFormProps, 'form' | 'initialValues' | 'name' | 'preserve' | 'validateMessages' | 'validateTrigger' | 'onFieldsChange' | 'onFinish' | 'onFinishFailed' | 'onValuesChange' | 'children'> & NativeProps<'--border-inner' | '--border-top' | '--border-bottom' | '--prefix-width'> & Partial<FormContextType> & {
|
9 | footer?: ReactNode;
|
10 | mode?: ListProps['mode'];
|
11 | };
|
12 | export declare const Form: React.ForwardRefExoticComponent<Pick<RcFormProps<any>, "form" | "children" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & {
|
13 | className?: string | undefined;
|
14 | style?: (React.CSSProperties & Partial<Record<"--border-bottom" | "--border-inner" | "--border-top" | "--prefix-width", string>>) | undefined;
|
15 | tabIndex?: number | undefined;
|
16 | } & React.AriaAttributes & Partial<FormContextType> & {
|
17 | footer?: ReactNode;
|
18 | mode?: ListProps['mode'];
|
19 | } & React.RefAttributes<FormInstance>>;
|