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