@canvas-components/react-components 0.1.1
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/LICENSE +21 -0
- package/dist/index.cjs +6119 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +567 -0
- package/dist/index.d.ts +567 -0
- package/dist/index.js +6099 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { InputHTMLAttributes, ReactNode, KeyboardEvent, RefObject, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ReactCheckboxRef {
|
|
5
|
+
focus: () => void;
|
|
6
|
+
blur: () => void;
|
|
7
|
+
input: HTMLInputElement | null;
|
|
8
|
+
}
|
|
9
|
+
interface ReactCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
10
|
+
/**
|
|
11
|
+
* 半选状态。
|
|
12
|
+
*/
|
|
13
|
+
indeterminate?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 复选框文案。
|
|
16
|
+
*/
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 基础复选框。
|
|
21
|
+
*/
|
|
22
|
+
declare const ReactCheckbox: react.ForwardRefExoticComponent<ReactCheckboxProps & react.RefAttributes<ReactCheckboxRef>>;
|
|
23
|
+
|
|
24
|
+
interface ReactInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
25
|
+
/**
|
|
26
|
+
* 回车确认回调。
|
|
27
|
+
*/
|
|
28
|
+
onPressEnter?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
29
|
+
/**
|
|
30
|
+
* 是否允许清空。
|
|
31
|
+
*/
|
|
32
|
+
allowClear?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 清空回调。
|
|
35
|
+
*/
|
|
36
|
+
onClear?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* 右侧附加内容。
|
|
39
|
+
*/
|
|
40
|
+
suffix?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* 外层容器类名。
|
|
43
|
+
*/
|
|
44
|
+
wrapperClassName?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 基础文本输入框。
|
|
48
|
+
*/
|
|
49
|
+
declare const ReactInput: react.ForwardRefExoticComponent<ReactInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
50
|
+
|
|
51
|
+
interface ReactColorPickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
52
|
+
/** 当前颜色值。 */
|
|
53
|
+
value?: string;
|
|
54
|
+
/** 颜色变化回调,返回标准六位 HEX。 */
|
|
55
|
+
onChange?: (value: string) => void;
|
|
56
|
+
/** 弹层类名。 */
|
|
57
|
+
popupClassName?: string;
|
|
58
|
+
/** 预设颜色。 */
|
|
59
|
+
presets?: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* AntD 风格颜色选择器。
|
|
63
|
+
*/
|
|
64
|
+
declare const ReactColorPicker: react.ForwardRefExoticComponent<ReactColorPickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
65
|
+
|
|
66
|
+
interface ReactDatePickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
67
|
+
/**
|
|
68
|
+
* 当前日期值,格式为 YYYY-MM-DD。
|
|
69
|
+
*/
|
|
70
|
+
value?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 值变化回调。
|
|
73
|
+
*/
|
|
74
|
+
onChange?: (value: string) => void;
|
|
75
|
+
/**
|
|
76
|
+
* 弹层类名。
|
|
77
|
+
*/
|
|
78
|
+
popupClassName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* 是否允许清空。
|
|
81
|
+
*/
|
|
82
|
+
allowClear?: boolean;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 基础日期选择器。
|
|
86
|
+
*/
|
|
87
|
+
declare const ReactDatePicker: react.ForwardRefExoticComponent<ReactDatePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
88
|
+
|
|
89
|
+
interface ReactDateRangePickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
90
|
+
/**
|
|
91
|
+
* 当前日期区间值,格式为 `[开始日期, 结束日期]`。
|
|
92
|
+
*/
|
|
93
|
+
value?: [string, string];
|
|
94
|
+
/**
|
|
95
|
+
* 值变化回调。
|
|
96
|
+
*/
|
|
97
|
+
onChange?: (value: [string, string]) => void;
|
|
98
|
+
/**
|
|
99
|
+
* 弹层类名。
|
|
100
|
+
*/
|
|
101
|
+
popupClassName?: string;
|
|
102
|
+
/**
|
|
103
|
+
* 区间分隔符。
|
|
104
|
+
*/
|
|
105
|
+
rangeSeparator?: string;
|
|
106
|
+
/**
|
|
107
|
+
* 是否允许清空。
|
|
108
|
+
*/
|
|
109
|
+
allowClear?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* 日期区间选择器。
|
|
113
|
+
*/
|
|
114
|
+
declare const ReactDateRangePicker: react.ForwardRefExoticComponent<ReactDateRangePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
115
|
+
|
|
116
|
+
interface ReactDateTimePickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
117
|
+
/**
|
|
118
|
+
* 当前日期时间值,格式为 YYYY-MM-DD HH:mm:ss。
|
|
119
|
+
*/
|
|
120
|
+
value?: string;
|
|
121
|
+
/**
|
|
122
|
+
* 值变化回调。
|
|
123
|
+
*/
|
|
124
|
+
onChange?: (value: string) => void;
|
|
125
|
+
/**
|
|
126
|
+
* 弹层类名。
|
|
127
|
+
*/
|
|
128
|
+
popupClassName?: string;
|
|
129
|
+
/**
|
|
130
|
+
* 是否允许清空。
|
|
131
|
+
*/
|
|
132
|
+
allowClear?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* 年月日时分秒选择器。
|
|
136
|
+
*/
|
|
137
|
+
declare const ReactDateTimePicker: react.ForwardRefExoticComponent<ReactDateTimePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
138
|
+
|
|
139
|
+
interface ReactDateTimeRangePickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
140
|
+
/**
|
|
141
|
+
* 当前日期时间区间值,格式为 `[开始日期时间, 结束日期时间]`。
|
|
142
|
+
*/
|
|
143
|
+
value?: [string, string];
|
|
144
|
+
/**
|
|
145
|
+
* 值变化回调。
|
|
146
|
+
*/
|
|
147
|
+
onChange?: (value: [string, string]) => void;
|
|
148
|
+
/**
|
|
149
|
+
* 弹层类名。
|
|
150
|
+
*/
|
|
151
|
+
popupClassName?: string;
|
|
152
|
+
/**
|
|
153
|
+
* 区间分隔符。
|
|
154
|
+
*/
|
|
155
|
+
rangeSeparator?: string;
|
|
156
|
+
/**
|
|
157
|
+
* 是否允许清空。
|
|
158
|
+
*/
|
|
159
|
+
allowClear?: boolean;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* 日期时间区间选择器。
|
|
163
|
+
*/
|
|
164
|
+
declare const ReactDateTimeRangePicker: react.ForwardRefExoticComponent<ReactDateTimeRangePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
165
|
+
|
|
166
|
+
interface ReactImagePreviewProps {
|
|
167
|
+
open: boolean;
|
|
168
|
+
src: string;
|
|
169
|
+
alt?: string;
|
|
170
|
+
onClose: () => void;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* 图片遮罩预览组件。
|
|
174
|
+
*/
|
|
175
|
+
declare function ReactImagePreview(props: ReactImagePreviewProps): react.JSX.Element | null;
|
|
176
|
+
|
|
177
|
+
interface ReactMonthPickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
178
|
+
/**
|
|
179
|
+
* 当前月份值,格式为 YYYY-MM。
|
|
180
|
+
*/
|
|
181
|
+
value?: string;
|
|
182
|
+
/**
|
|
183
|
+
* 值变化回调。
|
|
184
|
+
*/
|
|
185
|
+
onChange?: (value: string) => void;
|
|
186
|
+
/**
|
|
187
|
+
* 弹层类名。
|
|
188
|
+
*/
|
|
189
|
+
popupClassName?: string;
|
|
190
|
+
/**
|
|
191
|
+
* 是否允许清空。
|
|
192
|
+
*/
|
|
193
|
+
allowClear?: boolean;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* 基础月份选择器。
|
|
197
|
+
*/
|
|
198
|
+
declare const ReactMonthPicker: react.ForwardRefExoticComponent<ReactMonthPickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
199
|
+
|
|
200
|
+
interface ReactNumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange"> {
|
|
201
|
+
/**
|
|
202
|
+
* 当前值。
|
|
203
|
+
*/
|
|
204
|
+
value?: number | null;
|
|
205
|
+
/**
|
|
206
|
+
* 值变化回调。
|
|
207
|
+
*/
|
|
208
|
+
onChange?: (value: number | null) => void;
|
|
209
|
+
/**
|
|
210
|
+
* 回车确认回调。
|
|
211
|
+
*/
|
|
212
|
+
onPressEnter?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
213
|
+
/**
|
|
214
|
+
* 是否允许清空。
|
|
215
|
+
*/
|
|
216
|
+
allowClear?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* 清空回调。
|
|
219
|
+
*/
|
|
220
|
+
onClear?: () => void;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* 基础数字输入框。
|
|
224
|
+
*/
|
|
225
|
+
declare const ReactNumberInput: react.ForwardRefExoticComponent<ReactNumberInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
226
|
+
|
|
227
|
+
interface ReactPaginationProps {
|
|
228
|
+
/**
|
|
229
|
+
* 当前页码,从 1 开始。
|
|
230
|
+
*/
|
|
231
|
+
current: number;
|
|
232
|
+
/**
|
|
233
|
+
* 总条数。
|
|
234
|
+
*/
|
|
235
|
+
total: number;
|
|
236
|
+
/**
|
|
237
|
+
* 每页条数。
|
|
238
|
+
*/
|
|
239
|
+
pageSize?: number;
|
|
240
|
+
/**
|
|
241
|
+
* 每页条数候选。
|
|
242
|
+
*/
|
|
243
|
+
pageSizeOptions?: number[];
|
|
244
|
+
/**
|
|
245
|
+
* 是否禁用。
|
|
246
|
+
*/
|
|
247
|
+
disabled?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* 是否显示页大小切换。
|
|
250
|
+
*/
|
|
251
|
+
showSizeChanger?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* 是否显示快速跳转。
|
|
254
|
+
*/
|
|
255
|
+
showQuickJumper?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* 是否使用更紧凑的页码数量。
|
|
258
|
+
*/
|
|
259
|
+
showLessItems?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* 是否简易模式。
|
|
262
|
+
*/
|
|
263
|
+
simple?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* 总数文案。
|
|
266
|
+
*/
|
|
267
|
+
showTotal?: (total: number, range: [number, number]) => string;
|
|
268
|
+
/**
|
|
269
|
+
* 页码变化回调。
|
|
270
|
+
*/
|
|
271
|
+
onChange?: (page: number, pageSize: number) => void;
|
|
272
|
+
/**
|
|
273
|
+
* 每页条数变化回调。
|
|
274
|
+
*/
|
|
275
|
+
onPageSizeChange?: (page: number, pageSize: number) => void;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* 基础分页器。
|
|
279
|
+
*/
|
|
280
|
+
declare function ReactPagination(props: ReactPaginationProps): react.JSX.Element;
|
|
281
|
+
|
|
282
|
+
type PopupPlacement = "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "leftTop" | "leftBottom";
|
|
283
|
+
interface PopupAnchorRect {
|
|
284
|
+
x: number;
|
|
285
|
+
y: number;
|
|
286
|
+
width: number;
|
|
287
|
+
height: number;
|
|
288
|
+
}
|
|
289
|
+
interface ReactPopupProps {
|
|
290
|
+
/**
|
|
291
|
+
* 是否显示弹层。
|
|
292
|
+
*/
|
|
293
|
+
open: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* 触发元素引用。
|
|
296
|
+
*/
|
|
297
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
298
|
+
/**
|
|
299
|
+
* 外部直接传入的锚点矩形。
|
|
300
|
+
*/
|
|
301
|
+
anchorRect?: PopupAnchorRect | null;
|
|
302
|
+
/**
|
|
303
|
+
* 弹层位置。
|
|
304
|
+
*/
|
|
305
|
+
placement?: PopupPlacement;
|
|
306
|
+
/**
|
|
307
|
+
* 与锚点的间距。
|
|
308
|
+
*/
|
|
309
|
+
offset?: number;
|
|
310
|
+
/**
|
|
311
|
+
* 是否跟随触发器宽度。
|
|
312
|
+
*/
|
|
313
|
+
matchAnchorWidth?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* 最小宽度。
|
|
316
|
+
*/
|
|
317
|
+
minWidth?: number;
|
|
318
|
+
/**
|
|
319
|
+
* 自定义层级。
|
|
320
|
+
*/
|
|
321
|
+
zIndex?: number;
|
|
322
|
+
/**
|
|
323
|
+
* 弹层容器类名。
|
|
324
|
+
*/
|
|
325
|
+
className?: string;
|
|
326
|
+
/**
|
|
327
|
+
* 弹层面板类名。
|
|
328
|
+
*/
|
|
329
|
+
surfaceClassName?: string;
|
|
330
|
+
/**
|
|
331
|
+
* 弹层容器样式。
|
|
332
|
+
*/
|
|
333
|
+
style?: CSSProperties;
|
|
334
|
+
/**
|
|
335
|
+
* 弹层面板样式。
|
|
336
|
+
*/
|
|
337
|
+
surfaceStyle?: CSSProperties;
|
|
338
|
+
/**
|
|
339
|
+
* 打开状态变化回调。
|
|
340
|
+
*/
|
|
341
|
+
onOpenChange?: (open: boolean) => void;
|
|
342
|
+
/**
|
|
343
|
+
* 弹层内容。
|
|
344
|
+
*/
|
|
345
|
+
children: ReactNode;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* 通用弹出层组件。
|
|
349
|
+
*/
|
|
350
|
+
declare function ReactPopup(props: ReactPopupProps): react.ReactPortal | null;
|
|
351
|
+
|
|
352
|
+
interface ReactQuarterPickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
353
|
+
/**
|
|
354
|
+
* 当前季度值,格式为 YYYY-QN。
|
|
355
|
+
*/
|
|
356
|
+
value?: string;
|
|
357
|
+
/**
|
|
358
|
+
* 值变化回调。
|
|
359
|
+
*/
|
|
360
|
+
onChange?: (value: string) => void;
|
|
361
|
+
/**
|
|
362
|
+
* 弹层类名。
|
|
363
|
+
*/
|
|
364
|
+
popupClassName?: string;
|
|
365
|
+
/**
|
|
366
|
+
* 是否允许清空。
|
|
367
|
+
*/
|
|
368
|
+
allowClear?: boolean;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* 基础季度选择器。
|
|
372
|
+
*/
|
|
373
|
+
declare const ReactQuarterPicker: react.ForwardRefExoticComponent<ReactQuarterPickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
374
|
+
|
|
375
|
+
interface ReactSelectOption {
|
|
376
|
+
/**
|
|
377
|
+
* 选项文本。
|
|
378
|
+
*/
|
|
379
|
+
label: string;
|
|
380
|
+
/**
|
|
381
|
+
* 选项值。
|
|
382
|
+
*/
|
|
383
|
+
value: string | number;
|
|
384
|
+
/**
|
|
385
|
+
* 是否禁用。
|
|
386
|
+
*/
|
|
387
|
+
disabled?: boolean;
|
|
388
|
+
}
|
|
389
|
+
interface ReactSelectProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
390
|
+
/**
|
|
391
|
+
* 当前值。
|
|
392
|
+
*/
|
|
393
|
+
value?: string | number;
|
|
394
|
+
/**
|
|
395
|
+
* 选项列表。
|
|
396
|
+
*/
|
|
397
|
+
options: ReactSelectOption[];
|
|
398
|
+
/**
|
|
399
|
+
* 值变化回调。
|
|
400
|
+
*/
|
|
401
|
+
onChange?: (value: string) => void;
|
|
402
|
+
/**
|
|
403
|
+
* 占位提示。
|
|
404
|
+
*/
|
|
405
|
+
placeholder?: string;
|
|
406
|
+
/**
|
|
407
|
+
* 弹层类名。
|
|
408
|
+
*/
|
|
409
|
+
popupClassName?: string;
|
|
410
|
+
/**
|
|
411
|
+
* 列表高度。
|
|
412
|
+
*/
|
|
413
|
+
listHeight?: number;
|
|
414
|
+
/**
|
|
415
|
+
* 单项高度。
|
|
416
|
+
*/
|
|
417
|
+
optionHeight?: number;
|
|
418
|
+
/**
|
|
419
|
+
* 是否启用虚拟列表。
|
|
420
|
+
*/
|
|
421
|
+
virtual?: boolean;
|
|
422
|
+
/**
|
|
423
|
+
* 是否开启搜索过滤。
|
|
424
|
+
*/
|
|
425
|
+
showSearch?: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* 是否允许清空。
|
|
428
|
+
*/
|
|
429
|
+
allowClear?: boolean;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* 基础下拉选择框。
|
|
433
|
+
*/
|
|
434
|
+
declare const ReactSelect: react.ForwardRefExoticComponent<ReactSelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
435
|
+
|
|
436
|
+
interface ReactTimePickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
437
|
+
value?: string;
|
|
438
|
+
onChange?: (value: string) => void;
|
|
439
|
+
popupClassName?: string;
|
|
440
|
+
allowClear?: boolean;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* 基础时间选择器,支持时分秒面板选择。
|
|
444
|
+
*/
|
|
445
|
+
declare const ReactTimePicker: react.ForwardRefExoticComponent<ReactTimePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
446
|
+
|
|
447
|
+
interface ReactTimeRangePickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
448
|
+
/**
|
|
449
|
+
* 当前时间范围值,格式为 `[开始时间, 结束时间]`。
|
|
450
|
+
*/
|
|
451
|
+
value?: [string, string];
|
|
452
|
+
/**
|
|
453
|
+
* 值变化回调。
|
|
454
|
+
*/
|
|
455
|
+
onChange?: (value: [string, string]) => void;
|
|
456
|
+
/**
|
|
457
|
+
* 弹层类名。
|
|
458
|
+
*/
|
|
459
|
+
popupClassName?: string;
|
|
460
|
+
/**
|
|
461
|
+
* 范围分隔符。
|
|
462
|
+
*/
|
|
463
|
+
rangeSeparator?: string;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* 基础时间范围选择器。
|
|
467
|
+
*/
|
|
468
|
+
declare const ReactTimeRangePicker: react.ForwardRefExoticComponent<ReactTimeRangePickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
469
|
+
|
|
470
|
+
interface ReactVirtualListRef {
|
|
471
|
+
/**
|
|
472
|
+
* 滚动到指定项。
|
|
473
|
+
*/
|
|
474
|
+
scrollToIndex: (index: number) => void;
|
|
475
|
+
/**
|
|
476
|
+
* 当前滚动容器。
|
|
477
|
+
*/
|
|
478
|
+
element: HTMLDivElement | null;
|
|
479
|
+
}
|
|
480
|
+
interface ReactVirtualListRenderMeta {
|
|
481
|
+
/**
|
|
482
|
+
* 当前项样式。
|
|
483
|
+
*/
|
|
484
|
+
style: CSSProperties;
|
|
485
|
+
}
|
|
486
|
+
interface ReactVirtualListProps<Item> {
|
|
487
|
+
/**
|
|
488
|
+
* 数据项。
|
|
489
|
+
*/
|
|
490
|
+
items: Item[];
|
|
491
|
+
/**
|
|
492
|
+
* 容器高度。
|
|
493
|
+
*/
|
|
494
|
+
height: number;
|
|
495
|
+
/**
|
|
496
|
+
* 单项高度。
|
|
497
|
+
*/
|
|
498
|
+
itemHeight: number;
|
|
499
|
+
/**
|
|
500
|
+
* 是否启用虚拟滚动。
|
|
501
|
+
*/
|
|
502
|
+
virtual?: boolean;
|
|
503
|
+
/**
|
|
504
|
+
* 额外预渲染项数。
|
|
505
|
+
*/
|
|
506
|
+
overscan?: number;
|
|
507
|
+
/**
|
|
508
|
+
* 容器类名。
|
|
509
|
+
*/
|
|
510
|
+
className?: string;
|
|
511
|
+
/**
|
|
512
|
+
* 内层类名。
|
|
513
|
+
*/
|
|
514
|
+
innerClassName?: string;
|
|
515
|
+
/**
|
|
516
|
+
* 容器样式。
|
|
517
|
+
*/
|
|
518
|
+
style?: CSSProperties;
|
|
519
|
+
/**
|
|
520
|
+
* 空状态内容。
|
|
521
|
+
*/
|
|
522
|
+
empty?: ReactNode;
|
|
523
|
+
/**
|
|
524
|
+
* 获取项 key。
|
|
525
|
+
*/
|
|
526
|
+
itemKey: (item: Item, index: number) => string | number;
|
|
527
|
+
/**
|
|
528
|
+
* 渲染项。
|
|
529
|
+
*/
|
|
530
|
+
renderItem: (item: Item, index: number, meta: ReactVirtualListRenderMeta) => ReactNode;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* 通用虚拟列表组件。
|
|
534
|
+
*/
|
|
535
|
+
declare const ReactVirtualList: <Item>(props: ReactVirtualListProps<Item> & {
|
|
536
|
+
ref?: React.ForwardedRef<ReactVirtualListRef>;
|
|
537
|
+
}) => React.JSX.Element;
|
|
538
|
+
|
|
539
|
+
interface ReactYearPickerProps extends Omit<ReactInputProps, "value" | "onChange" | "onPressEnter"> {
|
|
540
|
+
/**
|
|
541
|
+
* 当前年份值。
|
|
542
|
+
*/
|
|
543
|
+
value?: string | number;
|
|
544
|
+
/**
|
|
545
|
+
* 值变化回调。
|
|
546
|
+
*/
|
|
547
|
+
onChange?: (value: string) => void;
|
|
548
|
+
/**
|
|
549
|
+
* 弹层类名。
|
|
550
|
+
*/
|
|
551
|
+
popupClassName?: string;
|
|
552
|
+
/**
|
|
553
|
+
* 是否允许清空。
|
|
554
|
+
*/
|
|
555
|
+
allowClear?: boolean;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* 基础年份选择器。
|
|
559
|
+
*/
|
|
560
|
+
declare const ReactYearPicker: react.ForwardRefExoticComponent<ReactYearPickerProps & react.RefAttributes<HTMLInputElement>>;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* React 基础组件统一类名前缀。
|
|
564
|
+
*/
|
|
565
|
+
declare const REACT_COMPONENT_PREFIX = "canvas-react";
|
|
566
|
+
|
|
567
|
+
export { REACT_COMPONENT_PREFIX, ReactCheckbox, type ReactCheckboxProps, type ReactCheckboxRef, ReactColorPicker, type ReactColorPickerProps, ReactDatePicker, type ReactDatePickerProps, ReactDateRangePicker, type ReactDateRangePickerProps, ReactDateTimePicker, type ReactDateTimePickerProps, ReactDateTimeRangePicker, type ReactDateTimeRangePickerProps, ReactImagePreview, type ReactImagePreviewProps, ReactInput, type ReactInputProps, ReactMonthPicker, type ReactMonthPickerProps, ReactNumberInput, type ReactNumberInputProps, ReactPagination, type ReactPaginationProps, ReactPopup, type ReactPopupProps, ReactQuarterPicker, type ReactQuarterPickerProps, ReactSelect, type ReactSelectOption, type ReactSelectProps, ReactTimePicker, type ReactTimePickerProps, ReactTimeRangePicker, type ReactTimeRangePickerProps, ReactVirtualList, type ReactVirtualListProps, type ReactVirtualListRef, ReactYearPicker, type ReactYearPickerProps };
|