1 | import type { FormProviderProps as RcFormProviderProps } from 'rc-field-form/lib/FormContext';
|
2 | import type { Meta } from 'rc-field-form/lib/interface';
|
3 | import type { FC, PropsWithChildren, ReactNode } from 'react';
|
4 | import * as React from 'react';
|
5 | import type { ColProps } from '../grid/col';
|
6 | import type { FormInstance, RequiredMark } from './Form';
|
7 | import type { ValidateStatus } from './FormItem';
|
8 | import type { FormLabelAlign } from './interface';
|
9 |
|
10 | export interface FormContextProps {
|
11 | vertical: boolean;
|
12 | name?: string;
|
13 | colon?: boolean;
|
14 | labelAlign?: FormLabelAlign;
|
15 | labelWrap?: boolean;
|
16 | labelCol?: ColProps;
|
17 | wrapperCol?: ColProps;
|
18 | requiredMark?: RequiredMark;
|
19 | itemRef: (name: (string | number)[]) => (node: React.ReactElement) => void;
|
20 | form?: FormInstance;
|
21 | }
|
22 | export declare const FormContext: React.Context<FormContextProps>;
|
23 |
|
24 | export type ReportMetaChange = (meta: Meta, uniqueKeys: React.Key[]) => void;
|
25 | export declare const NoStyleItemContext: React.Context<ReportMetaChange | null>;
|
26 |
|
27 | export interface FormProviderProps extends Omit<RcFormProviderProps, 'validateMessages'> {
|
28 | prefixCls?: string;
|
29 | }
|
30 | export declare const FormProvider: React.FC<FormProviderProps>;
|
31 |
|
32 | export interface FormItemPrefixContextProps {
|
33 | prefixCls: string;
|
34 | status?: ValidateStatus;
|
35 | }
|
36 | export declare const FormItemPrefixContext: React.Context<FormItemPrefixContextProps>;
|
37 | export interface FormItemStatusContextProps {
|
38 | isFormItemInput?: boolean;
|
39 | status?: ValidateStatus;
|
40 | hasFeedback?: boolean;
|
41 | feedbackIcon?: ReactNode;
|
42 | }
|
43 | export declare const FormItemInputContext: React.Context<FormItemStatusContextProps>;
|
44 | export type NoFormStyleProps = PropsWithChildren<{
|
45 | status?: boolean;
|
46 | override?: boolean;
|
47 | }>;
|
48 | export declare const NoFormStyle: FC<NoFormStyleProps>;
|