@cregis/ui 1.1.0 → 1.1.4

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.
@@ -6,24 +6,15 @@ import { ComputedRef } from 'vue';
6
6
  import { CSSProperties } from 'vue';
7
7
  import { DefineComponent } from 'vue';
8
8
  import { InjectionKey } from 'vue';
9
- import { Options } from '@popperjs/core';
10
- import { Placement } from '@popperjs/core';
11
9
  import { PublicProps } from 'vue';
12
10
  import { Ref } from 'vue';
13
- import { StringOrNumber } from './types/common';
14
- import { StringOrNumber as StringOrNumber_3 } from '../../types/common';
11
+ import { VNode } from 'vue';
15
12
 
16
13
  declare type Align = 'left' | 'center' | 'right';
17
14
 
18
15
  declare type Align_2 = 'left' | 'center' | 'right';
19
16
 
20
- export declare const Badge: DefineComponent<BadgeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
21
- value: string | number;
22
- type: "info" | "success" | "danger";
23
- hidden: boolean;
24
- max: number;
25
- isDot: boolean;
26
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
17
+ export declare const Badge: WithComponentSlots<typeof _default_11, BadgeSlots>;
27
18
 
28
19
  export declare interface BadgeProps {
29
20
  value?: string | number;
@@ -34,13 +25,13 @@ export declare interface BadgeProps {
34
25
  offset?: [number, number];
35
26
  }
36
27
 
28
+ export declare interface BadgeSlots {
29
+ default?(props?: Record<string, never>): any;
30
+ }
31
+
37
32
  declare type BooleanOrStringOrNumber = boolean | string | number;
38
33
 
39
- export declare const Button: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
40
- type: ButtonType;
41
- size: ButtonSize;
42
- iconType: IconButtonType;
43
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
34
+ export declare const Button: WithComponentSlots<typeof _default_2, ButtonSlots>;
44
35
 
45
36
  export declare interface ButtonProps {
46
37
  type?: ButtonType;
@@ -62,39 +53,28 @@ export declare interface ButtonProps {
62
53
 
63
54
  export declare type ButtonSize = 'extraSmall' | 'small' | 'medium' | 'large';
64
55
 
56
+ export declare interface ButtonSlots {
57
+ default?(props?: Record<string, never>): any;
58
+ icon?(props?: Record<string, never>): any;
59
+ }
60
+
65
61
  export declare type ButtonType = 'primary' | 'secondary' | 'danger' | 'foreground' | 'sameWhite';
66
62
 
67
- export declare const Cascader: DefineComponent<CascaderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
68
- "update:modelValue": (value: StringOrNumber_3) => any;
69
- change: (value: StringOrNumber_3) => any;
70
- "visible-change": (value: boolean) => any;
71
- "filter-input": (value: string) => any;
72
- "filter-clear": () => any;
73
- }, string, PublicProps, Readonly<CascaderProps> & Readonly<{
74
- "onUpdate:modelValue"?: (value: StringOrNumber_3) => any;
75
- onChange?: (value: StringOrNumber_3) => any;
76
- "onVisible-change"?: (value: boolean) => any;
77
- "onFilter-input"?: (value: string) => any;
78
- "onFilter-clear"?: () => any;
79
- }>, {
80
- type: "plain" | "default" | "noBorder";
81
- size: "small" | "medium" | "large" | "extraSmall";
82
- maxPopperHeight: StringOrNumber_3;
83
- offset: [number, number];
84
- options: CascaderRootOption[];
85
- align: "left" | "right" | "center";
86
- filterDebounceMs: number;
87
- noDataText: string;
88
- noMatchText: string;
89
- triggerWidth: StringOrNumber_3;
90
- searchText: string;
91
- subPopperWidth: StringOrNumber_3;
92
- showSubOptionAmount: boolean;
93
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
63
+ export declare const Cascader: WithComponentSlots<typeof _default_9, CascaderSlots>;
64
+
65
+ export declare interface CascaderBaseSlotProps {
66
+ modelValue?: StringOrNumber;
67
+ selectedLabel: string;
68
+ level: CascaderSelectionLevel;
69
+ primaryOption?: CascaderRootOption;
70
+ subOption?: CascaderSubOption;
71
+ placeholder?: string;
72
+ hasSelection: boolean;
73
+ }
94
74
 
95
75
  export declare interface CascaderEmits {
96
- (e: 'update:modelValue', value: StringOrNumber_3): void;
97
- (e: 'change', value: StringOrNumber_3): void;
76
+ (e: 'update:modelValue', value: StringOrNumber): void;
77
+ (e: 'change', value: StringOrNumber): void;
98
78
  (e: 'visible-change', value: boolean): void;
99
79
  (e: 'filter-input', value: string): void;
100
80
  (e: 'filter-clear'): void;
@@ -102,7 +82,7 @@ export declare interface CascaderEmits {
102
82
 
103
83
  export declare interface CascaderProps {
104
84
  /** 选中的 option `value`(一级或二级) */
105
- modelValue?: StringOrNumber_3;
85
+ modelValue?: StringOrNumber;
106
86
  options?: CascaderRootOption[];
107
87
  type?: Type_3;
108
88
  size?: Size_2;
@@ -113,12 +93,12 @@ export declare interface CascaderProps {
113
93
  filterDebounceMs?: number;
114
94
  noDataText?: string;
115
95
  noMatchText?: string;
116
- triggerWidth?: StringOrNumber_3;
117
- popperWidth?: StringOrNumber_3;
96
+ triggerWidth?: StringOrNumber;
97
+ popperWidth?: StringOrNumber;
118
98
  /** 二级 Popover 宽度,默认 200px */
119
- subPopperWidth?: StringOrNumber_3;
99
+ subPopperWidth?: StringOrNumber;
120
100
  /** 一级下拉列表最大高度(纵向滚动);默认 300px,作用于内层容器而非 Popover 根节点,以免与横向溢出策略冲突影响二级菜单 flip */
121
- maxPopperHeight?: StringOrNumber_3;
101
+ maxPopperHeight?: StringOrNumber;
122
102
  /** 一级下拉相对触发器的 Popper 偏移 `[skidding, distance]`,与 Popover 一致 */
123
103
  offset?: [number, number];
124
104
  showSubOptionAmount?: boolean;
@@ -128,7 +108,7 @@ export declare interface CascaderProps {
128
108
  /** 一级选项;有 `children` 且非空时用 Popover 展开二级 */
129
109
  export declare interface CascaderRootOption {
130
110
  label: string;
131
- value: StringOrNumber_3;
111
+ value: StringOrNumber;
132
112
  disabled?: boolean;
133
113
  filterText?: string;
134
114
  children?: CascaderSubOption[];
@@ -142,25 +122,39 @@ export declare interface CascaderScrollPayload {
142
122
  /** 当前选中项所在层级:0 未选;1 一级;2 二级 */
143
123
  export declare type CascaderSelectionLevel = 0 | 1 | 2;
144
124
 
125
+ export declare interface CascaderSlots {
126
+ trigger?(props: CascaderBaseSlotProps & {
127
+ open: boolean;
128
+ disabled: boolean;
129
+ }): any;
130
+ label?(props: CascaderBaseSlotProps): any;
131
+ option?(props: CascaderBaseSlotProps & {
132
+ option: CascaderRootOption;
133
+ index: number;
134
+ disabled: boolean;
135
+ selected: boolean;
136
+ isParentOfSelected: boolean;
137
+ }): any;
138
+ subOption?(props: CascaderBaseSlotProps & {
139
+ option: CascaderSubOption;
140
+ index: number;
141
+ parent: CascaderRootOption;
142
+ parentIndex: number;
143
+ selected: boolean;
144
+ disabled: boolean;
145
+ }): any;
146
+ }
147
+
145
148
  /** 二级选项 */
146
149
  export declare interface CascaderSubOption {
147
150
  label: string;
148
- value: StringOrNumber_3;
151
+ value: StringOrNumber;
149
152
  disabled?: boolean;
150
153
  /** 参与过滤的文本,默认等于 `label` */
151
154
  filterText?: string;
152
155
  }
153
156
 
154
- export declare const Checkbox: DefineComponent<CheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
155
- "update:modelValue": (value: number | boolean) => any;
156
- change: (value: number | boolean) => any;
157
- }, string, PublicProps, Readonly<CheckboxProps> & Readonly<{
158
- "onUpdate:modelValue"?: (value: number | boolean) => any;
159
- onChange?: (value: number | boolean) => any;
160
- }>, {
161
- disabled: boolean;
162
- modelValue: boolean | number;
163
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
157
+ export declare const Checkbox: WithComponentSlots<typeof _default_3, CheckboxSlots>;
164
158
 
165
159
  export declare interface CheckboxEmits {
166
160
  (e: 'update:modelValue', value: boolean | number): void;
@@ -175,6 +169,10 @@ export declare interface CheckboxProps {
175
169
  indeterminate?: boolean;
176
170
  }
177
171
 
172
+ export declare interface CheckboxSlots {
173
+ default?(props?: Record<string, never>): any;
174
+ }
175
+
178
176
  export declare interface ClickOutsideOptions {
179
177
  /** 忽略的元素列表,点击这些元素内部不会触发回调(如触发弹窗的按钮) */
180
178
  ignore?: ClickOutsideTarget[];
@@ -232,7 +230,49 @@ declare interface CregisTableProps {
232
230
 
233
231
  export declare type DataItem = Record<string, any>;
234
232
 
235
- declare const _default: DefineComponent<DialogProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
233
+ declare const _default: DefineComponent<InputProps, {
234
+ focus: () => Promise<void>;
235
+ updateTextWidth: () => void;
236
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
237
+ input: (value: string | number) => any;
238
+ "update:modelValue": (value: string | number) => any;
239
+ change: (value: string | number) => any;
240
+ focus: (value: FocusEvent) => any;
241
+ blur: (value: FocusEvent) => any;
242
+ clear: () => any;
243
+ }, string, PublicProps, Readonly<InputProps> & Readonly<{
244
+ onInput?: (value: string | number) => any;
245
+ "onUpdate:modelValue"?: (value: string | number) => any;
246
+ onChange?: (value: string | number) => any;
247
+ onFocus?: (value: FocusEvent) => any;
248
+ onBlur?: (value: FocusEvent) => any;
249
+ onClear?: () => any;
250
+ }>, {
251
+ type: "text" | "number" | "textarea";
252
+ size: "small" | "medium" | "large";
253
+ width: string;
254
+ placeholder: string;
255
+ rows: number;
256
+ nonNegative: boolean;
257
+ pasteText: string;
258
+ clearText: string;
259
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
260
+
261
+ declare const _default_10: DefineComponent<TagProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TagProps> & Readonly<{}>, {
262
+ type: "danger" | "sameWhite" | "solid" | "success" | "invalid" | "warning" | "subtle" | "gray" | "strokeSubtle" | "strokeSolid" | "ready" | "apricot" | "khaki" | "grass" | "sage" | "cyan" | "iceBlue" | "periwinkle" | "lilac" | "orchid" | "mallow" | "rose" | "coral" | "mauve" | "moss" | "steel" | "grape" | "lime" | "amlDanger";
263
+ size: TagSize;
264
+ palette: boolean;
265
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
266
+
267
+ declare const _default_11: DefineComponent<BadgeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
268
+ value: string | number;
269
+ type: "info" | "success" | "danger";
270
+ hidden: boolean;
271
+ max: number;
272
+ isDot: boolean;
273
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
274
+
275
+ declare const _default_12: DefineComponent<DialogProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
236
276
  "update:modelValue": (visible: boolean) => any;
237
277
  "after-leave": () => any;
238
278
  }, string, PublicProps, Readonly<DialogProps> & Readonly<{
@@ -249,9 +289,164 @@ declare const _default: DefineComponent<DialogProps, {}, {}, {}, {}, ComponentOp
249
289
  lockScroll: boolean;
250
290
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
251
291
 
292
+ declare const _default_13: DefineComponent<TimelineProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TimelineProps> & Readonly<{}>, {
293
+ dotSize: number | string;
294
+ lineWidth: number | string;
295
+ iconSize: number | string;
296
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
297
+
298
+ declare const _default_14: DefineComponent<TimelineItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
299
+ status: TimelineItemStatus;
300
+ contentHoverable: boolean;
301
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
302
+
303
+ declare const _default_15: DefineComponent<CregisTableProps, {
304
+ selectMode: Ref<boolean>;
305
+ openSelect: () => void;
306
+ closeSelect: () => void;
307
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
308
+ "row-click": (...args: any[]) => void;
309
+ "update:selected-list": (...args: any[]) => void;
310
+ "selected-change": (...args: any[]) => void;
311
+ "select-close": (...args: any[]) => void;
312
+ }, string, PublicProps, Readonly<CregisTableProps> & Readonly<{
313
+ "onRow-click"?: (...args: any[]) => any;
314
+ "onUpdate:selected-list"?: (...args: any[]) => any;
315
+ "onSelected-change"?: (...args: any[]) => any;
316
+ "onSelect-close"?: (...args: any[]) => any;
317
+ }>, {
318
+ columnHeight: number;
319
+ headerHeight: number;
320
+ bottomPadding: number;
321
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
322
+
323
+ declare const _default_16: DefineComponent<TableListColumnProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
324
+ selectChange: (...args: any[]) => void;
325
+ }, string, PublicProps, Readonly<TableListColumnProps> & Readonly<{
326
+ onSelectChange?: (...args: any[]) => any;
327
+ }>, {
328
+ type: "default" | "select";
329
+ hidden: boolean;
330
+ align: "left" | "center" | "right";
331
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
332
+
333
+ declare const _default_2: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
334
+ type: ButtonType;
335
+ size: ButtonSize;
336
+ iconType: IconButtonType;
337
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
338
+
339
+ declare const _default_3: DefineComponent<CheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
340
+ "update:modelValue": (value: number | boolean) => any;
341
+ change: (value: number | boolean) => any;
342
+ }, string, PublicProps, Readonly<CheckboxProps> & Readonly<{
343
+ "onUpdate:modelValue"?: (value: number | boolean) => any;
344
+ onChange?: (value: number | boolean) => any;
345
+ }>, {
346
+ disabled: boolean;
347
+ modelValue: boolean | number;
348
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
349
+
350
+ declare const _default_4: DefineComponent<RadioProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
351
+ "update:modelValue": (value: RadioValue) => any;
352
+ change: (value: RadioValue) => any;
353
+ }, string, PublicProps, Readonly<RadioProps> & Readonly<{
354
+ "onUpdate:modelValue"?: (value: RadioValue) => any;
355
+ onChange?: (value: RadioValue) => any;
356
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
357
+
358
+ declare const _default_5: DefineComponent<TabsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
359
+ "update:modelValue": (name: string | number) => any;
360
+ }, string, PublicProps, Readonly<TabsProps> & Readonly<{
361
+ "onUpdate:modelValue"?: (name: string | number) => any;
362
+ }>, {
363
+ type: "default" | "card";
364
+ size: TabSize;
365
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
366
+
367
+ declare const _default_6: DefineComponent<PopoverProps, {
368
+ isOpen: Ref<boolean>;
369
+ open: () => void;
370
+ close: () => void;
371
+ update: () => void;
372
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
373
+ scroll: (payload: PopoverScrollPayload) => any;
374
+ "visible-change": (value: boolean) => any;
375
+ "click-outside": (value: boolean) => any;
376
+ }, string, PublicProps, Readonly<PopoverProps> & Readonly<{
377
+ onScroll?: (payload: PopoverScrollPayload) => any;
378
+ "onVisible-change"?: (value: boolean) => any;
379
+ "onClick-outside"?: (value: boolean) => any;
380
+ }>, {
381
+ disabled: boolean;
382
+ teleported: boolean;
383
+ preserveContentMount: boolean;
384
+ trigger: "hover" | "click";
385
+ placement: Placement;
386
+ manual: boolean;
387
+ openDelay: number;
388
+ closeDelay: number;
389
+ offset: [number, number];
390
+ padding: string | number;
391
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
392
+
393
+ declare const _default_7: DefineComponent<SelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
394
+ "update:modelValue": (value: StringOrNumber | StringOrNumber[]) => any;
395
+ change: (value: StringOrNumber | StringOrNumber[]) => any;
396
+ "visible-change": (value: boolean) => any;
397
+ "filter-input": (value: string) => any;
398
+ "filter-clear": () => any;
399
+ }, string, PublicProps, Readonly<SelectProps> & Readonly<{
400
+ "onUpdate:modelValue"?: (value: StringOrNumber | StringOrNumber[]) => any;
401
+ onChange?: (value: StringOrNumber | StringOrNumber[]) => any;
402
+ "onVisible-change"?: (value: boolean) => any;
403
+ "onFilter-input"?: (value: string) => any;
404
+ "onFilter-clear"?: () => any;
405
+ }>, {
406
+ type: "plain" | "default" | "noBorder";
407
+ size: "small" | "medium" | "large" | "extraSmall";
408
+ placeholder: string;
409
+ align: "left" | "right" | "center";
410
+ filterDebounceMs: number;
411
+ noDataText: string;
412
+ noMatchText: string;
413
+ triggerWidth: StringOrNumber;
414
+ searchText: string;
415
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
416
+
417
+ declare const _default_8: DefineComponent<OptionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<OptionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
418
+
419
+ declare const _default_9: DefineComponent<CascaderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
420
+ "update:modelValue": (value: StringOrNumber) => any;
421
+ change: (value: StringOrNumber) => any;
422
+ "visible-change": (value: boolean) => any;
423
+ "filter-input": (value: string) => any;
424
+ "filter-clear": () => any;
425
+ }, string, PublicProps, Readonly<CascaderProps> & Readonly<{
426
+ "onUpdate:modelValue"?: (value: StringOrNumber) => any;
427
+ onChange?: (value: StringOrNumber) => any;
428
+ "onVisible-change"?: (value: boolean) => any;
429
+ "onFilter-input"?: (value: string) => any;
430
+ "onFilter-clear"?: () => any;
431
+ }>, {
432
+ type: "plain" | "default" | "noBorder";
433
+ size: "small" | "medium" | "large" | "extraSmall";
434
+ options: CascaderRootOption[];
435
+ maxPopperHeight: StringOrNumber;
436
+ offset: [number, number];
437
+ align: "left" | "right" | "center";
438
+ filterDebounceMs: number;
439
+ noDataText: string;
440
+ noMatchText: string;
441
+ triggerWidth: StringOrNumber;
442
+ searchText: string;
443
+ subPopperWidth: StringOrNumber;
444
+ showSubOptionAmount: boolean;
445
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
446
+
252
447
  export declare const Dialog: DialogComponent;
253
448
 
254
- declare type DialogComponent = typeof _default & {
449
+ declare type DialogComponent = WithComponentSlots<typeof _default_12, DialogSlots> & {
255
450
  install: (app: App) => void;
256
451
  confirm: typeof confirm_2;
257
452
  };
@@ -272,6 +467,10 @@ export declare interface DialogProps {
272
467
  lockScroll?: boolean;
273
468
  }
274
469
 
470
+ export declare interface DialogSlots {
471
+ default?(props?: Record<string, never>): any;
472
+ }
473
+
275
474
  export declare const Divider: DefineComponent<DividerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DividerProps> & Readonly<{}>, {
276
475
  direction: "horizontal" | "vertical";
277
476
  borderStyle: "solid" | "dashed" | "dotted";
@@ -289,37 +488,24 @@ export declare interface DividerProps {
289
488
  length?: string;
290
489
  }
291
490
 
491
+ /**
492
+ * 插槽补全依赖 Volar 的 `new Comp({})` 实例上的 `$slots`。
493
+ *
494
+ * 不能写成 `C & { new(): { $slots } }`:两个构造函数的实例会交叉,
495
+ * Vue 自带的 `$slots` 字符串索引会留下来,`#` 弹不出具名插槽。
496
+ * 也不能用 `C extends ... ? ...`:检查能过,补全展开不了。
497
+ *
498
+ * 这里只保留一个构造函数,并用映射类型去掉原来的 `$slots`,只挂具名插槽。
499
+ */
500
+ declare type DropIndexSignature<S> = {
501
+ [K in keyof S as string extends K ? never : number extends K ? never : K]: S[K];
502
+ };
503
+
292
504
  export declare const getDialogZIndex: () => number;
293
505
 
294
506
  export declare type IconButtonType = 'rectangle' | 'square' | 'circle' | 'professional';
295
507
 
296
- export declare const Input: DefineComponent<InputProps, {
297
- focus: () => Promise<void>;
298
- updateTextWidth: () => void;
299
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
300
- input: (value: string | number) => any;
301
- "update:modelValue": (value: string | number) => any;
302
- change: (value: string | number) => any;
303
- focus: (value: FocusEvent) => any;
304
- blur: (value: FocusEvent) => any;
305
- clear: () => any;
306
- }, string, PublicProps, Readonly<InputProps> & Readonly<{
307
- onInput?: (value: string | number) => any;
308
- "onUpdate:modelValue"?: (value: string | number) => any;
309
- onChange?: (value: string | number) => any;
310
- onFocus?: (value: FocusEvent) => any;
311
- onBlur?: (value: FocusEvent) => any;
312
- onClear?: () => any;
313
- }>, {
314
- type: "text" | "number" | "textarea";
315
- size: "small" | "medium" | "large";
316
- width: string;
317
- placeholder: string;
318
- rows: number;
319
- nonNegative: boolean;
320
- pasteText: string;
321
- clearText: string;
322
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
508
+ export declare const Input: WithComponentSlots<typeof _default, InputSlots>;
323
509
 
324
510
  export declare interface InputEmits {
325
511
  (e: 'update:modelValue', value: StringOrNumber_2): void;
@@ -351,6 +537,15 @@ export declare interface InputProps {
351
537
  clearText?: string;
352
538
  }
353
539
 
540
+ export declare interface InputSlots {
541
+ prefix?(props?: Record<string, never>): any;
542
+ suffix?(props?: Record<string, never>): any;
543
+ }
544
+
545
+ declare type InstanceWithoutSlots<I> = {
546
+ [K in keyof I as K extends '$slots' ? never : K]: I[K];
547
+ };
548
+
354
549
  export declare const isElementMeasurable: (el: {
355
550
  isConnected: boolean;
356
551
  offsetWidth: number;
@@ -398,42 +593,30 @@ export declare interface NotificationProps {
398
593
  onVanish?: () => void;
399
594
  }
400
595
 
401
- declare const Option_2: DefineComponent<OptionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<OptionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
596
+ declare const Option_2: WithComponentSlots<typeof _default_8, OptionSlots>;
402
597
  export { Option_2 as Option }
403
598
 
404
599
  export declare interface OptionProps {
405
600
  label: string;
406
- value: StringOrNumber_3;
601
+ value: StringOrNumber;
407
602
  disabled?: boolean;
408
603
  /** 参与过滤的文本,默认等于 `label`;自定义插槽展示时可用拼音、别名等扩展搜索 */
409
604
  filterText?: string;
410
605
  }
411
606
 
412
- export declare const Popover: DefineComponent<PopoverProps, {
413
- isOpen: Ref<boolean>;
414
- open: () => void;
415
- close: () => void;
416
- update: () => void;
417
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
418
- scroll: (payload: PopoverScrollPayload) => any;
419
- "visible-change": (value: boolean) => any;
420
- "click-outside": (value: boolean) => any;
421
- }, string, PublicProps, Readonly<PopoverProps> & Readonly<{
422
- onScroll?: (payload: PopoverScrollPayload) => any;
423
- "onVisible-change"?: (value: boolean) => any;
424
- "onClick-outside"?: (value: boolean) => any;
425
- }>, {
426
- disabled: boolean;
427
- teleported: boolean;
428
- preserveContentMount: boolean;
429
- trigger: "hover" | "click";
430
- placement: Placement;
431
- manual: boolean;
432
- openDelay: number;
433
- closeDelay: number;
434
- offset: [number, number];
435
- padding: string | number;
436
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
607
+ export declare interface OptionSlots {
608
+ default?(props: {
609
+ label: string;
610
+ value: StringOrNumber;
611
+ disabled: boolean;
612
+ selected: boolean;
613
+ }): any;
614
+ }
615
+
616
+ /** 与 @popperjs/core Placement 对齐,本地声明以免公共 d.ts 依赖该包 */
617
+ export declare type Placement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
618
+
619
+ export declare const Popover: WithComponentSlots<typeof _default_6, PopoverSlots>;
437
620
 
438
621
  export declare interface PopoverEmits {
439
622
  (e: 'visible-change', value: boolean): void;
@@ -449,6 +632,21 @@ export declare interface PopoverInstance {
449
632
  update: () => void;
450
633
  }
451
634
 
635
+ export declare interface PopoverPopperModifier {
636
+ name: string;
637
+ enabled?: boolean;
638
+ options?: Record<string, unknown>;
639
+ [key: string]: unknown;
640
+ }
641
+
642
+ /** createPopper options 的公开子集,避免把 @popperjs/core 写进发布类型 */
643
+ export declare interface PopoverPopperOptions {
644
+ placement?: Placement;
645
+ strategy?: 'absolute' | 'fixed';
646
+ modifiers?: PopoverPopperModifier[];
647
+ onFirstUpdate?: (...args: unknown[]) => void;
648
+ }
649
+
452
650
  export declare interface PopoverProps {
453
651
  /** 是否将浮层 Teleport 到 body,避免被父级 overflow 裁切 */
454
652
  teleported?: boolean;
@@ -458,7 +656,7 @@ export declare interface PopoverProps {
458
656
  manual?: boolean;
459
657
  disabled?: boolean;
460
658
  /** 与默认 strategy/offset/flip 等按 modifier name 合并后再传给 createPopper */
461
- popoverOptions?: Partial<Options>;
659
+ popoverOptions?: PopoverPopperOptions;
462
660
  openDelay?: number;
463
661
  closeDelay?: number;
464
662
  popperWidth?: string | number;
@@ -472,6 +670,11 @@ export declare interface PopoverScrollPayload {
472
670
  scrollLeft: number;
473
671
  }
474
672
 
673
+ export declare interface PopoverSlots {
674
+ default?(props?: Record<string, never>): any;
675
+ reference?(props?: Record<string, never>): any;
676
+ }
677
+
475
678
  export declare const Progress: DefineComponent<ProgressProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
476
679
  loading: boolean;
477
680
  strokeWidth: number;
@@ -486,13 +689,7 @@ export declare interface ProgressProps {
486
689
  loading?: boolean;
487
690
  }
488
691
 
489
- export declare const Radio: DefineComponent<RadioProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
490
- "update:modelValue": (value: RadioValue) => any;
491
- change: (value: RadioValue) => any;
492
- }, string, PublicProps, Readonly<RadioProps> & Readonly<{
493
- "onUpdate:modelValue"?: (value: RadioValue) => any;
494
- onChange?: (value: RadioValue) => any;
495
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
692
+ export declare const Radio: WithComponentSlots<typeof _default_4, RadioSlots>;
496
693
 
497
694
  export declare interface RadioEmits {
498
695
  (e: 'update:modelValue', value: RadioValue): void;
@@ -506,49 +703,31 @@ export declare interface RadioProps {
506
703
  disabled?: boolean;
507
704
  }
508
705
 
706
+ export declare interface RadioSlots {
707
+ default?(props?: Record<string, never>): any;
708
+ }
709
+
509
710
  export declare type RadioValue = boolean | string | number;
510
711
 
511
712
  export declare const resolveTextOverflow: (metrics: TextOverflowMetrics, axis?: TextOverflowAxis, threshold?: number) => TextOverflowState;
512
713
 
513
- export declare const Select: DefineComponent<SelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
514
- "update:modelValue": (value: StringOrNumber_3 | StringOrNumber_3[]) => any;
515
- change: (value: StringOrNumber_3 | StringOrNumber_3[]) => any;
516
- "visible-change": (value: boolean) => any;
517
- "filter-input": (value: string) => any;
518
- "filter-clear": () => any;
519
- }, string, PublicProps, Readonly<SelectProps> & Readonly<{
520
- "onUpdate:modelValue"?: (value: StringOrNumber_3 | StringOrNumber_3[]) => any;
521
- onChange?: (value: StringOrNumber_3 | StringOrNumber_3[]) => any;
522
- "onVisible-change"?: (value: boolean) => any;
523
- "onFilter-input"?: (value: string) => any;
524
- "onFilter-clear"?: () => any;
525
- }>, {
526
- type: "plain" | "default" | "noBorder";
527
- size: "small" | "medium" | "large" | "extraSmall";
528
- placeholder: string;
529
- align: "left" | "right" | "center";
530
- filterDebounceMs: number;
531
- noDataText: string;
532
- noMatchText: string;
533
- triggerWidth: StringOrNumber_3;
534
- searchText: string;
535
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
714
+ export declare const Select: WithComponentSlots<typeof _default_7, SelectSlots>;
536
715
 
537
716
  export declare type SelectAllMode = 'none' | 'some' | 'all';
538
717
 
539
718
  export declare interface SelectContext {
540
- modelValue: ComputedRef<StringOrNumber_3 | StringOrNumber_3[] | undefined>;
719
+ modelValue: ComputedRef<StringOrNumber | StringOrNumber[] | undefined>;
541
720
  multiple: ComputedRef<boolean>;
542
721
  disabled: ComputedRef<boolean>;
543
- selectOption: (value: StringOrNumber_3, label: string) => void;
544
- isOptionSelected: (value: StringOrNumber_3) => boolean;
545
- registerOption: (value: StringOrNumber_3, label: string, searchText?: string) => () => void;
722
+ selectOption: (value: StringOrNumber, label: string) => void;
723
+ isOptionSelected: (value: StringOrNumber) => boolean;
724
+ registerOption: (value: StringOrNumber, label: string, searchText?: string) => () => void;
546
725
  filterQuery: ComputedRef<string>;
547
726
  }
548
727
 
549
728
  export declare interface SelectEmits {
550
- (e: 'update:modelValue', value: StringOrNumber_3 | StringOrNumber_3[]): void;
551
- (e: 'change', value: StringOrNumber_3 | StringOrNumber_3[]): void;
729
+ (e: 'update:modelValue', value: StringOrNumber | StringOrNumber[]): void;
730
+ (e: 'change', value: StringOrNumber | StringOrNumber[]): void;
552
731
  (e: 'visible-change', value: boolean): void;
553
732
  (e: 'filter-input', value: string): void;
554
733
  (e: 'filter-clear'): void;
@@ -556,8 +735,16 @@ export declare interface SelectEmits {
556
735
 
557
736
  export declare const selectInjectKey: InjectionKey<SelectContext>;
558
737
 
738
+ export declare interface SelectLabelSlotProps {
739
+ modelValue?: StringOrNumber | StringOrNumber[];
740
+ displayText: string;
741
+ selectedCount: number;
742
+ placeholder?: string;
743
+ hasSelection: boolean;
744
+ }
745
+
559
746
  export declare interface SelectProps {
560
- modelValue?: StringOrNumber_3 | StringOrNumber_3[];
747
+ modelValue?: StringOrNumber | StringOrNumber[];
561
748
  type?: Type_2;
562
749
  size?: Size;
563
750
  align?: Align;
@@ -569,9 +756,9 @@ export declare interface SelectProps {
569
756
  noDataText?: string;
570
757
  /** 可搜索时无匹配项的提示 */
571
758
  noMatchText?: string;
572
- triggerWidth?: StringOrNumber_3;
573
- popperWidth?: StringOrNumber_3;
574
- maxPopperHeight?: StringOrNumber_3;
759
+ triggerWidth?: StringOrNumber;
760
+ popperWidth?: StringOrNumber;
761
+ maxPopperHeight?: StringOrNumber;
575
762
  searchText?: string;
576
763
  multiple?: boolean;
577
764
  }
@@ -581,6 +768,11 @@ export declare interface SelectScrollPayload {
581
768
  scrollLeft: number;
582
769
  }
583
770
 
771
+ export declare interface SelectSlots {
772
+ default?(props?: Record<string, never>): any;
773
+ label?(props: SelectLabelSlotProps): any;
774
+ }
775
+
584
776
  export declare const setCregisUILocale: (lang: LanguageKey) => void;
585
777
 
586
778
  export declare const setDialogZIndex: (_zIndex: number) => void;
@@ -591,7 +783,7 @@ declare type Size_2 = 'large' | 'medium' | 'small' | 'extraSmall';
591
783
 
592
784
  export declare type SortValue = 1 | 2 | '';
593
785
 
594
- export { StringOrNumber }
786
+ export declare type StringOrNumber = string | number;
595
787
 
596
788
  declare type StringOrNumber_2 = string | number;
597
789
 
@@ -623,35 +815,9 @@ export declare interface SwitchProps {
623
815
  beforeChange?: () => boolean | Promise<boolean>;
624
816
  }
625
817
 
626
- export declare const TableList: DefineComponent<CregisTableProps, {
627
- selectMode: Ref<boolean>;
628
- openSelect: () => void;
629
- closeSelect: () => void;
630
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
631
- "row-click": (...args: any[]) => void;
632
- "update:selected-list": (...args: any[]) => void;
633
- "selected-change": (...args: any[]) => void;
634
- "select-close": (...args: any[]) => void;
635
- }, string, PublicProps, Readonly<CregisTableProps> & Readonly<{
636
- "onRow-click"?: (...args: any[]) => any;
637
- "onUpdate:selected-list"?: (...args: any[]) => any;
638
- "onSelected-change"?: (...args: any[]) => any;
639
- "onSelect-close"?: (...args: any[]) => any;
640
- }>, {
641
- columnHeight: number;
642
- headerHeight: number;
643
- bottomPadding: number;
644
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
818
+ export declare const TableList: WithComponentSlots<typeof _default_15, TableListSlots>;
645
819
 
646
- export declare const TableListColumn: DefineComponent<TableListColumnProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
647
- selectChange: (...args: any[]) => void;
648
- }, string, PublicProps, Readonly<TableListColumnProps> & Readonly<{
649
- onSelectChange?: (...args: any[]) => any;
650
- }>, {
651
- type: "default" | "select";
652
- hidden: boolean;
653
- align: "left" | "center" | "right";
654
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
820
+ export declare const TableListColumn: WithComponentSlots<typeof _default_16, TableListColumnSlots>;
655
821
 
656
822
  declare interface TableListColumnProps {
657
823
  data?: DataItem;
@@ -671,6 +837,13 @@ declare interface TableListColumnProps {
671
837
  hidden?: boolean;
672
838
  }
673
839
 
840
+ export declare interface TableListColumnSlots {
841
+ default?(props: {
842
+ data: Record<string, any>;
843
+ }): any;
844
+ header?(props?: Record<string, never>): any;
845
+ }
846
+
674
847
  export declare interface TableListInstance {
675
848
  /** 是否开启批量选择模式 */
676
849
  selectMode: Ref<boolean>;
@@ -678,6 +851,11 @@ export declare interface TableListInstance {
678
851
  closeSelect: () => void;
679
852
  }
680
853
 
854
+ export declare interface TableListSlots {
855
+ default?(props?: Record<string, never>): VNode[];
856
+ operation?(props?: Record<string, never>): VNode[];
857
+ }
858
+
681
859
  export declare const TabPane: DefineComponent<TabPaneProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TabPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
682
860
 
683
861
  export declare interface TabPaneProps {
@@ -685,14 +863,7 @@ export declare interface TabPaneProps {
685
863
  name: string | number;
686
864
  }
687
865
 
688
- export declare const Tabs: DefineComponent<TabsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
689
- "update:modelValue": (name: string | number) => any;
690
- }, string, PublicProps, Readonly<TabsProps> & Readonly<{
691
- "onUpdate:modelValue"?: (name: string | number) => any;
692
- }>, {
693
- type: "default" | "card";
694
- size: TabSize;
695
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
866
+ export declare const Tabs: WithComponentSlots<typeof _default_5, TabsSlots>;
696
867
 
697
868
  export declare const TABS_KEY: InjectionKey<TabsContext>;
698
869
 
@@ -714,11 +885,11 @@ export declare interface TabsProps {
714
885
  size?: TabSize;
715
886
  }
716
887
 
717
- export declare const Tag: DefineComponent<TagProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TagProps> & Readonly<{}>, {
718
- type: "danger" | "sameWhite" | "solid" | "success" | "invalid" | "warning" | "subtle" | "gray" | "strokeSubtle" | "strokeSolid" | "ready" | "apricot" | "khaki" | "grass" | "sage" | "cyan" | "iceBlue" | "periwinkle" | "lilac" | "orchid" | "mallow" | "rose" | "coral" | "mauve" | "moss" | "steel" | "grape" | "lime" | "amlDanger";
719
- size: TagSize;
720
- palette: boolean;
721
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
888
+ export declare interface TabsSlots {
889
+ default?(props?: Record<string, never>): any;
890
+ }
891
+
892
+ export declare const Tag: WithComponentSlots<typeof _default_10, TagSlots>;
722
893
 
723
894
  export declare type TagProps = {
724
895
  type?: TagType;
@@ -730,6 +901,10 @@ export declare type TagProps = {
730
901
 
731
902
  export declare type TagSize = 'small' | 'medium' | 'large';
732
903
 
904
+ export declare interface TagSlots {
905
+ default?(props?: Record<string, never>): any;
906
+ }
907
+
733
908
  declare type TagType = 'subtle' | 'solid' | 'gray' | 'strokeSubtle' | 'strokeSolid' | 'danger' | 'warning' | 'success' | 'ready' | 'invalid' | 'apricot' | 'khaki' | 'grass' | 'sage' | 'cyan' | 'iceBlue' | 'periwinkle' | 'lilac' | 'orchid' | 'mallow' | 'rose' | 'coral' | 'mauve' | 'moss' | 'steel' | 'grape' | 'sameWhite' | 'lime' | 'amlDanger';
734
909
 
735
910
  export declare type TextOverflowAxis = 'horizontal' | 'vertical' | 'both';
@@ -747,11 +922,7 @@ export declare interface TextOverflowState {
747
922
  overflow: boolean;
748
923
  }
749
924
 
750
- export declare const Timeline: DefineComponent<TimelineProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TimelineProps> & Readonly<{}>, {
751
- dotSize: number | string;
752
- lineWidth: number | string;
753
- iconSize: number | string;
754
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
925
+ export declare const Timeline: WithComponentSlots<typeof _default_13, TimelineSlots>;
755
926
 
756
927
  export declare const TIMELINE_KEY: InjectionKey<TimelineContext>;
757
928
 
@@ -776,10 +947,7 @@ export declare interface TimelineContext {
776
947
  iconSize: Ref<number | string>;
777
948
  }
778
949
 
779
- export declare const TimelineItem: DefineComponent<TimelineItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
780
- status: TimelineItemStatus;
781
- contentHoverable: boolean;
782
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
950
+ export declare const TimelineItem: WithComponentSlots<typeof _default_14, TimelineItemSlots>;
783
951
 
784
952
  export declare interface TimelineItemProps {
785
953
  /** 节点状态:finished 已完成 / pending 待处理 / not-started 未开始 / rejected 已驳回 / withdrawn 已撤回,默认 not-started */
@@ -794,6 +962,11 @@ export declare interface TimelineItemProps {
794
962
  contentHoverable?: boolean;
795
963
  }
796
964
 
965
+ export declare interface TimelineItemSlots {
966
+ default?(props?: Record<string, never>): any;
967
+ title?(props?: Record<string, never>): any;
968
+ }
969
+
797
970
  export declare type TimelineItemStatus = 'finished' | 'pending' | 'not-started' | 'rejected' | 'withdrawn';
798
971
 
799
972
  export declare interface TimelineProps {
@@ -805,6 +978,10 @@ export declare interface TimelineProps {
805
978
  iconSize?: number | string;
806
979
  }
807
980
 
981
+ export declare interface TimelineSlots {
982
+ default?(props?: Record<string, never>): any;
983
+ }
984
+
808
985
  export declare type Type = 'primary' | 'info' | 'success' | 'warning' | 'danger';
809
986
 
810
987
  declare type Type_2 = 'default' | 'plain' | 'noBorder';
@@ -905,4 +1082,12 @@ export declare interface UseTextOverflowReturn {
905
1082
  stop: () => void;
906
1083
  }
907
1084
 
1085
+ export declare type WithComponentSlots<C extends abstract new (...args: any) => any, S extends Record<string, any>> = {
1086
+ new (...args: ConstructorParameters<C>): InstanceWithoutSlots<InstanceType<C>> & {
1087
+ $slots: DropIndexSignature<S>;
1088
+ };
1089
+ } & {
1090
+ [K in keyof C]: C[K];
1091
+ };
1092
+
908
1093
  export { }