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