1 | import type { ValidateMessages } from 'rc-field-form/lib/interface';
|
2 | import * as React from 'react';
|
3 | import type { RequiredMark } from '../form/Form';
|
4 | import type { Locale } from '../locale-provider';
|
5 | import type { ConfigConsumerProps, CSPConfig, DirectionType, Theme, ThemeConfig } from './context';
|
6 | import { ConfigConsumer, ConfigContext, defaultIconPrefixCls } from './context';
|
7 | import type { RenderEmptyHandler } from './defaultRenderEmpty';
|
8 | import type { SizeType } from './SizeContext';
|
9 | import SizeContext from './SizeContext';
|
10 | export { type RenderEmptyHandler, ConfigContext, ConfigConsumer, type CSPConfig, type DirectionType, type ConfigConsumerProps, };
|
11 | export { defaultIconPrefixCls };
|
12 | export declare const configConsumerProps: string[];
|
13 | export interface ConfigProviderProps {
|
14 | getTargetContainer?: () => HTMLElement | Window;
|
15 | getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
|
16 | prefixCls?: string;
|
17 | iconPrefixCls?: string;
|
18 | children?: React.ReactNode;
|
19 | renderEmpty?: RenderEmptyHandler;
|
20 | csp?: CSPConfig;
|
21 | autoInsertSpaceInButton?: boolean;
|
22 | form?: {
|
23 | validateMessages?: ValidateMessages;
|
24 | requiredMark?: RequiredMark;
|
25 | colon?: boolean;
|
26 | };
|
27 | input?: {
|
28 | autoComplete?: string;
|
29 | };
|
30 | pagination?: {
|
31 | showSizeChanger?: boolean;
|
32 | };
|
33 | locale?: Locale;
|
34 | pageHeader?: {
|
35 | ghost: boolean;
|
36 | };
|
37 | componentSize?: SizeType;
|
38 | componentDisabled?: boolean;
|
39 | direction?: DirectionType;
|
40 | space?: {
|
41 | size?: SizeType | number;
|
42 | };
|
43 | virtual?: boolean;
|
44 | dropdownMatchSelectWidth?: boolean;
|
45 | theme?: ThemeConfig;
|
46 | }
|
47 | export declare const defaultPrefixCls = "ant";
|
48 | declare function getGlobalIconPrefixCls(): string;
|
49 | declare const setGlobalConfig: ({ prefixCls, iconPrefixCls, theme, }: Pick<ConfigProviderProps, "prefixCls" | "iconPrefixCls"> & {
|
50 | theme?: Theme | undefined;
|
51 | }) => void;
|
52 | export declare const globalConfig: () => {
|
53 | getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
|
54 | getIconPrefixCls: typeof getGlobalIconPrefixCls;
|
55 | getRootPrefixCls: () => string;
|
56 | };
|
57 | declare const ConfigProvider: React.FC<ConfigProviderProps> & {
|
58 |
|
59 | ConfigContext: typeof ConfigContext;
|
60 | SizeContext: typeof SizeContext;
|
61 | config: typeof setGlobalConfig;
|
62 | };
|
63 | export default ConfigProvider;
|