zhihao-ui-react 1.0.1-beta.0 → 1.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +881 -136
- package/dist/index.js +3215 -1204
- package/dist/style.css +1 -1
- package/package.json +35 -8
- package/dist/index.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, DividerProps as DividerProps$1, EmptyProps as EmptyProps$1, ThemeConfig } from "antd";
|
|
2
|
-
import { CSSProperties, HTMLAttributes, Key, MouseEvent, ReactElement, ReactNode, Ref, UIEventHandler } from "react";
|
|
1
|
+
import { BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, DividerProps as DividerProps$1, EmptyProps as EmptyProps$1, ModalProps, ThemeConfig } from "antd";
|
|
2
|
+
import { CSSProperties, HTMLAttributes, ImgHTMLAttributes, Key, MouseEvent, ReactElement, ReactNode, Ref, UIEventHandler } from "react";
|
|
3
3
|
import { AlertProps as AlertProps$1 } from "antd/es/alert";
|
|
4
4
|
import { RibbonProps } from "antd/es/badge";
|
|
5
5
|
import { ButtonGroupProps as ButtonGroupProps$1 } from "antd/es/button";
|
|
6
|
-
import { CascaderProps as CascaderProps$1, DefaultOptionType } from "antd/es/cascader";
|
|
7
|
-
import {
|
|
6
|
+
import { CascaderProps as CascaderProps$1, DefaultOptionType as DefaultOptionType$1 } from "antd/es/cascader";
|
|
7
|
+
import { CascaderPanelProps as CascaderPanelProps$1 } from "antd/es/cascader/Panel";
|
|
8
|
+
import { CheckboxGroupProps as CheckboxGroupProps$1 } from "antd/es/checkbox";
|
|
9
|
+
import { CheckboxProps as CheckboxProps$1 } from "antd/es/checkbox/Checkbox";
|
|
8
10
|
import { DatePickerProps as DatePickerProps$1, RangePickerProps } from "antd/es/date-picker";
|
|
9
11
|
import { TimePickerProps as TimePickerProps$1, TimeRangePickerProps as TimeRangePickerProps$1 } from "antd/es/time-picker";
|
|
10
12
|
import { DropdownButtonProps as DropdownButtonProps$1, DropdownProps as DropdownProps$1 } from "antd/es/dropdown";
|
|
11
13
|
import { MenuProps as MenuProps$1, MenuRef as AntdMenuRef } from "antd/es/menu";
|
|
12
14
|
import { FormInstance, FormItemProps as FormItemProps$1, FormListFieldData, FormListOperation, FormListProps, FormProps as FormProps$1, Rule, RuleObject, RuleRender } from "antd/es/form";
|
|
13
|
-
import { ImagePreviewType
|
|
15
|
+
import { ImagePreviewType } from "antd/es/image";
|
|
14
16
|
import { GroupPreviewConfig, PreviewGroupProps } from "antd/es/image/PreviewGroup";
|
|
15
17
|
import { GroupProps } from "antd/es/input";
|
|
16
18
|
import { InputProps as InputProps$1, InputRef } from "antd/es/input/Input";
|
|
@@ -20,14 +22,14 @@ import { TextAreaProps as TextAreaProps$1 } from "antd/es/input/TextArea";
|
|
|
20
22
|
import { PaginationProps as PaginationProps$1 } from "antd/es/pagination";
|
|
21
23
|
import { RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1 } from "antd/es/radio";
|
|
22
24
|
import { ResultProps as ResultProps$1, ResultStatusType as AntdResultStatusType } from "antd/es/result";
|
|
23
|
-
import { BaseOptionType, DefaultOptionType
|
|
25
|
+
import { BaseOptionType, DefaultOptionType, RefSelectProps, SelectProps as SelectProps$1 } from "antd/es/select";
|
|
24
26
|
import { StepsProps as StepsProps$1 } from "antd/es/steps";
|
|
25
27
|
import { SwitchProps as SwitchProps$1 } from "antd/es/switch";
|
|
26
28
|
import { TabPaneProps, TabsProps as TabsProps$1, TabsRef, TabsRef as AntdTabsRef } from "antd/es/tabs";
|
|
27
29
|
import { TimelineProps as TimelineProps$1 } from "antd/es/timeline";
|
|
28
30
|
import { TooltipPlacement as TooltipPlacement$1, TooltipProps as TooltipProps$1 } from "antd/es/tooltip";
|
|
29
31
|
import { DataNode, TreeProps as TreeProps$1 } from "antd/es/tree";
|
|
30
|
-
//#region
|
|
32
|
+
//#region packages/components/src/alert/src/type.d.ts
|
|
31
33
|
/** UI KIT Alert 的状态类型,扩展 Ant Design 不包含的 primary。 */
|
|
32
34
|
type AlertType = "info" | "primary" | "success" | "warning" | "error";
|
|
33
35
|
/** UI KIT Alert 的关闭按钮类型。 */
|
|
@@ -46,14 +48,14 @@ interface AlertProps extends Omit<AlertProps$1, "closeText" | "description" | "m
|
|
|
46
48
|
type?: AlertType;
|
|
47
49
|
}
|
|
48
50
|
//#endregion
|
|
49
|
-
//#region
|
|
51
|
+
//#region packages/components/src/alert/src/alert.d.ts
|
|
50
52
|
/** Alert 复用 Ant Design 关闭、图标和语义能力,并按 UI KIT 类型覆盖视觉。 */
|
|
51
53
|
declare function Alert({ className, closable, closeText, closeType, description, rootClassName, showIcon, title, type, variant, ...restProps }: AlertProps): import("react").JSX.Element;
|
|
52
54
|
declare namespace Alert {
|
|
53
55
|
var displayName: string;
|
|
54
56
|
}
|
|
55
57
|
//#endregion
|
|
56
|
-
//#region
|
|
58
|
+
//#region packages/components/src/badge/src/type.d.ts
|
|
57
59
|
/** 基于 Ant Design Badge 扩展的 UI KIT Badge 属性。 */
|
|
58
60
|
interface BadgeProps extends BadgeProps$1 {}
|
|
59
61
|
/** 基于 Ant Design Badge.Ribbon 扩展的 UI KIT Ribbon 属性。 */
|
|
@@ -61,7 +63,7 @@ interface BadgeRibbonProps extends RibbonProps {}
|
|
|
61
63
|
/** Badge 对外暴露的根节点实例类型。 */
|
|
62
64
|
type BadgeRef = HTMLSpanElement;
|
|
63
65
|
//#endregion
|
|
64
|
-
//#region
|
|
66
|
+
//#region packages/components/src/badge/src/badge.d.ts
|
|
65
67
|
/** BadgeRibbon 复用 Ant Design Ribbon 的角标能力,补充独立类名便于样式隔离。 */
|
|
66
68
|
declare function BadgeRibbon({ className, ...restProps }: BadgeRibbonProps): import("react").JSX.Element;
|
|
67
69
|
declare namespace BadgeRibbon {
|
|
@@ -72,7 +74,7 @@ declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & impo
|
|
|
72
74
|
Ribbon: typeof BadgeRibbon;
|
|
73
75
|
};
|
|
74
76
|
//#endregion
|
|
75
|
-
//#region
|
|
77
|
+
//#region packages/components/src/button/src/type.d.ts
|
|
76
78
|
/** 设计稿中的按钮展示样式。 */
|
|
77
79
|
type ButtonStyle = "basic" | "icon" | "text" | "link";
|
|
78
80
|
/** UI KIT 中的按钮语义色。 */
|
|
@@ -97,72 +99,274 @@ type ButtonRef = HTMLAnchorElement | HTMLButtonElement;
|
|
|
97
99
|
/** 基于 Ant Design Button.Group 扩展的 UI KIT ButtonGroup 属性。 */
|
|
98
100
|
interface ButtonGroupProps extends ButtonGroupProps$1 {}
|
|
99
101
|
//#endregion
|
|
100
|
-
//#region
|
|
102
|
+
//#region packages/components/src/button/src/buttonGroup.d.ts
|
|
101
103
|
/** ButtonGroup 复用 Ant Design Button.Group 的分组能力,并挂载 UI KIT 样式类名。 */
|
|
102
104
|
declare function ButtonGroup({ className, size, ...restProps }: ButtonGroupProps): import("react").JSX.Element;
|
|
103
105
|
declare namespace ButtonGroup {
|
|
104
106
|
var displayName: string;
|
|
105
107
|
}
|
|
106
108
|
//#endregion
|
|
107
|
-
//#region
|
|
109
|
+
//#region packages/components/src/button/src/button.d.ts
|
|
108
110
|
/** 给 Button 挂载 Group 静态属性,兼容 Ant Design 的 Button.Group 使用方式。 */
|
|
109
111
|
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>> & {
|
|
110
112
|
Group: typeof ButtonGroup;
|
|
111
113
|
};
|
|
112
114
|
//#endregion
|
|
113
|
-
//#region
|
|
115
|
+
//#region packages/components/src/cascader/src/type.d.ts
|
|
114
116
|
/** Cascader 尺寸沿用 Ant Design 的 large / middle / small。 */
|
|
115
117
|
type CascaderSize = NonNullable<CascaderProps$1["size"]>;
|
|
116
|
-
/** Cascader
|
|
118
|
+
/** Cascader 单选项的展示形态。 */
|
|
117
119
|
type CascaderOptionType = "default" | "radio";
|
|
120
|
+
/** Element Plus Cascader 节点配置。 */
|
|
121
|
+
interface CascaderConfig {
|
|
122
|
+
/** 子项展开方式。 */
|
|
123
|
+
expandTrigger?: "click" | "hover";
|
|
124
|
+
/** 是否启用多选。 */
|
|
125
|
+
multiple?: boolean;
|
|
126
|
+
/** 是否允许选择任意层级。 */
|
|
127
|
+
checkStrictly?: boolean;
|
|
128
|
+
/** 点击节点文案时是否切换选中状态。 */
|
|
129
|
+
checkOnClickNode?: boolean;
|
|
130
|
+
/** 点击叶子节点文案时是否切换选中状态。 */
|
|
131
|
+
checkOnClickLeaf?: boolean;
|
|
132
|
+
/** 多选或任意层级选择时是否显示前缀选择控件。 */
|
|
133
|
+
showPrefix?: boolean;
|
|
134
|
+
/** 是否返回完整路径。 */
|
|
135
|
+
emitPath?: boolean;
|
|
136
|
+
/** 是否动态加载。 */
|
|
137
|
+
lazy?: boolean;
|
|
138
|
+
/** 动态加载回调。 */
|
|
139
|
+
lazyLoad?: CascaderLazyLoad;
|
|
140
|
+
/** value 字段名。 */
|
|
141
|
+
value?: string;
|
|
142
|
+
/** label 字段名。 */
|
|
143
|
+
label?: string;
|
|
144
|
+
/** children 字段名。 */
|
|
145
|
+
children?: string;
|
|
146
|
+
/** disabled 字段名。 */
|
|
147
|
+
disabled?: string;
|
|
148
|
+
/** leaf 字段名。 */
|
|
149
|
+
leaf?: string;
|
|
150
|
+
}
|
|
151
|
+
/** Element Plus lazyLoad 暴露的最小节点信息。 */
|
|
152
|
+
interface CascaderLazyNode {
|
|
153
|
+
/** 当前层级,根节点为 0。 */
|
|
154
|
+
level: number;
|
|
155
|
+
/** 当前节点值。 */
|
|
156
|
+
value?: string | number;
|
|
157
|
+
/** 当前节点文案。 */
|
|
158
|
+
label?: string;
|
|
159
|
+
}
|
|
160
|
+
/** Element Plus 动态加载函数。 */
|
|
161
|
+
type CascaderLazyLoad = (node: CascaderLazyNode, resolve: (options: CascaderOption[]) => void) => void;
|
|
118
162
|
/** 基于 Ant Design Cascader 扩展的 UI KIT Cascader 属性。 */
|
|
119
|
-
interface
|
|
120
|
-
/**
|
|
121
|
-
|
|
163
|
+
interface CascaderOptionContentContext {
|
|
164
|
+
/** 当前选项数据。 */
|
|
165
|
+
data: CascaderOption;
|
|
166
|
+
/** 当前节点的最小状态。 */
|
|
167
|
+
node: {
|
|
168
|
+
isLeaf: boolean;
|
|
169
|
+
};
|
|
122
170
|
}
|
|
123
|
-
|
|
124
|
-
|
|
171
|
+
interface CascaderSuggestionItem {
|
|
172
|
+
/** 当前搜索结果的完整路径。 */
|
|
173
|
+
pathLabels: string[];
|
|
174
|
+
/** 当前搜索结果默认展示文本。 */
|
|
175
|
+
text: string;
|
|
176
|
+
}
|
|
177
|
+
interface CascaderSuggestionContext {
|
|
178
|
+
/** 当前搜索建议项。 */
|
|
179
|
+
item: CascaderSuggestionItem;
|
|
180
|
+
}
|
|
181
|
+
interface CascaderTagContext {
|
|
182
|
+
/** 当前标签文本。 */
|
|
183
|
+
label: ReactNode;
|
|
184
|
+
/** 当前标签值。 */
|
|
185
|
+
value: unknown;
|
|
186
|
+
/** 当前标签是否可关闭。 */
|
|
187
|
+
closable: boolean;
|
|
188
|
+
/** 删除当前标签。 */
|
|
189
|
+
onClose: () => void;
|
|
190
|
+
}
|
|
191
|
+
/** 基于 Ant Design Cascader 扩展的 UI KIT Cascader 属性。 */
|
|
192
|
+
interface CascaderProps extends Omit<CascaderProps$1<DefaultOptionType$1>, "allowClear" | "defaultValue" | "onChange" | "optionRender" | "showCheckedStrategy" | "tagRender" | "value"> {
|
|
193
|
+
/** 兼容 Ant Design 原始清除配置。 */
|
|
194
|
+
allowClear?: CascaderProps$1<DefaultOptionType$1>["allowClear"];
|
|
195
|
+
/** Element Plus clearable,映射到 Ant Design allowClear。 */
|
|
196
|
+
clearable?: boolean;
|
|
197
|
+
/** 自定义清除图标。 */
|
|
198
|
+
clearIcon?: ReactNode;
|
|
199
|
+
/** 非受控初始值,兼容单选路径和多选路径数组。 */
|
|
200
|
+
defaultValue?: CascaderValue;
|
|
201
|
+
/** 多选时折叠 Tag。 */
|
|
202
|
+
collapseTags?: boolean;
|
|
203
|
+
/** 折叠 Tag 的提示能力。 */
|
|
204
|
+
collapseTagsTooltip?: boolean;
|
|
205
|
+
/** 是否支持搜索。 */
|
|
206
|
+
filterable?: boolean;
|
|
207
|
+
/** 折叠时最多显示的 Tag 数量。 */
|
|
208
|
+
maxCollapseTags?: number;
|
|
209
|
+
/** 自定义节点内容。 */
|
|
210
|
+
optionContent?: (context: CascaderOptionContentContext) => ReactNode;
|
|
211
|
+
/** 单选选项的展示形态,多选时仍使用 Checkbox。 */
|
|
212
|
+
optionType?: CascaderOptionType;
|
|
213
|
+
/** 选中值变化回调。 */
|
|
214
|
+
onChange?: (value: CascaderValue, selectedOptions: CascaderOption[] | CascaderOption[][]) => void;
|
|
215
|
+
/** Element Plus 节点配置。 */
|
|
216
|
+
props?: CascaderConfig;
|
|
217
|
+
/** 自定义搜索建议项。 */
|
|
218
|
+
suggestionItem?: (context: CascaderSuggestionContext) => ReactNode;
|
|
219
|
+
/** 自定义多选标签。 */
|
|
220
|
+
tag?: (context: CascaderTagContext) => ReactElement;
|
|
221
|
+
/** 兼容 Ant Design 原始标签渲染函数。 */
|
|
222
|
+
tagRender?: CascaderProps$1<DefaultOptionType$1>["tagRender"];
|
|
223
|
+
/** 下拉面板顶部内容。 */
|
|
224
|
+
header?: ReactNode;
|
|
225
|
+
/** 下拉面板底部内容。 */
|
|
226
|
+
footer?: ReactNode;
|
|
227
|
+
/** 多选选中项展示策略。 */
|
|
228
|
+
showCheckedStrategy?: "child" | "parent";
|
|
229
|
+
/** 是否显示完整路径。 */
|
|
230
|
+
showAllLevels?: boolean;
|
|
231
|
+
/** 搜索建议面板是否匹配输入框宽度,或使用固定像素宽度。 */
|
|
232
|
+
fitInputWidth?: boolean | number;
|
|
233
|
+
/** 受控值,兼容单选路径和多选路径数组。 */
|
|
234
|
+
value?: CascaderValue;
|
|
235
|
+
}
|
|
236
|
+
/** Cascader 对外暴露的选项类型。 */
|
|
237
|
+
type CascaderOption = DefaultOptionType$1;
|
|
238
|
+
/** 单选路径或多选路径值。 */
|
|
239
|
+
type CascaderValue = Array<string | number | null> | Array<Array<string | number | null>>;
|
|
240
|
+
/** 独立 CascaderPanel 属性。 */
|
|
241
|
+
interface CascaderPanelProps extends Omit<CascaderPanelProps$1<DefaultOptionType$1>, "optionRender"> {
|
|
242
|
+
/** 自定义节点内容。 */
|
|
243
|
+
optionContent?: (context: CascaderOptionContentContext) => ReactNode;
|
|
244
|
+
}
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region packages/components/src/cascader/src/cascader.d.ts
|
|
125
247
|
/** Cascader 复用 Ant Design 级联选择行为,并覆盖输入框和下拉菜单视觉。 */
|
|
126
|
-
declare function Cascader({ className, loadingIcon, optionType, popupClassName, rootClassName, size, ...restProps }: CascaderProps): import("react").JSX.Element;
|
|
248
|
+
declare function Cascader({ allowClear, builtinPlacements, changeOnSelect, className, clearable, clearIcon, collapseTags, collapseTagsTooltip: _collapseTagsTooltip, displayRender, expandIcon, expandTrigger, fieldNames, filterable, fitInputWidth, footer, header, loadData, loadingIcon, maxCollapseTags, maxTagCount, multiple, options, optionContent, optionType, popupClassName, props: cascaderConfig, rootClassName, showAllLevels, showCheckedStrategy, showSearch, size, suggestionItem, suffixIcon, tag, tagRender, ...restProps }: CascaderProps): import("react").JSX.Element;
|
|
127
249
|
declare namespace Cascader {
|
|
128
250
|
var displayName: string;
|
|
129
251
|
}
|
|
252
|
+
/** 不包含输入框的独立级联面板。 */
|
|
253
|
+
declare function CascaderPanel({ optionContent, options, ...restProps }: CascaderPanelProps): import("react").JSX.Element;
|
|
254
|
+
declare namespace CascaderPanel {
|
|
255
|
+
var displayName: string;
|
|
256
|
+
}
|
|
130
257
|
//#endregion
|
|
131
|
-
//#region
|
|
258
|
+
//#region packages/components/src/checkbox/src/type.d.ts
|
|
132
259
|
/** Checkbox 在 UI KIT 中的尺寸。 */
|
|
133
|
-
type CheckboxSize = "default" | "small";
|
|
134
|
-
/** CheckboxGroup
|
|
135
|
-
type CheckboxGroupSize = CheckboxSize
|
|
260
|
+
type CheckboxSize = "large" | "default" | "small";
|
|
261
|
+
/** 兼容历史命名:CheckboxGroup 尺寸与 Checkbox 使用同一尺寸集合。 */
|
|
262
|
+
type CheckboxGroupSize = CheckboxSize;
|
|
136
263
|
/** CheckboxGroup 在 UI KIT 中的展示形态。 */
|
|
137
264
|
type CheckboxGroupVariant = "icon" | "border" | "button";
|
|
138
|
-
/**
|
|
139
|
-
|
|
265
|
+
/** Element Plus Checkbox 可选值类型。 */
|
|
266
|
+
type CheckboxValue = string | number | boolean;
|
|
267
|
+
/** CheckboxGroup options 快捷渲染值类型。 */
|
|
268
|
+
type CheckboxGroupValue = Exclude<CheckboxValue, boolean>;
|
|
269
|
+
/** CheckboxGroup options 渲染类型。 */
|
|
270
|
+
type CheckboxGroupType = "checkbox" | "button";
|
|
271
|
+
/** CheckboxGroup options 字段别名。 */
|
|
272
|
+
interface CheckboxOptionProps {
|
|
273
|
+
/** 选项值字段名。 */
|
|
274
|
+
value?: string;
|
|
275
|
+
/** 选项文案字段名。 */
|
|
276
|
+
label?: string;
|
|
277
|
+
/** 选项禁用字段名。 */
|
|
278
|
+
disabled?: string;
|
|
279
|
+
}
|
|
280
|
+
/** CheckboxGroup options 单项。 */
|
|
281
|
+
interface CheckboxOption extends Record<string, unknown> {
|
|
282
|
+
/** 选项值。 */
|
|
283
|
+
value?: CheckboxGroupValue;
|
|
284
|
+
/** 选项文案。 */
|
|
285
|
+
label?: ReactNode;
|
|
286
|
+
/** 是否禁用该选项。 */
|
|
287
|
+
disabled?: boolean;
|
|
288
|
+
}
|
|
289
|
+
/** 基于 Ant Design Checkbox 扩展的 Element Plus 风格 Checkbox 属性。 */
|
|
290
|
+
interface CheckboxProps extends Omit<CheckboxProps$1, "checked" | "value"> {
|
|
291
|
+
/** a11y 兼容字段。 */
|
|
292
|
+
ariaControls?: string;
|
|
293
|
+
/** a11y 兼容字段。 */
|
|
294
|
+
ariaLabel?: string;
|
|
140
295
|
/** 是否显示外层描边容器。 */
|
|
141
296
|
border?: boolean;
|
|
297
|
+
/** 是否选中,优先级高于 modelValue 推断。 */
|
|
298
|
+
checked?: boolean;
|
|
299
|
+
/** 未选中时对应的值。 */
|
|
300
|
+
falseLabel?: string | number;
|
|
301
|
+
/** 未选中时对应的值。 */
|
|
302
|
+
falseValue?: string | number;
|
|
303
|
+
/** Radio 同源兼容:在 group 内无 value 时 label 充当 value。 */
|
|
304
|
+
label?: CheckboxValue | ReactNode;
|
|
305
|
+
/** Element Plus 单项 modelValue。 */
|
|
306
|
+
modelValue?: CheckboxValue;
|
|
142
307
|
/** UI KIT 尺寸。 */
|
|
143
308
|
size?: CheckboxSize;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
309
|
+
/** input tabindex,后续在组件层映射到 React 的 tabIndex。 */
|
|
310
|
+
tabindex?: string | number;
|
|
311
|
+
/** 选中时对应的值。 */
|
|
312
|
+
trueLabel?: string | number;
|
|
313
|
+
/** 选中时对应的值。 */
|
|
314
|
+
trueValue?: string | number;
|
|
315
|
+
/** 当前项值。 */
|
|
316
|
+
value?: CheckboxValue;
|
|
317
|
+
/** 是否触发表单校验;当前 React 版本仅保留兼容字段。 */
|
|
318
|
+
validateEvent?: boolean;
|
|
319
|
+
}
|
|
320
|
+
/** 基于 Ant Design Checkbox.Group 扩展的 Element Plus 风格 CheckboxGroup 属性。 */
|
|
321
|
+
interface CheckboxGroupProps<T extends CheckboxGroupValue = CheckboxGroupValue> extends Omit<CheckboxGroupProps$1<T>, "options"> {
|
|
322
|
+
/** a11y 文案,React 侧会映射到 aria-label。 */
|
|
323
|
+
ariaLabel?: string;
|
|
324
|
+
/** 是否禁用整组。 */
|
|
325
|
+
disabled?: boolean;
|
|
326
|
+
/** button 选中态背景和边框色。 */
|
|
327
|
+
fill?: string;
|
|
328
|
+
/** a11y 兼容字段,Element Plus 已废弃,优先使用 ariaLabel。 */
|
|
329
|
+
label?: string;
|
|
330
|
+
/** 最大可选数量。 */
|
|
331
|
+
max?: number;
|
|
332
|
+
/** 最小可选数量。 */
|
|
333
|
+
min?: number;
|
|
334
|
+
/** native name 属性。 */
|
|
335
|
+
name?: string;
|
|
336
|
+
/** options 快捷渲染数据。 */
|
|
337
|
+
options?: CheckboxOption[];
|
|
338
|
+
/** options 字段别名。 */
|
|
339
|
+
props?: CheckboxOptionProps;
|
|
147
340
|
/** UI KIT 尺寸。 */
|
|
148
|
-
size?:
|
|
149
|
-
/**
|
|
341
|
+
size?: CheckboxSize;
|
|
342
|
+
/** 按钮选中态文字色。 */
|
|
343
|
+
textColor?: string;
|
|
344
|
+
/** options 渲染类型。 */
|
|
345
|
+
type?: CheckboxGroupType;
|
|
346
|
+
/** 是否触发表单校验;当前 React 版本仅保留兼容字段。 */
|
|
347
|
+
validateEvent?: boolean;
|
|
348
|
+
/** CheckboxGroup 展示形态。 */
|
|
150
349
|
variant?: CheckboxGroupVariant;
|
|
151
350
|
}
|
|
152
351
|
//#endregion
|
|
153
|
-
//#region
|
|
154
|
-
/** Checkbox 基于 Ant Design 复选框行为,补齐
|
|
155
|
-
declare function Checkbox({ border, className, size, ...restProps }: CheckboxProps): import("react").JSX.Element;
|
|
352
|
+
//#region packages/components/src/checkbox/src/checkbox.d.ts
|
|
353
|
+
/** Checkbox 基于 Ant Design 复选框行为,补齐 Element Plus 风格尺寸和描边样式。 */
|
|
354
|
+
declare function Checkbox({ ariaControls, ariaLabel, border, checked, children, className, disabled, falseLabel, falseValue, indeterminate, label, modelValue, size, tabindex, trueLabel, trueValue, validateEvent: _validateEvent, value, ...restProps }: CheckboxProps): import("react").JSX.Element;
|
|
156
355
|
declare namespace Checkbox {
|
|
157
356
|
var displayName: string;
|
|
158
357
|
}
|
|
159
|
-
/**
|
|
160
|
-
declare function
|
|
358
|
+
/** CheckboxButton 使用 Checkbox 行为内核,并挂载独立类名供按钮式样式覆盖。 */
|
|
359
|
+
declare function CheckboxButton({ ariaControls, ariaLabel, checked, children, className, disabled, falseLabel, falseValue, indeterminate, label, modelValue, size, tabindex, trueLabel, trueValue, validateEvent: _validateEvent, value, ...restProps }: CheckboxProps): import("react").JSX.Element;
|
|
360
|
+
declare namespace CheckboxButton {
|
|
361
|
+
var displayName: string;
|
|
362
|
+
}
|
|
363
|
+
/** CheckboxGroup 保持 Ant Design 分组选中能力,并通过类名切换 Element Plus 组形态。 */
|
|
364
|
+
declare function CheckboxGroup<T extends CheckboxGroupValue = CheckboxGroupValue>({ ariaLabel, className, defaultValue, disabled, fill, label, max, min, onChange, options, props: optionProps, size, style, textColor, type, validateEvent: _validateEvent, value, variant, children, ...restProps }: CheckboxGroupProps<T>): import("react").JSX.Element;
|
|
161
365
|
declare namespace CheckboxGroup {
|
|
162
366
|
var displayName: string;
|
|
163
367
|
}
|
|
164
368
|
//#endregion
|
|
165
|
-
//#region
|
|
369
|
+
//#region packages/components/src/datetime-picker/src/type.d.ts
|
|
166
370
|
/** 基于 Ant Design DatePicker 扩展的 UI KIT DatePicker 属性。 */
|
|
167
371
|
interface DatePickerProps extends DatePickerProps$1 {}
|
|
168
372
|
/** 基于 Ant Design RangePicker 扩展的 UI KIT DateRangePicker 属性。 */
|
|
@@ -176,7 +380,7 @@ interface TimePickerProps extends TimePickerProps$1 {}
|
|
|
176
380
|
/** 基于 Ant Design TimePicker.RangePicker 扩展的 UI KIT TimeRangePicker 属性。 */
|
|
177
381
|
interface TimeRangePickerProps extends TimeRangePickerProps$1 {}
|
|
178
382
|
//#endregion
|
|
179
|
-
//#region
|
|
383
|
+
//#region packages/components/src/datetime-picker/src/datetimePicker.d.ts
|
|
180
384
|
/** DatePicker 复用 Ant Design 日期选择能力,并挂载 UI KIT 视觉类名。 */
|
|
181
385
|
declare function DatePicker({ className, popupClassName, rootClassName, ...restProps }: DatePickerProps): import("react").JSX.Element;
|
|
182
386
|
declare namespace DatePicker {
|
|
@@ -208,7 +412,99 @@ declare namespace TimeRangePicker {
|
|
|
208
412
|
var displayName: string;
|
|
209
413
|
}
|
|
210
414
|
//#endregion
|
|
211
|
-
//#region
|
|
415
|
+
//#region packages/components/src/dialog/src/type.d.ts
|
|
416
|
+
/** Element Plus before-close 的 React 化 done 回调。 */
|
|
417
|
+
type DialogDone = () => void;
|
|
418
|
+
/** Element Plus before-close 兼容签名,支持 done 回调、boolean 和 Promise。 */
|
|
419
|
+
type DialogBeforeClose = (done: DialogDone) => void | boolean | Promise<void | boolean>;
|
|
420
|
+
/** Dialog 挂载容器配置,对齐 Element Plus append-to / append-to-body 语义。 */
|
|
421
|
+
type DialogAppendTo = string | HTMLElement | false;
|
|
422
|
+
/** 基于 Ant Design Modal 扩展的 Element Plus 风格 Dialog 属性。 */
|
|
423
|
+
interface DialogProps extends Omit<ModalProps, "afterClose" | "afterOpenChange" | "cancelButtonProps" | "cancelText" | "centered" | "closable" | "confirmLoading" | "destroyOnClose" | "destroyOnHidden" | "footer" | "getContainer" | "keyboard" | "mask" | "maskClosable" | "onCancel" | "onOk" | "okButtonProps" | "okText" | "okType" | "open" | "scrollLock" | "title" | "width"> {
|
|
424
|
+
/** React 主路径打开态。 */
|
|
425
|
+
open?: boolean;
|
|
426
|
+
/** Element Plus v-model 兼容打开态。 */
|
|
427
|
+
modelValue?: boolean;
|
|
428
|
+
/** 标题内容。 */
|
|
429
|
+
title?: ReactNode;
|
|
430
|
+
/** Element Plus header slot 兼容入口,优先级高于 title。 */
|
|
431
|
+
header?: ReactNode;
|
|
432
|
+
/** Dialog 宽度,默认 50%。 */
|
|
433
|
+
width?: ModalProps["width"];
|
|
434
|
+
/** Dialog 距离顶部距离,默认 15vh。 */
|
|
435
|
+
top?: string;
|
|
436
|
+
/** 是否全屏展示。 */
|
|
437
|
+
fullscreen?: boolean;
|
|
438
|
+
/** 是否显示遮罩。 */
|
|
439
|
+
modal?: boolean;
|
|
440
|
+
/** Element Plus modal-class 兼容类名。 */
|
|
441
|
+
modalClass?: string;
|
|
442
|
+
/** 无遮罩时是否允许页面交互;modal=false 时原生满足该语义。 */
|
|
443
|
+
modalPenetrable?: boolean;
|
|
444
|
+
/** Element Plus append-to-body。 */
|
|
445
|
+
appendToBody?: boolean;
|
|
446
|
+
/** Element Plus append-to。 */
|
|
447
|
+
appendTo?: DialogAppendTo;
|
|
448
|
+
/** Ant Design 原生挂载容器。 */
|
|
449
|
+
getContainer?: ModalProps["getContainer"];
|
|
450
|
+
/** 是否锁定页面滚动。 */
|
|
451
|
+
lockScroll?: boolean;
|
|
452
|
+
/** 点击遮罩是否关闭。 */
|
|
453
|
+
closeOnClickModal?: boolean;
|
|
454
|
+
/** 按 Esc 是否关闭。 */
|
|
455
|
+
closeOnPressEscape?: boolean;
|
|
456
|
+
/** 是否显示关闭按钮。 */
|
|
457
|
+
showClose?: boolean;
|
|
458
|
+
/** 标题和底部是否水平居中。 */
|
|
459
|
+
center?: boolean;
|
|
460
|
+
/** 弹窗是否垂直居中。 */
|
|
461
|
+
alignCenter?: boolean;
|
|
462
|
+
/** 关闭时销毁内容。 */
|
|
463
|
+
destroyOnClose?: boolean;
|
|
464
|
+
/** Dialog footer,未传时默认无 footer。 */
|
|
465
|
+
footer?: ModalProps["footer"];
|
|
466
|
+
/** 关闭前拦截。 */
|
|
467
|
+
beforeClose?: DialogBeforeClose;
|
|
468
|
+
/** 打开时触发,对应 Element Plus open。 */
|
|
469
|
+
onOpen?: () => void;
|
|
470
|
+
/** 打开动画结束后触发,对应 Element Plus opened。 */
|
|
471
|
+
onOpened?: () => void;
|
|
472
|
+
/** 关闭请求触发,对应 Element Plus close。 */
|
|
473
|
+
onClose?: () => void;
|
|
474
|
+
/** 关闭动画结束后触发,对应 Element Plus closed。 */
|
|
475
|
+
onClosed?: () => void;
|
|
476
|
+
/** React 受控状态变化。 */
|
|
477
|
+
onOpenChange?: (open: boolean) => void;
|
|
478
|
+
/** Ant Design 兼容取消事件。 */
|
|
479
|
+
onCancel?: ModalProps["onCancel"];
|
|
480
|
+
/** Ant Design 兼容动画结束事件。 */
|
|
481
|
+
afterOpenChange?: ModalProps["afterOpenChange"];
|
|
482
|
+
/** Ant Design 兼容关闭后事件。 */
|
|
483
|
+
afterClose?: ModalProps["afterClose"];
|
|
484
|
+
/** Ant Design 兼容垂直居中字段。 */
|
|
485
|
+
centered?: ModalProps["centered"];
|
|
486
|
+
/** Ant Design 兼容关闭按钮字段。 */
|
|
487
|
+
closable?: ModalProps["closable"];
|
|
488
|
+
/** Ant Design 兼容遮罩字段。 */
|
|
489
|
+
mask?: ModalProps["mask"];
|
|
490
|
+
/** Ant Design 兼容点击遮罩关闭字段。 */
|
|
491
|
+
maskClosable?: ModalProps["maskClosable"];
|
|
492
|
+
/** Ant Design 兼容 Esc 关闭字段。 */
|
|
493
|
+
keyboard?: ModalProps["keyboard"];
|
|
494
|
+
/** Ant Design 兼容锁定滚动字段。 */
|
|
495
|
+
scrollLock?: ModalProps["scrollLock"];
|
|
496
|
+
/** Ant Design v6 兼容关闭后销毁字段。 */
|
|
497
|
+
destroyOnHidden?: ModalProps["destroyOnHidden"];
|
|
498
|
+
}
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region packages/components/src/dialog/src/dialog.d.ts
|
|
501
|
+
/** Dialog 使用 Ant Design Modal 承接弹层行为,用本包样式对齐 Element Plus 视觉。 */
|
|
502
|
+
declare function Dialog({ afterClose, afterOpenChange, alignCenter, appendTo, appendToBody, beforeClose, center, children, className, closable, closeOnClickModal, closeOnPressEscape, destroyOnClose, destroyOnHidden, footer, fullscreen, getContainer, header, keyboard, lockScroll, mask, maskClosable, modal, modalClass, modalPenetrable: _modalPenetrable, modelValue, onCancel, onClose, onClosed, onOpen, onOpened, onOpenChange, open, rootClassName, scrollLock, showClose, style, title, top, width, wrapClassName, ...restProps }: DialogProps): import("react").JSX.Element;
|
|
503
|
+
declare namespace Dialog {
|
|
504
|
+
var displayName: string;
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region packages/components/src/divider/src/type.d.ts
|
|
212
508
|
/** UI KIT 中 Divider 的线条明暗类型。 */
|
|
213
509
|
type DividerTone = "dark" | "light";
|
|
214
510
|
/** 基于 Ant Design Divider 扩展的 UI KIT Divider 属性。 */
|
|
@@ -217,14 +513,14 @@ interface DividerProps extends DividerProps$1 {
|
|
|
217
513
|
tone?: DividerTone;
|
|
218
514
|
}
|
|
219
515
|
//#endregion
|
|
220
|
-
//#region
|
|
516
|
+
//#region packages/components/src/divider/src/divider.d.ts
|
|
221
517
|
/** Divider 复用 Ant Design 的内容分割能力,并按 UI KIT 线条色覆盖视觉。 */
|
|
222
518
|
declare function Divider({ className, tone, ...restProps }: DividerProps): import("react").JSX.Element;
|
|
223
519
|
declare namespace Divider {
|
|
224
520
|
var displayName: string;
|
|
225
521
|
}
|
|
226
522
|
//#endregion
|
|
227
|
-
//#region
|
|
523
|
+
//#region packages/components/src/dropdown/src/type.d.ts
|
|
228
524
|
/** 基于 Ant Design Dropdown 扩展的 UI KIT Dropdown 属性。 */
|
|
229
525
|
interface DropdownProps extends DropdownProps$1 {}
|
|
230
526
|
/** 基于 Ant Design Dropdown.Button 扩展的 UI KIT DropdownButton 属性。 */
|
|
@@ -232,7 +528,7 @@ interface DropdownButtonProps extends DropdownButtonProps$1 {}
|
|
|
232
528
|
/** Dropdown 对外暴露的菜单项类型。 */
|
|
233
529
|
type DropdownMenuItem = NonNullable<MenuProps$1["items"]>[number];
|
|
234
530
|
//#endregion
|
|
235
|
-
//#region
|
|
531
|
+
//#region packages/components/src/dropdown/src/dropdown.d.ts
|
|
236
532
|
/** Dropdown 复用 Ant Design 下拉菜单能力,并覆盖菜单弹层视觉。 */
|
|
237
533
|
declare function InternalDropdown({ align, arrow, children, className, menu, overlayClassName, placement, rootClassName, trigger, ...restProps }: DropdownProps): import("react").JSX.Element;
|
|
238
534
|
/** Dropdown.Button 复用 Ant Design 组合按钮能力,并对齐弹层类名。 */
|
|
@@ -245,11 +541,11 @@ declare const Dropdown: typeof InternalDropdown & {
|
|
|
245
541
|
Button: typeof DropdownButton;
|
|
246
542
|
};
|
|
247
543
|
//#endregion
|
|
248
|
-
//#region
|
|
544
|
+
//#region packages/components/src/empty/src/type.d.ts
|
|
249
545
|
/** 基于 Ant Design Empty 扩展的 UI KIT Empty 属性。 */
|
|
250
546
|
interface EmptyProps extends EmptyProps$1 {}
|
|
251
547
|
//#endregion
|
|
252
|
-
//#region
|
|
548
|
+
//#region packages/components/src/empty/src/empty.d.ts
|
|
253
549
|
/** Empty 复用 Ant Design 空状态插图和描述能力,补充 UI KIT 类名。 */
|
|
254
550
|
declare function InternalEmpty({ className, ...restProps }: EmptyProps): import("react").JSX.Element;
|
|
255
551
|
/** 保留 Ant Design Empty 的内置图片静态属性。 */
|
|
@@ -259,13 +555,13 @@ declare const Empty: typeof InternalEmpty & {
|
|
|
259
555
|
PRESENTED_IMAGE_SIMPLE: import("react").ReactNode;
|
|
260
556
|
};
|
|
261
557
|
//#endregion
|
|
262
|
-
//#region
|
|
558
|
+
//#region packages/components/src/form/src/type.d.ts
|
|
263
559
|
/** 基于 Ant Design Form 扩展的 UI KIT Form 属性。 */
|
|
264
560
|
interface FormProps<Values = unknown> extends FormProps$1<Values> {}
|
|
265
561
|
/** 基于 Ant Design Form.Item 扩展的 UI KIT FormItem 属性。 */
|
|
266
562
|
interface FormItemProps<Values = unknown> extends FormItemProps$1<Values> {}
|
|
267
563
|
//#endregion
|
|
268
|
-
//#region
|
|
564
|
+
//#region packages/components/src/form/src/form.d.ts
|
|
269
565
|
/** Form 复用 Ant Design 表单能力,并覆盖标签、提示和校验视觉。 */
|
|
270
566
|
declare function InternalForm<Values = unknown>({ className, layout, rootClassName, variant, ...restProps }: FormProps<Values>): import("react").JSX.Element;
|
|
271
567
|
/** Form.Item 复用 Ant Design 字段绑定和校验能力。 */
|
|
@@ -287,7 +583,7 @@ declare const Form: typeof InternalForm & {
|
|
|
287
583
|
useWatch: typeof import("antd/es/form/Form").useWatch;
|
|
288
584
|
};
|
|
289
585
|
//#endregion
|
|
290
|
-
//#region
|
|
586
|
+
//#region packages/components/src/header/src/type.d.ts
|
|
291
587
|
/** Header 顶部一级导航项。 */
|
|
292
588
|
interface HeaderNavItem {
|
|
293
589
|
disabled?: boolean;
|
|
@@ -306,18 +602,18 @@ interface HeaderProps extends Omit<HTMLAttributes<HTMLElement>, "onSelect"> {
|
|
|
306
602
|
userName?: ReactNode;
|
|
307
603
|
}
|
|
308
604
|
//#endregion
|
|
309
|
-
//#region
|
|
605
|
+
//#region packages/components/src/header/src/header.d.ts
|
|
310
606
|
/** Header 对齐管理后台 UI KIT 顶部一级导航。 */
|
|
311
607
|
declare function Header({ activeKey, brand, className, items, logo, onNavClick, rightExtra, userName, ...restProps }: HeaderProps): import("react").JSX.Element;
|
|
312
608
|
declare namespace Header {
|
|
313
609
|
var displayName: string;
|
|
314
610
|
}
|
|
315
611
|
//#endregion
|
|
316
|
-
//#region
|
|
612
|
+
//#region packages/components/src/header/src/items.d.ts
|
|
317
613
|
/** Figma 头部菜单默认一级导航。 */
|
|
318
614
|
declare const headerNavItems: HeaderNavItem[];
|
|
319
615
|
//#endregion
|
|
320
|
-
//#region
|
|
616
|
+
//#region packages/components/src/icon/src/icons.d.ts
|
|
321
617
|
declare const icons: {
|
|
322
618
|
readonly arrow: "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.2189 2.47709C7.61924 1.97631 8.38076 1.97631 8.78109 2.47709L14.4957 9.62559C15.0191 10.2804 14.5529 11.25 13.7146 11.25H2.28543C1.44709 11.25 0.980871 10.2804 1.50434 9.62559L7.2189 2.47709Z\" fill=\"currentColor\"/></svg>";
|
|
323
619
|
readonly boat: "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_7055_707)\"><path d=\"M14.3803 8.9882L13.1772 10.449L13.6499 10.492C13.6499 10.492 12.1031 11.738 10.7282 11.8239C9.3533 11.9099 8.70882 10.0623 8.70882 10.0623V7.01179H10.5563V6.10951H8.79475V4.90648C9.56813 4.64869 10.0837 3.91827 10.0837 3.05896C10.0837 1.98483 9.22441 1.12552 8.15027 1.12552H8.1073C7.03317 1.12552 6.17386 1.98483 6.17386 3.05896C6.17386 3.91827 6.73241 4.64869 7.46282 4.90648V6.10951H5.70124V7.01179H7.54875V10.0623C7.54875 10.0623 6.86131 11.8669 5.48641 11.8239C4.11152 11.738 2.56476 10.492 2.56476 10.492L3.03738 10.449L1.79138 8.9882L1.36172 10.7927L1.87731 10.6639C1.87731 10.6639 2.90848 12.5114 4.4982 13.1988C6.08793 13.9292 7.67765 14.8315 8.02137 14.8745C8.3651 14.8315 9.95482 13.9292 11.5016 13.1988C13.0483 12.4684 14.1225 10.6639 14.1225 10.6639L14.6381 10.7927L14.3803 8.9882ZM8.15027 4.1331C7.54875 4.1331 7.07613 3.66048 7.07613 3.05896C7.07613 2.50041 7.54875 2.02779 8.1073 2.02779H8.15027C8.70882 2.02779 9.18144 2.50041 9.18144 3.05896C9.22441 3.66048 8.70882 4.1331 8.15027 4.1331Z\" fill=\"currentColor\"/></g><defs><clipPath id=\"clip0_7055_707\"><rect width=\"16\" height=\"16\" fill=\"white\"/></clipPath></defs></svg>";
|
|
@@ -368,7 +664,7 @@ declare const icons: {
|
|
|
368
664
|
type IconName = keyof typeof icons;
|
|
369
665
|
declare const iconNames: IconName[];
|
|
370
666
|
//#endregion
|
|
371
|
-
//#region
|
|
667
|
+
//#region packages/components/src/icon/src/type.d.ts
|
|
372
668
|
/** Icon 组件属性,name 只允许使用内置英文图标名。 */
|
|
373
669
|
interface IconProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children" | "dangerouslySetInnerHTML"> {
|
|
374
670
|
color?: CSSProperties["color"];
|
|
@@ -377,64 +673,265 @@ interface IconProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children" | "
|
|
|
377
673
|
title?: string;
|
|
378
674
|
}
|
|
379
675
|
//#endregion
|
|
380
|
-
//#region
|
|
676
|
+
//#region packages/components/src/icon/src/icon.d.ts
|
|
381
677
|
/** Icon 渲染项目内置 SVG,颜色默认跟随 currentColor。 */
|
|
382
678
|
declare function Icon({ className, color, name, size, style, title, ...restProps }: IconProps): import("react").JSX.Element;
|
|
383
679
|
//#endregion
|
|
384
|
-
//#region
|
|
385
|
-
/**
|
|
386
|
-
|
|
680
|
+
//#region packages/components/src/image/src/type.d.ts
|
|
681
|
+
/** Element Plus Image 支持的图片填充模式。 */
|
|
682
|
+
type ImageFit = "fill" | "contain" | "cover" | "none" | "scale-down";
|
|
683
|
+
/** Image 对外暴露的实例方法。 */
|
|
684
|
+
interface ImageRef {
|
|
685
|
+
/** 打开图片预览。 */
|
|
686
|
+
showPreview: () => void;
|
|
687
|
+
}
|
|
688
|
+
/** ImageViewer 对外暴露的实例方法。 */
|
|
689
|
+
interface ImageViewerRef {
|
|
690
|
+
/** 手动切换预览图片。 */
|
|
691
|
+
setActiveItem: (index: number) => void;
|
|
692
|
+
}
|
|
693
|
+
/** ImageViewer 工具栏动作类型,对应 Element Plus ImageViewerAction。 */
|
|
694
|
+
type ImageViewerAction = "zoomIn" | "zoomOut" | "clockwise" | "anticlockwise";
|
|
695
|
+
/** ImageViewer 工具栏动作参数。 */
|
|
696
|
+
interface ImageViewerActionOptions {
|
|
697
|
+
enableTransition?: boolean;
|
|
698
|
+
rotateDeg?: number;
|
|
699
|
+
zoomRate?: number;
|
|
700
|
+
}
|
|
701
|
+
/** ImageViewer 进度插槽上下文。 */
|
|
702
|
+
interface ImageViewerProgressContext {
|
|
703
|
+
activeIndex: number;
|
|
704
|
+
total: number;
|
|
705
|
+
}
|
|
706
|
+
/** ImageViewer 图片加载失败插槽上下文。 */
|
|
707
|
+
interface ImageViewerErrorContext {
|
|
708
|
+
activeIndex: number;
|
|
709
|
+
src: string;
|
|
710
|
+
}
|
|
711
|
+
/** ImageViewer 工具栏插槽上下文。 */
|
|
712
|
+
interface ImageViewerToolbarContext extends ImageViewerProgressContext {
|
|
713
|
+
actions: (action: ImageViewerAction, options?: ImageViewerActionOptions) => void;
|
|
714
|
+
next: () => void;
|
|
715
|
+
prev: () => void;
|
|
716
|
+
reset: () => void;
|
|
717
|
+
setActiveItem: (index: number) => void;
|
|
718
|
+
}
|
|
719
|
+
/** Vue slot 在 React 中对应为节点或带上下文的 render prop。 */
|
|
720
|
+
type ImageViewerSlot<Context> = ReactNode | ((context: Context) => ReactNode);
|
|
721
|
+
/** 独立 ImageViewer 属性,对齐 Element Plus Image Viewer API 的 React 写法。 */
|
|
722
|
+
interface ImageViewerProps {
|
|
723
|
+
/** 预览图片列表,对应 Element Plus url-list。 */
|
|
724
|
+
urlList?: string[];
|
|
725
|
+
/** 图片 alt。 */
|
|
726
|
+
alt?: string;
|
|
727
|
+
/** 预览层级。 */
|
|
728
|
+
zIndex?: number;
|
|
729
|
+
/** 初始预览下标。 */
|
|
730
|
+
initialIndex?: number;
|
|
731
|
+
/** 是否循环切换预览。 */
|
|
732
|
+
infinite?: boolean;
|
|
733
|
+
/** 是否点击遮罩关闭预览。 */
|
|
734
|
+
hideOnClickModal?: boolean;
|
|
735
|
+
/** 是否将预览层传送到 body。 */
|
|
736
|
+
teleported?: boolean;
|
|
737
|
+
/** 缩放倍率。 */
|
|
738
|
+
zoomRate?: number;
|
|
739
|
+
/** 初始缩放。 */
|
|
740
|
+
scale?: number;
|
|
741
|
+
/** 最小缩放。 */
|
|
742
|
+
minScale?: number;
|
|
743
|
+
/** 最大缩放。 */
|
|
744
|
+
maxScale?: number;
|
|
745
|
+
/** 是否允许按 Esc 关闭预览。 */
|
|
746
|
+
closeOnPressEscape?: boolean;
|
|
747
|
+
/** 是否展示预览进度。 */
|
|
748
|
+
showProgress?: boolean;
|
|
749
|
+
/** 自定义进度内容,对应 progress slot。 */
|
|
750
|
+
progress?: ImageViewerSlot<ImageViewerProgressContext>;
|
|
751
|
+
/** 自定义工具栏内容,对应 toolbar slot。 */
|
|
752
|
+
toolbar?: ImageViewerSlot<ImageViewerToolbarContext>;
|
|
753
|
+
/** 自定义预览图片加载失败内容,对应 viewer-error slot。 */
|
|
754
|
+
viewerError?: ImageViewerSlot<ImageViewerErrorContext>;
|
|
755
|
+
/** 关闭事件。 */
|
|
756
|
+
onClose?: () => void;
|
|
757
|
+
/** 预览图片加载失败事件。 */
|
|
758
|
+
onError?: ImgHTMLAttributes<HTMLImageElement>["onError"];
|
|
759
|
+
/** 图片切换事件。 */
|
|
760
|
+
onSwitch?: (index: number) => void;
|
|
761
|
+
/** 旋转事件。 */
|
|
762
|
+
onRotate?: (degree: number) => void;
|
|
763
|
+
}
|
|
764
|
+
/** React 化后的 Element Plus Image 扩展属性。 */
|
|
765
|
+
interface ElementImageProps {
|
|
766
|
+
/** 图片宽度。 */
|
|
767
|
+
width?: CSSProperties["width"];
|
|
768
|
+
/** 图片高度。 */
|
|
769
|
+
height?: CSSProperties["height"];
|
|
770
|
+
/** 图片填充模式,对应 Element Plus fit。 */
|
|
771
|
+
fit?: ImageFit;
|
|
772
|
+
/** 是否使用原生 lazy loading。 */
|
|
773
|
+
lazy?: boolean;
|
|
774
|
+
/** 原生图片 loading 属性。 */
|
|
775
|
+
loading?: ImgHTMLAttributes<HTMLImageElement>["loading"];
|
|
776
|
+
/** Element Plus 历史 lazy 容器参数,第一阶段只接收不主动监听。 */
|
|
777
|
+
scrollContainer?: string | HTMLElement;
|
|
778
|
+
/** 预览图片列表,对应 Element Plus preview-src-list。 */
|
|
779
|
+
previewSrcList?: string[];
|
|
780
|
+
/** 初始预览下标。 */
|
|
781
|
+
initialIndex?: number;
|
|
782
|
+
/** 是否将预览层传送到 body。 */
|
|
783
|
+
previewTeleported?: boolean;
|
|
784
|
+
/** 预览层级。 */
|
|
785
|
+
zIndex?: number;
|
|
786
|
+
/** 是否允许按 Esc 关闭预览。 */
|
|
787
|
+
closeOnPressEscape?: boolean;
|
|
788
|
+
/** 是否点击遮罩关闭预览。 */
|
|
789
|
+
hideOnClickModal?: boolean;
|
|
790
|
+
/** 是否循环切换预览。 */
|
|
791
|
+
infinite?: boolean;
|
|
792
|
+
/** 缩放倍率,阶段一保留类型入口。 */
|
|
793
|
+
zoomRate?: number;
|
|
794
|
+
/** 初始缩放,阶段一保留类型入口。 */
|
|
795
|
+
scale?: number;
|
|
796
|
+
/** 最小缩放,阶段一保留类型入口。 */
|
|
797
|
+
minScale?: number;
|
|
798
|
+
/** 最大缩放,阶段一保留类型入口。 */
|
|
799
|
+
maxScale?: number;
|
|
800
|
+
/** 是否展示预览进度。 */
|
|
801
|
+
showProgress?: boolean;
|
|
802
|
+
/** 自定义预览进度内容,对应 progress slot。 */
|
|
803
|
+
progress?: ImageViewerSlot<ImageViewerProgressContext>;
|
|
804
|
+
/** 自定义预览工具栏内容,对应 toolbar slot。 */
|
|
805
|
+
toolbar?: ImageViewerSlot<ImageViewerToolbarContext>;
|
|
806
|
+
/** 自定义预览图片加载失败内容,对应 viewer-error slot。 */
|
|
807
|
+
viewerError?: ImageViewerSlot<ImageViewerErrorContext>;
|
|
808
|
+
/** 占位内容,对应 placeholder slot。 */
|
|
809
|
+
placeholder?: ReactNode;
|
|
810
|
+
/** 错误内容,对应 error slot。 */
|
|
811
|
+
error?: ReactNode;
|
|
812
|
+
/** 是否开启预览,兼容 Ant Design 历史 preview 配置。 */
|
|
813
|
+
preview?: boolean | ImagePreviewType;
|
|
814
|
+
/** 预览打开事件。 */
|
|
815
|
+
onShow?: () => void;
|
|
816
|
+
/** 预览关闭事件。 */
|
|
817
|
+
onClose?: () => void;
|
|
818
|
+
/** 预览切换事件。 */
|
|
819
|
+
onSwitch?: (index: number) => void;
|
|
820
|
+
/** 预览旋转事件,React 侧透传给内置 ImageViewer。 */
|
|
821
|
+
onRotate?: (degree: number) => void;
|
|
822
|
+
}
|
|
823
|
+
/** Element Plus 风格 Image 属性。 */
|
|
824
|
+
interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "crossOrigin" | "height" | "loading" | "onError" | "onLoad" | "placeholder" | "referrerPolicy" | "src" | "width">, ElementImageProps {
|
|
825
|
+
/** 图片地址。 */
|
|
826
|
+
src?: string;
|
|
827
|
+
/** 原生 alt。 */
|
|
828
|
+
alt?: string;
|
|
829
|
+
/** 原生 referrerPolicy。 */
|
|
830
|
+
referrerPolicy?: ImgHTMLAttributes<HTMLImageElement>["referrerPolicy"];
|
|
831
|
+
/** 原生 crossOrigin。 */
|
|
832
|
+
crossOrigin?: ImgHTMLAttributes<HTMLImageElement>["crossOrigin"];
|
|
833
|
+
/** 加载成功事件。 */
|
|
834
|
+
onLoad?: ImgHTMLAttributes<HTMLImageElement>["onLoad"];
|
|
835
|
+
/** 加载失败事件。 */
|
|
836
|
+
onError?: ImgHTMLAttributes<HTMLImageElement>["onError"];
|
|
837
|
+
}
|
|
387
838
|
/** 基于 Ant Design Image.PreviewGroup 扩展的 UI KIT PreviewGroup 属性。 */
|
|
388
|
-
interface ImagePreviewGroupProps extends PreviewGroupProps {
|
|
839
|
+
interface ImagePreviewGroupProps extends PreviewGroupProps {
|
|
840
|
+
/** 预览组根节点类名。 */
|
|
841
|
+
className?: string;
|
|
842
|
+
}
|
|
389
843
|
//#endregion
|
|
390
|
-
//#region
|
|
391
|
-
/** Image
|
|
392
|
-
declare
|
|
844
|
+
//#region packages/components/src/image/src/image.d.ts
|
|
845
|
+
/** 独立 ImageViewer,对齐 Element Plus Image Viewer 的基础 API 和默认工具栏。 */
|
|
846
|
+
declare const ImageViewer: import("react").ForwardRefExoticComponent<ImageViewerProps & import("react").RefAttributes<ImageViewerRef>>;
|
|
393
847
|
/** Image.PreviewGroup 复用 Ant Design 多图预览能力。 */
|
|
394
|
-
declare function PreviewGroup({ children, ...restProps }: ImagePreviewGroupProps): import("react").JSX.Element;
|
|
848
|
+
declare function PreviewGroup({ children, className, ...restProps }: ImagePreviewGroupProps): import("react").JSX.Element;
|
|
395
849
|
declare namespace PreviewGroup {
|
|
396
850
|
var displayName: string;
|
|
397
851
|
}
|
|
398
852
|
/** 挂载 PreviewGroup,保持调用方式接近 Ant Design Image。 */
|
|
399
|
-
declare const Image:
|
|
853
|
+
declare const Image: import("react").ForwardRefExoticComponent<ImageProps & import("react").RefAttributes<ImageRef>> & {
|
|
400
854
|
PreviewGroup: typeof PreviewGroup;
|
|
401
855
|
};
|
|
402
856
|
//#endregion
|
|
403
|
-
//#region
|
|
404
|
-
/** Input
|
|
857
|
+
//#region packages/components/src/input/src/type.d.ts
|
|
858
|
+
/** Input 尺寸对齐 Element Plus 的 large/default/small,并兼容 Ant Design middle。 */
|
|
405
859
|
type InputSize = NonNullable<InputProps$1["size"]>;
|
|
406
|
-
/**
|
|
407
|
-
|
|
408
|
-
|
|
860
|
+
/** Element Plus Input 支持的常用原生输入类型。 */
|
|
861
|
+
type InputType = "text" | "textarea" | "number" | "password" | "email" | "search" | "tel" | "url" | (string & {});
|
|
862
|
+
/** Element Plus autosize 语义,映射到 Ant Design TextArea autoSize。 */
|
|
863
|
+
type InputAutoSize = TextAreaProps$1["autoSize"];
|
|
864
|
+
/** Element Plus textarea resize 语义。 */
|
|
865
|
+
type InputResize = "none" | "both" | "horizontal" | "vertical";
|
|
866
|
+
/** React 化后的 Element Plus Input 扩展属性。 */
|
|
867
|
+
interface ElementInputProps {
|
|
868
|
+
/** 兼容 Element Plus modelValue;React 中优先推荐 value/defaultValue。 */
|
|
869
|
+
modelValue?: string | number | null;
|
|
870
|
+
/** 兼容 Element Plus update:modelValue。 */
|
|
871
|
+
onUpdateModelValue?: (value: string) => void;
|
|
872
|
+
/** 是否展示清空图标,对应 Element Plus clearable。 */
|
|
873
|
+
clearable?: boolean;
|
|
874
|
+
/** 自定义清空图标,对应 Element Plus clearIcon。 */
|
|
875
|
+
clearIcon?: ReactNode;
|
|
876
|
+
/** 是否展示密码显隐切换,对应 Element Plus show-password。 */
|
|
877
|
+
showPassword?: boolean;
|
|
878
|
+
/** 是否展示字数统计,对应 Element Plus show-word-limit。 */
|
|
879
|
+
showWordLimit?: boolean;
|
|
880
|
+
/** 字数统计位置。outside 暂只保留类型,不承诺与 Element Plus 1:1。 */
|
|
881
|
+
wordLimitPosition?: "inside" | "outside";
|
|
882
|
+
/** 后置图标,对应 Element Plus suffix-icon。 */
|
|
883
|
+
suffixIcon?: ReactNode;
|
|
884
|
+
/** 前置图标,对应 Element Plus prefix-icon。 */
|
|
885
|
+
prefixIcon?: ReactNode;
|
|
886
|
+
/** textarea 自适应高度,对应 Element Plus autosize。 */
|
|
887
|
+
autosize?: InputAutoSize;
|
|
888
|
+
/** textarea resize 行为。 */
|
|
889
|
+
resize?: InputResize;
|
|
890
|
+
/** textarea 行数,仅 type="textarea" 时生效。 */
|
|
891
|
+
rows?: number;
|
|
892
|
+
/** Element Plus formatter;第一阶段只兼容类型,不承诺显示转换。 */
|
|
893
|
+
formatter?: (value: string) => string;
|
|
894
|
+
/** Element Plus parser;第一阶段只兼容类型,不承诺显示转换。 */
|
|
895
|
+
parser?: (value: string) => string;
|
|
896
|
+
/** Element Plus inputStyle;第一阶段只兼容类型,不承诺精准作用到内部原生节点。 */
|
|
897
|
+
inputStyle?: CSSProperties;
|
|
898
|
+
/** 是否触发表单校验。React/AntD 体系下暂仅兼容接收。 */
|
|
899
|
+
validateEvent?: boolean;
|
|
900
|
+
/** 旧 UI KIT 填充态兼容属性;迁移后不再改变 Element Plus 视觉目标。 */
|
|
409
901
|
filled?: boolean;
|
|
410
902
|
}
|
|
411
|
-
/**
|
|
412
|
-
|
|
413
|
-
/** 基于 Ant Design
|
|
414
|
-
interface
|
|
415
|
-
/**
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
903
|
+
/** 旧 UI KIT 填充态类型导出兼容。 */
|
|
904
|
+
type InputFilledProps = Pick<ElementInputProps, "filled">;
|
|
905
|
+
/** 基于 Ant Design Input 扩展的 Element Plus 风格 Input 属性。 */
|
|
906
|
+
interface InputProps extends Omit<InputProps$1, "type">, ElementInputProps {
|
|
907
|
+
/** 输入类型;为 textarea 时会使用 TextArea 内核。 */
|
|
908
|
+
type?: InputType;
|
|
909
|
+
}
|
|
910
|
+
/** 基于 Ant Design TextArea 扩展的 Element Plus 风格 TextArea 属性。 */
|
|
911
|
+
interface TextAreaProps extends TextAreaProps$1, ElementInputProps {}
|
|
912
|
+
/** 基于 Ant Design Password 扩展的 Element Plus 风格 Password 属性。 */
|
|
913
|
+
interface PasswordProps extends PasswordProps$1, ElementInputProps {}
|
|
914
|
+
/** 基于 Ant Design Search 扩展的 Element Plus 风格 Search 属性。 */
|
|
915
|
+
interface SearchProps extends SearchProps$1, ElementInputProps {
|
|
419
916
|
/** 搜索按钮加载图标,默认使用组件库统一 Loading SVG。 */
|
|
420
917
|
loadingIcon?: ReactNode;
|
|
421
918
|
}
|
|
422
919
|
/** Input.Group 直接透传 Ant Design 分组属性。 */
|
|
423
920
|
interface InputGroupProps extends GroupProps {}
|
|
424
921
|
//#endregion
|
|
425
|
-
//#region
|
|
426
|
-
/** TextArea 复用 Ant Design
|
|
427
|
-
declare function TextArea({ className, filled, rootClassName, variant, ...restProps }: TextAreaProps): import("react").JSX.Element;
|
|
922
|
+
//#region packages/components/src/input/src/input.d.ts
|
|
923
|
+
/** TextArea 复用 Ant Design 多行输入,并对齐 Element Plus type="textarea"。 */
|
|
924
|
+
declare function TextArea({ allowClear, autoSize, autosize, className, clearable, clearIcon, filled, formatter: _formatter, inputStyle: _inputStyle, modelValue, onChange, onUpdateModelValue, parser: _parser, resize, rootClassName, showCount, showWordLimit, size, validateEvent: _validateEvent, value, variant, wordLimitPosition, ...restProps }: TextAreaProps): import("react").JSX.Element;
|
|
428
925
|
declare namespace TextArea {
|
|
429
926
|
var displayName: string;
|
|
430
927
|
}
|
|
431
928
|
/** Password 复用 Ant Design 密码输入的显隐交互。 */
|
|
432
|
-
declare function Password({ className, filled, rootClassName, variant, ...restProps }: PasswordProps): import("react").JSX.Element;
|
|
929
|
+
declare function Password({ allowClear, className, clearable, clearIcon, filled, formatter: _formatter, iconRender, inputStyle: _inputStyle, modelValue, onChange, onUpdateModelValue, parser: _parser, prefix, prefixIcon, rootClassName, showCount, showWordLimit, size, suffix, suffixIcon, validateEvent: _validateEvent, value, variant, wordLimitPosition, ...restProps }: PasswordProps): import("react").JSX.Element;
|
|
433
930
|
declare namespace Password {
|
|
434
931
|
var displayName: string;
|
|
435
932
|
}
|
|
436
|
-
/** Search
|
|
437
|
-
declare function Search({ className, filled, loadingIcon, rootClassName, variant, ...restProps }: SearchProps): import("react").JSX.Element;
|
|
933
|
+
/** Search 保留 Ant Design 搜索输入的按钮和回车触发能力。 */
|
|
934
|
+
declare function Search({ className, filled, formatter: _formatter, inputStyle: _inputStyle, loadingIcon, modelValue, onChange, onUpdateModelValue, parser: _parser, rootClassName, size, validateEvent: _validateEvent, value, variant, ...restProps }: SearchProps): import("react").JSX.Element;
|
|
438
935
|
declare namespace Search {
|
|
439
936
|
var displayName: string;
|
|
440
937
|
}
|
|
@@ -446,7 +943,7 @@ declare const Input: import("react").ForwardRefExoticComponent<InputProps & impo
|
|
|
446
943
|
TextArea: typeof TextArea;
|
|
447
944
|
};
|
|
448
945
|
//#endregion
|
|
449
|
-
//#region
|
|
946
|
+
//#region packages/components/src/loading/src/type.d.ts
|
|
450
947
|
/** UI KIT Loading 的尺寸。 */
|
|
451
948
|
type LoadingSize = "small" | "default" | "large";
|
|
452
949
|
/** UI KIT Loading 的展示类型。 */
|
|
@@ -473,7 +970,7 @@ interface LoadingOverlayProps extends Omit<LoadingProps, "children"> {
|
|
|
473
970
|
mask?: LoadingMask;
|
|
474
971
|
}
|
|
475
972
|
//#endregion
|
|
476
|
-
//#region
|
|
973
|
+
//#region packages/components/src/loading/src/loading.d.ts
|
|
477
974
|
/** Loading 按 UI KIT 展示图标、文字和图标文字组合。 */
|
|
478
975
|
declare function InternalLoading({ children, className, size, spinning, style, text, type }: LoadingProps): import("react").JSX.Element | null;
|
|
479
976
|
/** Loading 遮罩用于整块区域加载状态,对应 Figma 深色和浅色遮罩。 */
|
|
@@ -482,13 +979,13 @@ declare const Loading: typeof InternalLoading & {
|
|
|
482
979
|
Overlay: typeof LoadingOverlay;
|
|
483
980
|
};
|
|
484
981
|
//#endregion
|
|
485
|
-
//#region
|
|
982
|
+
//#region packages/components/src/menu/src/type.d.ts
|
|
486
983
|
/** 基于 Ant Design Menu 扩展的 UI KIT Menu 属性。 */
|
|
487
984
|
interface MenuProps extends MenuProps$1 {}
|
|
488
985
|
/** Menu 对外暴露的菜单项类型。 */
|
|
489
986
|
type MenuItem = NonNullable<MenuProps$1["items"]>[number];
|
|
490
987
|
//#endregion
|
|
491
|
-
//#region
|
|
988
|
+
//#region packages/components/src/menu/src/menu.d.ts
|
|
492
989
|
/** 保留 Ant Design Menu 子组件兼容入口。 */
|
|
493
990
|
declare const Menu: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<AntdMenuRef>> & {
|
|
494
991
|
Divider: import("react").FC<import("antd/es/menu").MenuDividerProps>;
|
|
@@ -497,24 +994,24 @@ declare const Menu: import("react").ForwardRefExoticComponent<MenuProps & import
|
|
|
497
994
|
SubMenu: import("react").FC<import("antd").SubMenuProps>;
|
|
498
995
|
};
|
|
499
996
|
//#endregion
|
|
500
|
-
//#region
|
|
997
|
+
//#region packages/components/src/menu/src/items.d.ts
|
|
501
998
|
/** Figma 侧边导航默认菜单项。 */
|
|
502
999
|
declare const sideMenuItems: MenuItem[];
|
|
503
1000
|
//#endregion
|
|
504
|
-
//#region
|
|
1001
|
+
//#region packages/components/src/pagination/src/type.d.ts
|
|
505
1002
|
/** 基于 Ant Design Pagination 扩展的 UI KIT Pagination 属性。 */
|
|
506
1003
|
interface PaginationProps extends PaginationProps$1 {}
|
|
507
1004
|
/** Pagination 对外暴露的本地化文案类型。 */
|
|
508
1005
|
type PaginationLocale = NonNullable<PaginationProps$1["locale"]>;
|
|
509
1006
|
//#endregion
|
|
510
|
-
//#region
|
|
1007
|
+
//#region packages/components/src/pagination/src/pagination.d.ts
|
|
511
1008
|
/** Pagination 复用 Ant Design 分页行为,并覆盖页码、数量选择和快速跳转视觉。 */
|
|
512
1009
|
declare function Pagination({ className, locale, pageSizeOptions, rootClassName, showSizeChanger, ...restProps }: PaginationProps): import("react").JSX.Element;
|
|
513
1010
|
declare namespace Pagination {
|
|
514
1011
|
var displayName: string;
|
|
515
1012
|
}
|
|
516
1013
|
//#endregion
|
|
517
|
-
//#region
|
|
1014
|
+
//#region packages/components/src/progress/src/type.d.ts
|
|
518
1015
|
/** UI KIT Progress 的展示形态。 */
|
|
519
1016
|
type ProgressVariant = "bar" | "line";
|
|
520
1017
|
/** Progress 基础属性。 */
|
|
@@ -534,51 +1031,172 @@ interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">
|
|
|
534
1031
|
style?: CSSProperties;
|
|
535
1032
|
}
|
|
536
1033
|
//#endregion
|
|
537
|
-
//#region
|
|
1034
|
+
//#region packages/components/src/progress/src/progress.d.ts
|
|
538
1035
|
/** Progress 按 UI KIT 展示金额进度条和小型百分比进度条。 */
|
|
539
1036
|
declare function Progress({ amount, className, format, percent, progressVariant, showAmount, showInfo, style, ...restProps }: ProgressProps): import("react").JSX.Element;
|
|
540
1037
|
declare namespace Progress {
|
|
541
1038
|
var displayName: string;
|
|
542
1039
|
}
|
|
543
1040
|
//#endregion
|
|
544
|
-
//#region
|
|
1041
|
+
//#region packages/components/src/radio/src/type.d.ts
|
|
545
1042
|
/** Radio 在 UI KIT 中的尺寸。 */
|
|
546
1043
|
type RadioSize = "large" | "default" | "small";
|
|
547
1044
|
/** RadioGroup 在 UI KIT 中的展示形态。 */
|
|
548
1045
|
type RadioGroupVariant = "icon" | "border" | "button";
|
|
1046
|
+
/** Element Plus Radio 可选值类型。 */
|
|
1047
|
+
type RadioValue = string | number | boolean;
|
|
1048
|
+
/** RadioGroup options 快捷渲染类型。 */
|
|
1049
|
+
type RadioGroupType = "radio" | "button";
|
|
1050
|
+
/** RadioGroup options 字段别名。 */
|
|
1051
|
+
interface RadioOptionProps {
|
|
1052
|
+
/** 选项值字段名。 */
|
|
1053
|
+
value?: string;
|
|
1054
|
+
/** 选项文案字段名。 */
|
|
1055
|
+
label?: string;
|
|
1056
|
+
/** 选项禁用字段名。 */
|
|
1057
|
+
disabled?: string;
|
|
1058
|
+
}
|
|
1059
|
+
/** RadioGroup options 单项。 */
|
|
1060
|
+
interface RadioOption extends Record<string, unknown> {
|
|
1061
|
+
/** 选项值。 */
|
|
1062
|
+
value?: RadioValue;
|
|
1063
|
+
/** 选项文案。 */
|
|
1064
|
+
label?: ReactNode;
|
|
1065
|
+
/** 是否禁用该选项。 */
|
|
1066
|
+
disabled?: boolean;
|
|
1067
|
+
}
|
|
1068
|
+
/** 解析后的 Radio options 单项。 */
|
|
1069
|
+
interface ResolvedRadioOption {
|
|
1070
|
+
/** 是否禁用该选项。 */
|
|
1071
|
+
disabled: boolean;
|
|
1072
|
+
/** 选项文案。 */
|
|
1073
|
+
label: ReactNode;
|
|
1074
|
+
/** 选项值。 */
|
|
1075
|
+
value: RadioValue;
|
|
1076
|
+
}
|
|
1077
|
+
/** Radio 解析逻辑需要的最小输入,方便组件和测试复用。 */
|
|
1078
|
+
interface RadioResolveInput {
|
|
1079
|
+
/** 组件显式传入的类名。 */
|
|
1080
|
+
className?: string;
|
|
1081
|
+
/** 是否显示描边。 */
|
|
1082
|
+
border?: boolean;
|
|
1083
|
+
/** 是否禁用。 */
|
|
1084
|
+
disabled?: boolean;
|
|
1085
|
+
/** Radio 尺寸。 */
|
|
1086
|
+
size?: RadioSize;
|
|
1087
|
+
/** Radio 值。 */
|
|
1088
|
+
value?: RadioValue;
|
|
1089
|
+
/** Radio 文案兼历史 value fallback。 */
|
|
1090
|
+
label?: RadioValue;
|
|
1091
|
+
}
|
|
1092
|
+
/** RadioGroup 解析逻辑需要的最小输入。 */
|
|
1093
|
+
interface RadioGroupResolveInput {
|
|
1094
|
+
/** 组件显式传入的类名。 */
|
|
1095
|
+
className?: string;
|
|
1096
|
+
/** 是否禁用整组。 */
|
|
1097
|
+
disabled?: boolean;
|
|
1098
|
+
/** button 选中态背景和边框色。 */
|
|
1099
|
+
fill?: string;
|
|
1100
|
+
/** RadioGroup 尺寸。 */
|
|
1101
|
+
size?: RadioSize;
|
|
1102
|
+
/** button 选中态文字色。 */
|
|
1103
|
+
textColor?: string;
|
|
1104
|
+
/** options 渲染类型。 */
|
|
1105
|
+
type?: RadioGroupType;
|
|
1106
|
+
/** 兼容现有 UI KIT 的展示形态。 */
|
|
1107
|
+
variant?: RadioGroupVariant;
|
|
1108
|
+
}
|
|
1109
|
+
/** 解析后交给 Ant Design Radio 和 CSS 的配置。 */
|
|
1110
|
+
interface ResolvedRadioOptions {
|
|
1111
|
+
/** 最终是否显示描边。 */
|
|
1112
|
+
border: boolean;
|
|
1113
|
+
/** 组件需要挂载的类名。 */
|
|
1114
|
+
className: string;
|
|
1115
|
+
/** 最终是否禁用。 */
|
|
1116
|
+
disabled: boolean;
|
|
1117
|
+
/** 最终尺寸。 */
|
|
1118
|
+
size: RadioSize;
|
|
1119
|
+
/** 兼容 Element Plus label fallback 后的 value。 */
|
|
1120
|
+
value?: RadioValue;
|
|
1121
|
+
}
|
|
1122
|
+
/** 解析后交给 Ant Design Radio.Group 和 CSS 的配置。 */
|
|
1123
|
+
interface ResolvedRadioGroupOptions {
|
|
1124
|
+
/** Ant Design 按钮式 Radio 的样式。 */
|
|
1125
|
+
buttonStyle: NonNullable<RadioGroupProps$1["buttonStyle"]>;
|
|
1126
|
+
/** 组件需要挂载的类名。 */
|
|
1127
|
+
className: string;
|
|
1128
|
+
/** 运行时自定义 button 选中态变量。 */
|
|
1129
|
+
cssVariables: Record<string, string>;
|
|
1130
|
+
/** 最终是否禁用整组。 */
|
|
1131
|
+
disabled: boolean;
|
|
1132
|
+
/** Ant Design options 渲染类型。 */
|
|
1133
|
+
optionType: NonNullable<RadioGroupProps$1["optionType"]>;
|
|
1134
|
+
/** Ant Design 尺寸。 */
|
|
1135
|
+
antdSize: NonNullable<RadioGroupProps$1["size"]>;
|
|
1136
|
+
/** 最终尺寸。 */
|
|
1137
|
+
size: RadioSize;
|
|
1138
|
+
/** options 渲染类型。 */
|
|
1139
|
+
type: RadioGroupType;
|
|
1140
|
+
/** 最终展示形态。 */
|
|
1141
|
+
variant: RadioGroupVariant;
|
|
1142
|
+
}
|
|
549
1143
|
/** 基于 Ant Design Radio 扩展的 UI KIT Radio 属性。 */
|
|
550
|
-
interface RadioProps extends RadioProps$1 {
|
|
1144
|
+
interface RadioProps extends Omit<RadioProps$1, "value"> {
|
|
551
1145
|
/** 是否显示外层描边容器。 */
|
|
552
1146
|
border?: boolean;
|
|
1147
|
+
/** Radio 文案;无 value 时兼容 Element Plus 历史 fallback。 */
|
|
1148
|
+
label?: RadioValue;
|
|
553
1149
|
/** UI KIT 尺寸。 */
|
|
554
1150
|
size?: RadioSize;
|
|
1151
|
+
/** Radio 值。 */
|
|
1152
|
+
value?: RadioValue;
|
|
555
1153
|
}
|
|
556
1154
|
/** 基于 Ant Design Radio.Group 扩展的 UI KIT RadioGroup 属性。 */
|
|
557
|
-
interface RadioGroupProps extends Omit<RadioGroupProps$1, "size"> {
|
|
1155
|
+
interface RadioGroupProps extends Omit<RadioGroupProps$1, "options" | "size"> {
|
|
1156
|
+
/** a11y 文案,React 侧会映射到 aria-label。 */
|
|
1157
|
+
ariaLabel?: string;
|
|
1158
|
+
/** 是否禁用整组。 */
|
|
1159
|
+
disabled?: boolean;
|
|
1160
|
+
/** button 选中态背景和边框色。 */
|
|
1161
|
+
fill?: string;
|
|
1162
|
+
/** a11y 兼容字段,Element Plus 已废弃,优先使用 ariaLabel。 */
|
|
1163
|
+
label?: string;
|
|
1164
|
+
/** native name 属性。 */
|
|
1165
|
+
name?: string;
|
|
1166
|
+
/** options 快捷渲染数据。 */
|
|
1167
|
+
options?: RadioOption[];
|
|
1168
|
+
/** options 字段别名。 */
|
|
1169
|
+
props?: RadioOptionProps;
|
|
558
1170
|
/** UI KIT 尺寸。 */
|
|
559
1171
|
size?: RadioSize;
|
|
1172
|
+
/** button 选中态文字色。 */
|
|
1173
|
+
textColor?: string;
|
|
1174
|
+
/** options 渲染类型。 */
|
|
1175
|
+
type?: RadioGroupType;
|
|
1176
|
+
/** 是否触发表单校验;当前 React 版本仅保留兼容字段。 */
|
|
1177
|
+
validateEvent?: boolean;
|
|
560
1178
|
/** RadioGroup 展示形态。 */
|
|
561
1179
|
variant?: RadioGroupVariant;
|
|
562
1180
|
}
|
|
563
1181
|
//#endregion
|
|
564
|
-
//#region
|
|
1182
|
+
//#region packages/components/src/radio/src/radio.d.ts
|
|
565
1183
|
/** Radio 基于 Ant Design 单选行为,补齐 UI KIT 尺寸和描边样式。 */
|
|
566
|
-
declare function Radio({ border, className, size, ...restProps }: RadioProps): import("react").JSX.Element;
|
|
1184
|
+
declare function Radio({ border, children, className, disabled, label, size, value, ...restProps }: RadioProps): import("react").JSX.Element;
|
|
567
1185
|
declare namespace Radio {
|
|
568
1186
|
var displayName: string;
|
|
569
1187
|
}
|
|
570
1188
|
/** RadioButton 复用 Ant Design 的按钮式单选能力。 */
|
|
571
|
-
declare function RadioButton({ className, size, ...restProps }: RadioProps): import("react").JSX.Element;
|
|
1189
|
+
declare function RadioButton({ children, className, disabled, label, size, value, ...restProps }: RadioProps): import("react").JSX.Element;
|
|
572
1190
|
declare namespace RadioButton {
|
|
573
1191
|
var displayName: string;
|
|
574
1192
|
}
|
|
575
1193
|
/** RadioGroup 保持 Ant Design 分组选中能力,并通过类名切换 UI KIT 组形态。 */
|
|
576
|
-
declare function RadioGroup({ buttonStyle, className, optionType, size, variant, ...restProps }: RadioGroupProps): import("react").JSX.Element;
|
|
1194
|
+
declare function RadioGroup({ ariaLabel, buttonStyle, className, disabled, fill, label, options, optionType, props: optionProps, size, style, textColor, type, validateEvent: _validateEvent, variant, children, ...restProps }: RadioGroupProps): import("react").JSX.Element;
|
|
577
1195
|
declare namespace RadioGroup {
|
|
578
1196
|
var displayName: string;
|
|
579
1197
|
}
|
|
580
1198
|
//#endregion
|
|
581
|
-
//#region
|
|
1199
|
+
//#region packages/components/src/result/src/type.d.ts
|
|
582
1200
|
/** 基于 Ant Design Result 扩展的 UI KIT Result 属性。 */
|
|
583
1201
|
interface ResultProps extends Omit<ResultProps$1, "status"> {
|
|
584
1202
|
/** UI KIT 状态命名补充 danger/custom,danger 会映射到 Ant Design error。 */
|
|
@@ -587,20 +1205,20 @@ interface ResultProps extends Omit<ResultProps$1, "status"> {
|
|
|
587
1205
|
/** Result 对外暴露的状态类型。 */
|
|
588
1206
|
type ResultStatusType = AntdResultStatusType | "danger" | "custom";
|
|
589
1207
|
//#endregion
|
|
590
|
-
//#region
|
|
1208
|
+
//#region packages/components/src/result/src/result.d.ts
|
|
591
1209
|
/** Result 复用 Ant Design 结果页能力,并覆盖标题、描述和状态图标视觉。 */
|
|
592
1210
|
declare function Result({ className, icon, rootClassName, status, ...restProps }: ResultProps): import("react").JSX.Element;
|
|
593
1211
|
declare namespace Result {
|
|
594
1212
|
var displayName: string;
|
|
595
1213
|
}
|
|
596
1214
|
//#endregion
|
|
597
|
-
//#region
|
|
1215
|
+
//#region packages/components/src/select/src/type.d.ts
|
|
598
1216
|
/** Select 尺寸沿用 Ant Design 的 large / middle / small。 */
|
|
599
1217
|
type SelectSize = NonNullable<SelectProps$1["size"]>;
|
|
600
1218
|
/** 基于 Ant Design Select 扩展的 UI KIT Select 属性。 */
|
|
601
|
-
interface SelectProps<ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType
|
|
1219
|
+
interface SelectProps<ValueType = unknown, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends SelectProps$1<ValueType, OptionType> {}
|
|
602
1220
|
//#endregion
|
|
603
|
-
//#region
|
|
1221
|
+
//#region packages/components/src/select/src/select.d.ts
|
|
604
1222
|
/** Select 复用 Ant Design 下拉选择行为,并覆盖选择框和下拉菜单视觉。 */
|
|
605
1223
|
declare function InternalSelect<ValueType = unknown>({ className, loadingIcon, popupClassName, rootClassName, size, variant, ...restProps }: SelectProps<ValueType>, ref: Ref<RefSelectProps>): import("react").JSX.Element;
|
|
606
1224
|
/** 保留泛型调用能力,同时让 forwardRef 正常暴露 Select 实例。 */
|
|
@@ -608,24 +1226,64 @@ declare const Select: <ValueType = unknown>(props: SelectProps<ValueType> & {
|
|
|
608
1226
|
ref?: Ref<RefSelectProps>;
|
|
609
1227
|
}) => ReturnType<typeof InternalSelect>;
|
|
610
1228
|
//#endregion
|
|
611
|
-
//#region
|
|
612
|
-
/**
|
|
613
|
-
type
|
|
614
|
-
/**
|
|
615
|
-
|
|
616
|
-
|
|
1229
|
+
//#region packages/components/src/steps/src/type.d.ts
|
|
1230
|
+
/** Element Plus Steps 支持的方向。 */
|
|
1231
|
+
type StepsDirection = "horizontal" | "vertical";
|
|
1232
|
+
/** Element Plus Steps 支持的状态。 */
|
|
1233
|
+
type StepsStatus = "error" | "finish" | "process" | "success" | "wait";
|
|
1234
|
+
/** 基于 Ant Design Steps 扩展的 Element Plus 风格 Steps 属性。 */
|
|
1235
|
+
interface StepsProps extends Omit<StepsProps$1, "current" | "direction" | "items" | "orientation" | "status" | "type"> {
|
|
1236
|
+
/** Element Plus 当前激活步骤,从 0 开始。 */
|
|
1237
|
+
active?: number;
|
|
1238
|
+
/** Ant Design 兼容当前步骤,从 0 开始。 */
|
|
1239
|
+
current?: number;
|
|
1240
|
+
/** Element Plus 每步固定间距。 */
|
|
1241
|
+
space?: number | string;
|
|
1242
|
+
/** 展示方向。 */
|
|
1243
|
+
direction?: StepsDirection;
|
|
1244
|
+
/** Ant Design 兼容展示方向。 */
|
|
1245
|
+
orientation?: StepsDirection;
|
|
1246
|
+
/** 当前步骤状态。 */
|
|
1247
|
+
processStatus?: StepsStatus;
|
|
1248
|
+
/** 已完成步骤状态。 */
|
|
1249
|
+
finishStatus?: StepsStatus;
|
|
1250
|
+
/** 标题描述居中。 */
|
|
1251
|
+
alignCenter?: boolean;
|
|
1252
|
+
/** 简洁模式。 */
|
|
1253
|
+
simple?: boolean;
|
|
1254
|
+
/** 步骤项配置。 */
|
|
1255
|
+
items?: StepItem[];
|
|
1256
|
+
/** Element Plus 风格 Step 子节点。 */
|
|
1257
|
+
children?: ReactNode;
|
|
1258
|
+
/** Ant Design 兼容整体状态。 */
|
|
1259
|
+
status?: Exclude<StepsStatus, "success">;
|
|
1260
|
+
/** Ant Design 兼容类型。 */
|
|
1261
|
+
type?: StepsProps$1["type"];
|
|
617
1262
|
}
|
|
618
1263
|
/** Steps 对外暴露的单步配置类型。 */
|
|
619
|
-
type StepItem = NonNullable<StepsProps$1["items"]>[number]
|
|
1264
|
+
type StepItem = Omit<NonNullable<StepsProps$1["items"]>[number], "status"> & {
|
|
1265
|
+
/** Element Plus success 状态会映射为 Ant Design finish。 */
|
|
1266
|
+
status?: StepsStatus;
|
|
1267
|
+
};
|
|
1268
|
+
/** Element Plus 风格 Step 声明组件属性。 */
|
|
1269
|
+
interface StepProps extends StepItem {
|
|
1270
|
+
/** Step 仅作为数据声明组件,children 不参与渲染。 */
|
|
1271
|
+
children?: ReactNode;
|
|
1272
|
+
}
|
|
620
1273
|
//#endregion
|
|
621
|
-
//#region
|
|
1274
|
+
//#region packages/components/src/steps/src/steps.d.ts
|
|
1275
|
+
/** Step 是 Element Plus 风格的数据声明组件,实际渲染由 Steps 汇总到 Ant Design items。 */
|
|
1276
|
+
declare function Step(_props: StepProps): null;
|
|
1277
|
+
declare namespace Step {
|
|
1278
|
+
var displayName: string;
|
|
1279
|
+
}
|
|
622
1280
|
/** Steps 复用 Ant Design 步骤条能力,并覆盖节点、连线和文字视觉。 */
|
|
623
|
-
declare function Steps({ className, direction, iconRender, orientation, rootClassName, size,
|
|
1281
|
+
declare function Steps({ active, alignCenter, children, className, current, direction, finishStatus, iconRender, items, orientation, processStatus, rootClassName, simple, size, space, status, style, titlePlacement, type, onChange, ...restProps }: StepsProps): import("react").JSX.Element;
|
|
624
1282
|
declare namespace Steps {
|
|
625
1283
|
var displayName: string;
|
|
626
1284
|
}
|
|
627
1285
|
//#endregion
|
|
628
|
-
//#region
|
|
1286
|
+
//#region packages/components/src/switch/src/type.d.ts
|
|
629
1287
|
/** Switch 在 UI KIT 中的尺寸。 */
|
|
630
1288
|
type SwitchSize = "large" | "default" | "small";
|
|
631
1289
|
/** 基于 Ant Design Switch 扩展的 UI KIT Switch 属性。 */
|
|
@@ -634,14 +1292,14 @@ interface SwitchProps extends Omit<SwitchProps$1, "size"> {
|
|
|
634
1292
|
size?: SwitchSize;
|
|
635
1293
|
}
|
|
636
1294
|
//#endregion
|
|
637
|
-
//#region
|
|
1295
|
+
//#region packages/components/src/switch/src/switch.d.ts
|
|
638
1296
|
/** Switch 复用 Ant Design 开关交互,并按 UI KIT 补齐三档尺寸。 */
|
|
639
1297
|
declare function Switch({ className, size, ...restProps }: SwitchProps): import("react").JSX.Element;
|
|
640
1298
|
declare namespace Switch {
|
|
641
1299
|
var displayName: string;
|
|
642
1300
|
}
|
|
643
1301
|
//#endregion
|
|
644
|
-
//#region
|
|
1302
|
+
//#region packages/components/src/tab-panel/src/type.d.ts
|
|
645
1303
|
/** 页签绑定值,对齐 Element Plus TabPaneName。 */
|
|
646
1304
|
type TabPanelPaneName = string | number;
|
|
647
1305
|
/** 页签风格类型,对外只保留 Element Plus 支持的类型。 */
|
|
@@ -712,26 +1370,26 @@ interface TabPanelRef extends TabsRef {
|
|
|
712
1370
|
openContextMenu: (options?: TabPanelOpenContextMenuOptions) => void;
|
|
713
1371
|
}
|
|
714
1372
|
//#endregion
|
|
715
|
-
//#region
|
|
1373
|
+
//#region packages/components/src/tab-panel/src/tabPanel.d.ts
|
|
716
1374
|
/** TabPane 仅作为 Element Plus 风格子节点声明,由 TabPanel 统一转换为 items。 */
|
|
717
1375
|
declare function TabPane(_props: TabPanelPaneProps): null;
|
|
718
1376
|
declare const TabPanel: import("react").ForwardRefExoticComponent<TabPanelProps & import("react").RefAttributes<TabPanelRef>> & {
|
|
719
1377
|
TabPane: typeof TabPane;
|
|
720
1378
|
};
|
|
721
1379
|
//#endregion
|
|
722
|
-
//#region
|
|
1380
|
+
//#region packages/components/src/tabs/src/type.d.ts
|
|
723
1381
|
/** 基于 Ant Design Tabs 扩展的 UI KIT Tabs 属性。 */
|
|
724
1382
|
interface TabsProps extends TabsProps$1 {}
|
|
725
1383
|
/** Tabs 对外暴露的页签项配置类型。 */
|
|
726
1384
|
type TabItem = NonNullable<TabsProps$1["items"]>[number];
|
|
727
1385
|
//#endregion
|
|
728
|
-
//#region
|
|
1386
|
+
//#region packages/components/src/tabs/src/tabs.d.ts
|
|
729
1387
|
/** 保留 Ant Design Tabs.TabPane 兼容入口。 */
|
|
730
1388
|
declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<AntdTabsRef>> & {
|
|
731
1389
|
TabPane: import("react").FC<import("antd").TabPaneProps>;
|
|
732
1390
|
};
|
|
733
1391
|
//#endregion
|
|
734
|
-
//#region
|
|
1392
|
+
//#region packages/components/src/table/src/type.d.ts
|
|
735
1393
|
type TableRowKey = string | number;
|
|
736
1394
|
type TableSize = "large" | "default" | "small";
|
|
737
1395
|
type TableAlign = "left" | "center" | "right";
|
|
@@ -740,6 +1398,45 @@ type TableSortOrder = "ascending" | "descending" | null;
|
|
|
740
1398
|
type TableLayout = "fixed" | "auto";
|
|
741
1399
|
type TableColumnType = "default" | "selection" | "index" | "expand";
|
|
742
1400
|
type TableFilterValue = string | number | boolean;
|
|
1401
|
+
type TableSearchType = "input" | "select" | "select-v2" | "cascader" | "date-picker" | "time-picker" | "switch";
|
|
1402
|
+
type TableSearchParams = Record<string, unknown>;
|
|
1403
|
+
interface TableEnumOption {
|
|
1404
|
+
label?: ReactNode;
|
|
1405
|
+
value?: string | number | boolean | Array<string | number>;
|
|
1406
|
+
disabled?: boolean;
|
|
1407
|
+
children?: TableEnumOption[];
|
|
1408
|
+
[key: string]: unknown;
|
|
1409
|
+
}
|
|
1410
|
+
interface TableFieldNames {
|
|
1411
|
+
label?: string;
|
|
1412
|
+
value?: string;
|
|
1413
|
+
children?: string;
|
|
1414
|
+
}
|
|
1415
|
+
interface TableSearchRenderScope {
|
|
1416
|
+
modelValue: unknown;
|
|
1417
|
+
setModelValue: (value: unknown) => void;
|
|
1418
|
+
searchParam: TableSearchParams;
|
|
1419
|
+
placeholder: string;
|
|
1420
|
+
clearable: boolean;
|
|
1421
|
+
options: TableEnumOption[];
|
|
1422
|
+
data: TableEnumOption[];
|
|
1423
|
+
}
|
|
1424
|
+
interface TableSearchProps {
|
|
1425
|
+
el?: TableSearchType;
|
|
1426
|
+
type?: "default" | "custom";
|
|
1427
|
+
label?: ReactNode;
|
|
1428
|
+
props?: Record<string, unknown>;
|
|
1429
|
+
key?: string;
|
|
1430
|
+
tooltip?: ReactNode;
|
|
1431
|
+
order?: number;
|
|
1432
|
+
defaultValue?: unknown;
|
|
1433
|
+
render?: (scope: TableSearchRenderScope) => ReactNode;
|
|
1434
|
+
width?: number | ((value: unknown) => number);
|
|
1435
|
+
isShow?: boolean;
|
|
1436
|
+
}
|
|
1437
|
+
type TableEnumSource = TableEnumOption[] | (() => Promise<TableEnumOption[] | {
|
|
1438
|
+
data: TableEnumOption[];
|
|
1439
|
+
}>);
|
|
743
1440
|
interface TableFilterItem {
|
|
744
1441
|
text: ReactNode;
|
|
745
1442
|
value: TableFilterValue;
|
|
@@ -761,6 +1458,26 @@ interface TableDefaultSort {
|
|
|
761
1458
|
prop: string;
|
|
762
1459
|
order?: TableSortOrder;
|
|
763
1460
|
}
|
|
1461
|
+
interface TablePageable {
|
|
1462
|
+
page: number;
|
|
1463
|
+
size: number;
|
|
1464
|
+
total: number;
|
|
1465
|
+
}
|
|
1466
|
+
interface TableHeaderScope<RecordType> {
|
|
1467
|
+
selectedList: RecordType[];
|
|
1468
|
+
selectedListIds: TableRowKey[];
|
|
1469
|
+
isSelected: boolean;
|
|
1470
|
+
}
|
|
1471
|
+
interface TablePaginationLeftScope {
|
|
1472
|
+
pageable: TablePageable;
|
|
1473
|
+
}
|
|
1474
|
+
interface TableRequestResult<RecordType> {
|
|
1475
|
+
list: RecordType[];
|
|
1476
|
+
currentPage: number;
|
|
1477
|
+
pageSize: number;
|
|
1478
|
+
total: number;
|
|
1479
|
+
}
|
|
1480
|
+
type TableRequestData<RecordType> = RecordType[] | TableRequestResult<RecordType>;
|
|
764
1481
|
interface TableSortChangeContext<RecordType> {
|
|
765
1482
|
column?: TableColumnProps<RecordType>;
|
|
766
1483
|
prop?: string;
|
|
@@ -863,6 +1580,9 @@ interface TableColumnProps<RecordType = Record<string, unknown>> {
|
|
|
863
1580
|
row: RecordType;
|
|
864
1581
|
rowIndex: number;
|
|
865
1582
|
}) => ReactNode;
|
|
1583
|
+
search?: TableSearchProps;
|
|
1584
|
+
enum?: TableEnumSource;
|
|
1585
|
+
fieldNames?: TableFieldNames;
|
|
866
1586
|
}
|
|
867
1587
|
type NativeTableHostProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "data" | "onChange" | "onScroll" | "onSelect">;
|
|
868
1588
|
interface TableProps<RecordType = Record<string, unknown>> extends NativeTableHostProps {
|
|
@@ -911,6 +1631,20 @@ interface TableProps<RecordType = Record<string, unknown>> extends NativeTableHo
|
|
|
911
1631
|
tooltipFormatter?: (scope: TableTooltipContext<RecordType>) => ReactNode;
|
|
912
1632
|
preserveExpandedContent?: boolean;
|
|
913
1633
|
nativeScrollbar?: boolean;
|
|
1634
|
+
pagination?: boolean;
|
|
1635
|
+
requestApi?: (params: unknown) => Promise<TableRequestData<RecordType>>;
|
|
1636
|
+
requestAuto?: boolean;
|
|
1637
|
+
requestError?: (error: unknown) => void;
|
|
1638
|
+
handleParam?: (params: Record<string, unknown>) => unknown;
|
|
1639
|
+
dataCallback?: (data: TableRequestData<RecordType>) => TableRequestData<RecordType> | Promise<TableRequestData<RecordType>>;
|
|
1640
|
+
initParam?: Record<string, unknown>;
|
|
1641
|
+
isShowSearch?: boolean;
|
|
1642
|
+
isShowSearchBtn?: boolean;
|
|
1643
|
+
isShowResetBtn?: boolean;
|
|
1644
|
+
tableHeader?: ReactNode | ((scope: TableHeaderScope<RecordType>) => ReactNode);
|
|
1645
|
+
paginationLeft?: ReactNode | ((scope: TablePaginationLeftScope) => ReactNode);
|
|
1646
|
+
beforeReset?: () => void;
|
|
1647
|
+
searchClearSelection?: boolean;
|
|
914
1648
|
rowExpandable?: (row: RecordType) => boolean;
|
|
915
1649
|
empty?: ReactNode;
|
|
916
1650
|
append?: ReactNode;
|
|
@@ -929,6 +1663,8 @@ interface TableProps<RecordType = Record<string, unknown>> extends NativeTableHo
|
|
|
929
1663
|
onHeaderClick?: TableHeaderMouseHandler<RecordType>;
|
|
930
1664
|
onHeaderContextmenu?: TableHeaderMouseHandler<RecordType>;
|
|
931
1665
|
onSortChange?: (sort: TableSortChangeContext<RecordType>) => void;
|
|
1666
|
+
onSearch?: () => void;
|
|
1667
|
+
onReset?: () => void;
|
|
932
1668
|
onFilterChange?: (filters: Record<string, TableFilterValue[] | null>) => void;
|
|
933
1669
|
onCurrentChange?: TableCurrentChangeHandler<RecordType>;
|
|
934
1670
|
onHeaderDragend?: TableHeaderDragendHandler<RecordType>;
|
|
@@ -955,9 +1691,18 @@ interface TableRef<RecordType = Record<string, unknown>> {
|
|
|
955
1691
|
setScrollLeft: (left: number) => void;
|
|
956
1692
|
columns: TableColumnProps<RecordType>[];
|
|
957
1693
|
updateKeyChildren: (key: TableRowKey, children: RecordType[]) => void;
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1694
|
+
pageable: TablePageable;
|
|
1695
|
+
setPageTotal: (total: number) => void;
|
|
1696
|
+
getTableList: () => Promise<void>;
|
|
1697
|
+
handleSizeChange: (size: number) => void;
|
|
1698
|
+
handleCurrentChange: (page: number) => void;
|
|
1699
|
+
searchParam: TableSearchParams;
|
|
1700
|
+
searchInitParam: TableSearchParams;
|
|
1701
|
+
search: () => void;
|
|
1702
|
+
reset: () => void;
|
|
1703
|
+
}
|
|
1704
|
+
//#endregion
|
|
1705
|
+
//#region packages/components/src/table/src/table.d.ts
|
|
961
1706
|
type DefaultRecord = Record<string, unknown>;
|
|
962
1707
|
type TableColumnMarker = {
|
|
963
1708
|
__ZH_TABLE_COLUMN?: "column" | "group";
|
|
@@ -974,7 +1719,7 @@ declare const Table: (<RecordType extends object = DefaultRecord>(props: TablePr
|
|
|
974
1719
|
ColumnGroup: TableColumnComponent;
|
|
975
1720
|
};
|
|
976
1721
|
//#endregion
|
|
977
|
-
//#region
|
|
1722
|
+
//#region packages/components/src/tag/src/type.d.ts
|
|
978
1723
|
/** Element Plus Tag 支持的语义类型。 */
|
|
979
1724
|
type TagType = "primary" | "success" | "info" | "warning" | "danger";
|
|
980
1725
|
/** Element Plus Tag 支持的尺寸。 */
|
|
@@ -1008,7 +1753,7 @@ interface CheckTagProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange"
|
|
|
1008
1753
|
onChange?: (checked: boolean) => void;
|
|
1009
1754
|
}
|
|
1010
1755
|
//#endregion
|
|
1011
|
-
//#region
|
|
1756
|
+
//#region packages/components/src/tag/src/tag.d.ts
|
|
1012
1757
|
/** Tag 基础导出,完整 Ant Design 行为映射在后续 TDD 任务补齐。 */
|
|
1013
1758
|
declare function Tag({ children, className, closable, color, disableTransitions, effect, hit, onClose, round, size, type, ...restProps }: TagProps): import("react").JSX.Element;
|
|
1014
1759
|
declare namespace Tag {
|
|
@@ -1020,7 +1765,7 @@ declare namespace CheckTag {
|
|
|
1020
1765
|
var displayName: string;
|
|
1021
1766
|
}
|
|
1022
1767
|
//#endregion
|
|
1023
|
-
//#region
|
|
1768
|
+
//#region packages/components/src/timeline/src/type.d.ts
|
|
1024
1769
|
/** 对齐 Element Plus 的内容相对时间线位置。 */
|
|
1025
1770
|
type TimelineMode = "start" | "alternate" | "alternate-reverse" | "end";
|
|
1026
1771
|
/** 时间戳相对内容的位置。 */
|
|
@@ -1060,7 +1805,7 @@ interface TimelineProps extends Pick<TimelineProps$1, "className" | "style"> {
|
|
|
1060
1805
|
children?: ReactNode;
|
|
1061
1806
|
}
|
|
1062
1807
|
//#endregion
|
|
1063
|
-
//#region
|
|
1808
|
+
//#region packages/components/src/timeline/src/timeline.d.ts
|
|
1064
1809
|
/** Timeline 复用 Ant Design 能力,对外参数按 Element Plus/Figma 纵向设计收口。 */
|
|
1065
1810
|
declare function InternalTimeline({ className, items, mode, ...restProps }: TimelineProps): import("react").JSX.Element;
|
|
1066
1811
|
/** Timeline.Item 子组件,对外参数按 Element Plus Timeline-Item 收口。 */
|
|
@@ -1072,7 +1817,7 @@ declare const Timeline: typeof InternalTimeline & {
|
|
|
1072
1817
|
Item: typeof TimelineItem$1;
|
|
1073
1818
|
};
|
|
1074
1819
|
//#endregion
|
|
1075
|
-
//#region
|
|
1820
|
+
//#region packages/components/src/tooltip/src/type.d.ts
|
|
1076
1821
|
/** UI KIT 中 Tooltip 的视觉类型。 */
|
|
1077
1822
|
type TooltipEffect = "dark" | "light" | "custom";
|
|
1078
1823
|
/** Figma Tooltip 组件使用的方向命名。 */
|
|
@@ -1089,14 +1834,14 @@ interface TooltipProps extends Omit<TooltipProps$1, "color" | "placement"> {
|
|
|
1089
1834
|
placement?: TooltipPlacement;
|
|
1090
1835
|
}
|
|
1091
1836
|
//#endregion
|
|
1092
|
-
//#region
|
|
1837
|
+
//#region packages/components/src/tooltip/src/tooltip.d.ts
|
|
1093
1838
|
/** Tooltip 复用 Ant Design 浮层能力,并按 UI KIT effect 和 placement 覆盖视觉。 */
|
|
1094
1839
|
declare function Tooltip({ effect, multiple, placement, rootClassName, ...restProps }: TooltipProps): import("react").JSX.Element;
|
|
1095
1840
|
declare namespace Tooltip {
|
|
1096
1841
|
var displayName: string;
|
|
1097
1842
|
}
|
|
1098
1843
|
//#endregion
|
|
1099
|
-
//#region
|
|
1844
|
+
//#region packages/components/src/tree/src/type.d.ts
|
|
1100
1845
|
/** 基于 Ant Design Tree 扩展的 UI KIT Tree 属性。 */
|
|
1101
1846
|
interface TreeProps extends TreeProps$1 {}
|
|
1102
1847
|
/** Tree.Actions 按钮型树节点标题属性。 */
|
|
@@ -1108,7 +1853,7 @@ interface TreeActionsProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onClic
|
|
|
1108
1853
|
onDelete?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
1109
1854
|
}
|
|
1110
1855
|
//#endregion
|
|
1111
|
-
//#region
|
|
1856
|
+
//#region packages/components/src/tree/src/tree.d.ts
|
|
1112
1857
|
/** Tree.Actions 对齐设计稿中按钮型树节点的 Append/Delete 操作。 */
|
|
1113
1858
|
declare function TreeActions({ appendText, className, deleteText, label, onAppend, onDelete, ...restProps }: TreeActionsProps): import("react").JSX.Element;
|
|
1114
1859
|
declare namespace TreeActions {
|
|
@@ -1120,7 +1865,7 @@ declare const Tree: typeof InternalTree & {
|
|
|
1120
1865
|
Actions: typeof TreeActions;
|
|
1121
1866
|
};
|
|
1122
1867
|
//#endregion
|
|
1123
|
-
//#region
|
|
1868
|
+
//#region packages/components/src/upload/src/type.d.ts
|
|
1124
1869
|
type Awaitable<T> = Promise<T> | T;
|
|
1125
1870
|
type UploadStatus = "ready" | "uploading" | "success" | "fail";
|
|
1126
1871
|
type UploadListType = "text" | "picture" | "picture-card";
|
|
@@ -1198,10 +1943,10 @@ interface UploadProps {
|
|
|
1198
1943
|
withCredentials?: boolean;
|
|
1199
1944
|
}
|
|
1200
1945
|
//#endregion
|
|
1201
|
-
//#region
|
|
1946
|
+
//#region packages/components/src/upload/src/upload.d.ts
|
|
1202
1947
|
declare const Upload: import("react").ForwardRefExoticComponent<UploadProps & import("react").RefAttributes<UploadRef>>;
|
|
1203
1948
|
//#endregion
|
|
1204
|
-
//#region
|
|
1949
|
+
//#region packages/theme/src/utils.d.ts
|
|
1205
1950
|
/**
|
|
1206
1951
|
* 统一调用方传入的十六进制格式,保证色板覆盖表可以稳定命中。
|
|
1207
1952
|
* @param hexColor 十六进制颜色
|
|
@@ -1244,7 +1989,7 @@ declare function toHexChannel(channel: number): string;
|
|
|
1244
1989
|
*/
|
|
1245
1990
|
declare function blendColor(foreground: RgbColor, background: RgbColor, opacity: number): string;
|
|
1246
1991
|
//#endregion
|
|
1247
|
-
//#region
|
|
1992
|
+
//#region packages/theme/src/tokens.d.ts
|
|
1248
1993
|
/**
|
|
1249
1994
|
* 种子色
|
|
1250
1995
|
* @description 颜色种子色,用于生成色板。
|
|
@@ -1272,7 +2017,7 @@ declare const seedToken: {
|
|
|
1272
2017
|
black: string;
|
|
1273
2018
|
};
|
|
1274
2019
|
//#endregion
|
|
1275
|
-
//#region
|
|
2020
|
+
//#region packages/theme/src/antdTheme.d.ts
|
|
1276
2021
|
declare const antdTheme: {
|
|
1277
2022
|
token: {
|
|
1278
2023
|
colorPrimary: "#3370FF";
|
|
@@ -1407,10 +2152,10 @@ declare const antdTheme: {
|
|
|
1407
2152
|
};
|
|
1408
2153
|
declare function createAntdTheme(overrides?: ThemeConfig): ThemeConfig;
|
|
1409
2154
|
//#endregion
|
|
1410
|
-
//#region
|
|
2155
|
+
//#region packages/utils/src/className.d.ts
|
|
1411
2156
|
/** 可参与类名合并的输入值,空值会在输出前过滤。 */
|
|
1412
2157
|
type ClassNameValue = string | false | null | undefined;
|
|
1413
2158
|
/** 合并类名,过滤空值并保持传入顺序稳定。 */
|
|
1414
2159
|
declare function mergeClassNames(...classNames: ClassNameValue[]): string;
|
|
1415
2160
|
//#endregion
|
|
1416
|
-
export { Alert, type AlertCloseType, type AlertProps, type AlertType, Awaitable, Badge, type BadgeProps, type BadgeRef, BadgeRibbon, type BadgeRibbonProps, type BaseOptionType, Button, type ButtonColor, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonRef, type ButtonStyle, Cascader, type
|
|
2161
|
+
export { Alert, type AlertCloseType, type AlertProps, type AlertType, Awaitable, Badge, type BadgeProps, type BadgeRef, BadgeRibbon, type BadgeRibbonProps, type BaseOptionType, Button, type ButtonColor, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonRef, type ButtonStyle, Cascader, type CascaderConfig, type CascaderLazyLoad, type CascaderLazyNode, type CascaderOption, type CascaderOptionContentContext, type CascaderOptionType, CascaderPanel, type CascaderPanelProps, type CascaderProps, type CascaderSize, type CascaderSuggestionContext, type CascaderSuggestionItem, type CascaderTagContext, type CascaderValue, CheckTag, type CheckTagProps, Checkbox, CheckboxButton, CheckboxGroup, type CheckboxGroupProps, type CheckboxGroupSize, type CheckboxGroupType, type CheckboxGroupValue, type CheckboxGroupVariant, type CheckboxOption, type CheckboxOptionProps, type CheckboxProps, type CheckboxSize, type CheckboxValue, type ClassNameValue, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DatetimePicker, type DatetimePickerProps, DatetimeRangePicker, type DatetimeRangePickerProps, Dialog, type DialogBeforeClose, type DialogProps, Divider, type DividerProps, type DividerTone, Dropdown, type DropdownButtonProps, type DropdownMenuItem, type DropdownProps, Empty, type EmptyProps, type FigmaTooltipPlacement, Form, type FormInstance, type FormItemProps, type FormListFieldData, type FormListOperation, type FormListProps, type FormProps, Header, type HeaderNavItem, type HeaderProps, Icon, type IconName, type IconProps, Image, type ImagePreviewGroupProps, type GroupPreviewConfig as ImagePreviewGroupType, type ImagePreviewType, type ImageProps, type ImageRef, ImageViewer, type ImageViewerAction, type ImageViewerActionOptions, type ImageViewerErrorContext, type ImageViewerProgressContext, type ImageViewerProps, type ImageViewerRef, type ImageViewerSlot, type ImageViewerToolbarContext, Input, type InputFilledProps, type InputGroupProps, type InputProps, type InputRef, type InputSize, Loading, type LoadingMask, type LoadingOverlayProps, type LoadingProps, type LoadingSize, type LoadingType, Menu, type MenuItem, type MenuProps, type AntdMenuRef as MenuRef, Pagination, type PaginationLocale, type PaginationProps, type PasswordProps, Progress, type ProgressProps, type ProgressVariant, Radio, RadioButton, RadioGroup, type RadioGroupProps, type RadioGroupResolveInput, type RadioGroupType, type RadioGroupVariant, type RadioOption, type RadioOptionProps, type RadioProps, type RadioResolveInput, type RadioSize, type RadioValue, type RefSelectProps, type ResolvedRadioGroupOptions, type ResolvedRadioOption, type ResolvedRadioOptions, Result, type ResultProps, type ResultStatusType, RgbColor, type Rule, type RuleObject, type RuleRender, type SearchProps, Select, type DefaultOptionType as SelectOption, type SelectProps, type SelectSize, Step, type StepItem, type StepProps, Steps, type StepsProps, Switch, type SwitchProps, type SwitchSize, type TabItem, type TabPaneProps, TabPanel, type TabPanelBeforeLeave, type TabPanelContextMenuAction, type TabPanelContextMenuActionItem, type TabPanelEditAction, type TabPanelItem, type TabPanelOpenContextMenuOptions, type TabPanelPaneContext, type TabPanelPaneName, type TabPanelPaneProps, type TabPanelPosition, type TabPanelProps, type TabPanelRef, type TabPanelType, Table, type TableAlign, type TableCellContext, type TableColumnProps, type TableColumnType, type TableCurrentChangeHandler, type TableDefaultSort, type TableEnumOption, type TableEnumSource, type TableFieldNames, type TableFilterItem, type TableFilterValue, type TableFixed, type TableHeaderScope, type TableLayout, type TablePageable, type TablePaginationLeftScope, type TableProps, type TableRef, type TableRequestData, type TableRequestResult, type TableRowKey, type TableSearchParams, type TableSearchProps, type TableSearchRenderScope, type TableSearchType, type TableSize, type TableSortChangeContext, type TableSortOrder, type TableTreeNode, type TableTreeProps, Tabs, type TabsProps, type AntdTabsRef as TabsRef, Tag, type TagEffect, type TagProps, type TagSize, type TagType, type TextAreaProps, TimePicker, type TimePickerProps, TimeRangePicker, type TimeRangePickerProps, Timeline, TimelineItem, TimelineItemPlacement, TimelineItemProps, TimelineItemSize, TimelineItemType, TimelineMode, TimelineProps, Tooltip, type TooltipEffect, type TooltipPlacement, type TooltipProps, Tree, type TreeActionsProps, type DataNode as TreeDataNode, type TreeProps, Upload, UploadFile, UploadFiles, UploadListType, UploadProgressEvent, UploadProps, UploadRawFile, UploadRef, UploadRequestOptions, UploadStatus, UploadUserFile, antdTheme, blendColor, createAntdTheme, createColorPalette, headerNavItems, hexToRgb, iconNames, icons, mergeClassNames, normalizeHexColor, paletteSeedColors, seedToken, sideMenuItems, toHexChannel };
|