1 | import * as React from 'react';
|
2 | import type { WarningContextProps } from '../_util/warning';
|
3 | import type { Locale } from '../locale';
|
4 | import type { AlertConfig, BadgeConfig, ButtonConfig, CardConfig, CollapseConfig, ComponentStyleConfig, ConfigConsumerProps, CSPConfig, DirectionType, DrawerConfig, FlexConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, MenuConfig, ModalConfig, NotificationConfig, PaginationConfig, PopupOverflow, SelectConfig, SpaceConfig, TableConfig, TabsConfig, TagConfig, TextAreaConfig, Theme, ThemeConfig, TourConfig, TransferConfig, WaveConfig } from './context';
|
5 | import { ConfigConsumer, ConfigContext, defaultIconPrefixCls } from './context';
|
6 | import type { RenderEmptyHandler } from './defaultRenderEmpty';
|
7 | import useConfig from './hooks/useConfig';
|
8 | import type { SizeType } from './SizeContext';
|
9 | import SizeContext from './SizeContext';
|
10 | export declare const warnContext: (componentName: string) => void;
|
11 | export { ConfigConsumer, ConfigContext, defaultIconPrefixCls, type ConfigConsumerProps, type CSPConfig, type DirectionType, type RenderEmptyHandler, type ThemeConfig, };
|
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?: FormConfig;
|
23 | input?: InputConfig;
|
24 | textArea?: TextAreaConfig;
|
25 | select?: SelectConfig;
|
26 | pagination?: PaginationConfig;
|
27 | |
28 |
|
29 |
|
30 |
|
31 | locale?: Locale;
|
32 | componentSize?: SizeType;
|
33 | componentDisabled?: boolean;
|
34 | |
35 |
|
36 |
|
37 |
|
38 |
|
39 | direction?: DirectionType;
|
40 | space?: SpaceConfig;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | virtual?: boolean;
|
47 |
|
48 | dropdownMatchSelectWidth?: boolean;
|
49 | popupMatchSelectWidth?: boolean;
|
50 | popupOverflow?: PopupOverflow;
|
51 | theme?: ThemeConfig;
|
52 | warning?: WarningContextProps;
|
53 | alert?: AlertConfig;
|
54 | anchor?: ComponentStyleConfig;
|
55 | button?: ButtonConfig;
|
56 | calendar?: ComponentStyleConfig;
|
57 | carousel?: ComponentStyleConfig;
|
58 | cascader?: ComponentStyleConfig;
|
59 | collapse?: CollapseConfig;
|
60 | divider?: ComponentStyleConfig;
|
61 | drawer?: DrawerConfig;
|
62 | typography?: ComponentStyleConfig;
|
63 | skeleton?: ComponentStyleConfig;
|
64 | spin?: ComponentStyleConfig;
|
65 | segmented?: ComponentStyleConfig;
|
66 | statistic?: ComponentStyleConfig;
|
67 | steps?: ComponentStyleConfig;
|
68 | image?: ImageConfig;
|
69 | layout?: ComponentStyleConfig;
|
70 | list?: ComponentStyleConfig;
|
71 | mentions?: ComponentStyleConfig;
|
72 | modal?: ModalConfig;
|
73 | progress?: ComponentStyleConfig;
|
74 | result?: ComponentStyleConfig;
|
75 | slider?: ComponentStyleConfig;
|
76 | breadcrumb?: ComponentStyleConfig;
|
77 | menu?: MenuConfig;
|
78 | floatButtonGroup?: FloatButtonGroupConfig;
|
79 | checkbox?: ComponentStyleConfig;
|
80 | descriptions?: ComponentStyleConfig;
|
81 | empty?: ComponentStyleConfig;
|
82 | badge?: BadgeConfig;
|
83 | radio?: ComponentStyleConfig;
|
84 | rate?: ComponentStyleConfig;
|
85 | switch?: ComponentStyleConfig;
|
86 | transfer?: TransferConfig;
|
87 | avatar?: ComponentStyleConfig;
|
88 | message?: ComponentStyleConfig;
|
89 | tag?: TagConfig;
|
90 | table?: TableConfig;
|
91 | card?: CardConfig;
|
92 | tabs?: TabsConfig;
|
93 | timeline?: ComponentStyleConfig;
|
94 | timePicker?: ComponentStyleConfig;
|
95 | upload?: ComponentStyleConfig;
|
96 | notification?: NotificationConfig;
|
97 | tree?: ComponentStyleConfig;
|
98 | colorPicker?: ComponentStyleConfig;
|
99 | datePicker?: ComponentStyleConfig;
|
100 | rangePicker?: ComponentStyleConfig;
|
101 | dropdown?: ComponentStyleConfig;
|
102 | flex?: FlexConfig;
|
103 | |
104 |
|
105 |
|
106 | wave?: WaveConfig;
|
107 | tour?: TourConfig;
|
108 | }
|
109 | type holderRenderType = (children: React.ReactNode) => React.ReactNode;
|
110 | export declare const defaultPrefixCls = "ant";
|
111 | declare function getGlobalIconPrefixCls(): string;
|
112 | interface GlobalConfigProps {
|
113 | prefixCls?: string;
|
114 | iconPrefixCls?: string;
|
115 | theme?: Theme | ThemeConfig;
|
116 | holderRender?: holderRenderType;
|
117 | }
|
118 | declare const setGlobalConfig: (props: GlobalConfigProps) => void;
|
119 | export declare const globalConfig: () => {
|
120 | getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
|
121 | getIconPrefixCls: typeof getGlobalIconPrefixCls;
|
122 | getRootPrefixCls: () => string;
|
123 | getTheme: () => ThemeConfig;
|
124 | holderRender: holderRenderType | undefined;
|
125 | };
|
126 | declare const ConfigProvider: React.FC<ConfigProviderProps> & {
|
127 |
|
128 | ConfigContext: typeof ConfigContext;
|
129 |
|
130 | SizeContext: typeof SizeContext;
|
131 | config: typeof setGlobalConfig;
|
132 | useConfig: typeof useConfig;
|
133 | };
|
134 | export default ConfigProvider;
|