1 | import * as React from 'react';
|
2 | import { List, useWatch } from 'rc-field-form';
|
3 | import type { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
|
4 | import type { FormRef } from 'rc-field-form/lib/interface';
|
5 | import type { Options } from 'scroll-into-view-if-needed';
|
6 | import type { SizeType } from '../config-provider/SizeContext';
|
7 | import type { ColProps } from '../grid/col';
|
8 | import type { FeedbackIcons } from './FormItem';
|
9 | import useForm from './hooks/useForm';
|
10 | import type { FormInstance } from './hooks/useForm';
|
11 | import type { Variant } from '../config-provider';
|
12 | import type { FormLabelAlign } from './interface';
|
13 | export type RequiredMark = boolean | 'optional' | ((labelNode: React.ReactNode, info: {
|
14 | required: boolean;
|
15 | }) => React.ReactNode);
|
16 | export type FormLayout = 'horizontal' | 'inline' | 'vertical';
|
17 | export type FormItemLayout = 'horizontal' | 'vertical';
|
18 | export interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form'> {
|
19 | prefixCls?: string;
|
20 | colon?: boolean;
|
21 | name?: string;
|
22 | layout?: FormLayout;
|
23 | labelAlign?: FormLabelAlign;
|
24 | labelWrap?: boolean;
|
25 | labelCol?: ColProps;
|
26 | wrapperCol?: ColProps;
|
27 | form?: FormInstance<Values>;
|
28 | feedbackIcons?: FeedbackIcons;
|
29 | size?: SizeType;
|
30 | disabled?: boolean;
|
31 | scrollToFirstError?: Options | boolean;
|
32 | requiredMark?: RequiredMark;
|
33 |
|
34 | hideRequiredMark?: boolean;
|
35 | rootClassName?: string;
|
36 | variant?: Variant;
|
37 | }
|
38 | declare const Form: (<Values = any>(props: React.PropsWithChildren<FormProps<Values>> & React.RefAttributes<FormRef<Values>>) => React.ReactElement) & Pick<React.FC, "displayName">;
|
39 | export { List, useForm, useWatch, type FormInstance };
|
40 | export default Form;
|
41 |
|
\ | No newline at end of file |