@cyberpunk-vue/components 1.9.2 → 1.9.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.
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2932 -2878
- package/dist/popover/index.d.ts +409 -2
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/src/popover.d.ts +41 -2
- package/dist/popover/src/popover.d.ts.map +1 -1
- package/dist/popover/src/popover.vue.d.ts +22 -3
- package/dist/popover/src/popover.vue.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/popover/index.d.ts
CHANGED
|
@@ -1,5 +1,412 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const CpPopover: import('../utils').SFCWithInstall<{
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: BooleanConstructor;
|
|
5
|
+
readonly default: undefined;
|
|
6
|
+
};
|
|
7
|
+
readonly placement: {
|
|
8
|
+
readonly type: import('vue').PropType<import('.').PopoverPlacement>;
|
|
9
|
+
readonly default: "top";
|
|
10
|
+
};
|
|
11
|
+
readonly trigger: {
|
|
12
|
+
readonly type: import('vue').PropType<import('.').PopoverTrigger | import('.').PopoverTrigger[]>;
|
|
13
|
+
readonly default: "hover";
|
|
14
|
+
};
|
|
15
|
+
readonly content: {
|
|
16
|
+
readonly type: StringConstructor;
|
|
17
|
+
readonly default: "";
|
|
18
|
+
};
|
|
19
|
+
readonly title: {
|
|
20
|
+
readonly type: StringConstructor;
|
|
21
|
+
readonly default: "";
|
|
22
|
+
};
|
|
23
|
+
readonly showArrow: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: true;
|
|
26
|
+
};
|
|
27
|
+
readonly flipArrow: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: false;
|
|
30
|
+
};
|
|
31
|
+
readonly offset: {
|
|
32
|
+
readonly type: NumberConstructor;
|
|
33
|
+
readonly default: 8;
|
|
34
|
+
};
|
|
35
|
+
readonly disabled: {
|
|
36
|
+
readonly type: BooleanConstructor;
|
|
37
|
+
readonly default: false;
|
|
38
|
+
};
|
|
39
|
+
readonly tooltip: {
|
|
40
|
+
readonly type: BooleanConstructor;
|
|
41
|
+
readonly default: false;
|
|
42
|
+
};
|
|
43
|
+
readonly openDelay: {
|
|
44
|
+
readonly type: NumberConstructor;
|
|
45
|
+
readonly default: 100;
|
|
46
|
+
};
|
|
47
|
+
readonly closeDelay: {
|
|
48
|
+
readonly type: NumberConstructor;
|
|
49
|
+
readonly default: 100;
|
|
50
|
+
};
|
|
51
|
+
readonly width: {
|
|
52
|
+
readonly type: import('vue').PropType<number | string>;
|
|
53
|
+
readonly default: "auto";
|
|
54
|
+
};
|
|
55
|
+
readonly maxWidth: {
|
|
56
|
+
readonly type: import('vue').PropType<number | string>;
|
|
57
|
+
readonly default: 300;
|
|
58
|
+
};
|
|
59
|
+
readonly closeOnClickOutside: {
|
|
60
|
+
readonly type: BooleanConstructor;
|
|
61
|
+
readonly default: true;
|
|
62
|
+
};
|
|
63
|
+
readonly closeOnEscape: {
|
|
64
|
+
readonly type: BooleanConstructor;
|
|
65
|
+
readonly default: true;
|
|
66
|
+
};
|
|
67
|
+
readonly teleportTo: {
|
|
68
|
+
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
69
|
+
readonly default: "body";
|
|
70
|
+
};
|
|
71
|
+
readonly variant: {
|
|
72
|
+
readonly type: import('vue').PropType<import('.').PopoverVariant>;
|
|
73
|
+
readonly default: "solid";
|
|
74
|
+
};
|
|
75
|
+
readonly type: {
|
|
76
|
+
readonly type: import('vue').PropType<import('.').PopoverType>;
|
|
77
|
+
readonly default: "default";
|
|
78
|
+
};
|
|
79
|
+
readonly shape: {
|
|
80
|
+
readonly type: import('vue').PropType<import('.').PopoverShape>;
|
|
81
|
+
readonly default: "clip";
|
|
82
|
+
};
|
|
83
|
+
readonly color: {
|
|
84
|
+
readonly type: StringConstructor;
|
|
85
|
+
readonly default: "";
|
|
86
|
+
};
|
|
87
|
+
readonly transition: {
|
|
88
|
+
readonly type: import('vue').PropType<import('.').PopoverTransition>;
|
|
89
|
+
readonly default: "fade";
|
|
90
|
+
};
|
|
91
|
+
readonly fallback: {
|
|
92
|
+
readonly type: import('vue').PropType<import('.').PopoverFallback>;
|
|
93
|
+
readonly default: "flip";
|
|
94
|
+
};
|
|
95
|
+
}>> & Readonly<{
|
|
96
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
97
|
+
onClose?: (() => any) | undefined;
|
|
98
|
+
onOpen?: (() => any) | undefined;
|
|
99
|
+
}>, {
|
|
100
|
+
open: () => void;
|
|
101
|
+
close: () => void;
|
|
102
|
+
toggle: () => void;
|
|
103
|
+
updatePosition: () => void;
|
|
104
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
105
|
+
"update:modelValue": (value: boolean) => void;
|
|
106
|
+
close: () => void;
|
|
107
|
+
open: () => void;
|
|
108
|
+
}, import('vue').PublicProps, {
|
|
109
|
+
readonly width: string | number;
|
|
110
|
+
readonly type: import('.').PopoverType;
|
|
111
|
+
readonly color: string;
|
|
112
|
+
readonly variant: import('.').PopoverVariant;
|
|
113
|
+
readonly disabled: boolean;
|
|
114
|
+
readonly shape: import('.').PopoverShape;
|
|
115
|
+
readonly title: string;
|
|
116
|
+
readonly transition: import('.').PopoverTransition;
|
|
117
|
+
readonly content: string;
|
|
118
|
+
readonly modelValue: boolean;
|
|
119
|
+
readonly tooltip: boolean;
|
|
120
|
+
readonly maxWidth: string | number;
|
|
121
|
+
readonly offset: number;
|
|
122
|
+
readonly teleportTo: string | HTMLElement;
|
|
123
|
+
readonly placement: import('.').PopoverPlacement;
|
|
124
|
+
readonly trigger: import('.').PopoverTrigger | import('.').PopoverTrigger[];
|
|
125
|
+
readonly showArrow: boolean;
|
|
126
|
+
readonly flipArrow: boolean;
|
|
127
|
+
readonly openDelay: number;
|
|
128
|
+
readonly closeDelay: number;
|
|
129
|
+
readonly closeOnClickOutside: boolean;
|
|
130
|
+
readonly closeOnEscape: boolean;
|
|
131
|
+
readonly fallback: import('.').PopoverFallback;
|
|
132
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
133
|
+
triggerRef: HTMLDivElement;
|
|
134
|
+
popoverRef: HTMLDivElement;
|
|
135
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
136
|
+
P: {};
|
|
137
|
+
B: {};
|
|
138
|
+
D: {};
|
|
139
|
+
C: {};
|
|
140
|
+
M: {};
|
|
141
|
+
Defaults: {};
|
|
142
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
143
|
+
readonly modelValue: {
|
|
144
|
+
readonly type: BooleanConstructor;
|
|
145
|
+
readonly default: undefined;
|
|
146
|
+
};
|
|
147
|
+
readonly placement: {
|
|
148
|
+
readonly type: import('vue').PropType<import('.').PopoverPlacement>;
|
|
149
|
+
readonly default: "top";
|
|
150
|
+
};
|
|
151
|
+
readonly trigger: {
|
|
152
|
+
readonly type: import('vue').PropType<import('.').PopoverTrigger | import('.').PopoverTrigger[]>;
|
|
153
|
+
readonly default: "hover";
|
|
154
|
+
};
|
|
155
|
+
readonly content: {
|
|
156
|
+
readonly type: StringConstructor;
|
|
157
|
+
readonly default: "";
|
|
158
|
+
};
|
|
159
|
+
readonly title: {
|
|
160
|
+
readonly type: StringConstructor;
|
|
161
|
+
readonly default: "";
|
|
162
|
+
};
|
|
163
|
+
readonly showArrow: {
|
|
164
|
+
readonly type: BooleanConstructor;
|
|
165
|
+
readonly default: true;
|
|
166
|
+
};
|
|
167
|
+
readonly flipArrow: {
|
|
168
|
+
readonly type: BooleanConstructor;
|
|
169
|
+
readonly default: false;
|
|
170
|
+
};
|
|
171
|
+
readonly offset: {
|
|
172
|
+
readonly type: NumberConstructor;
|
|
173
|
+
readonly default: 8;
|
|
174
|
+
};
|
|
175
|
+
readonly disabled: {
|
|
176
|
+
readonly type: BooleanConstructor;
|
|
177
|
+
readonly default: false;
|
|
178
|
+
};
|
|
179
|
+
readonly tooltip: {
|
|
180
|
+
readonly type: BooleanConstructor;
|
|
181
|
+
readonly default: false;
|
|
182
|
+
};
|
|
183
|
+
readonly openDelay: {
|
|
184
|
+
readonly type: NumberConstructor;
|
|
185
|
+
readonly default: 100;
|
|
186
|
+
};
|
|
187
|
+
readonly closeDelay: {
|
|
188
|
+
readonly type: NumberConstructor;
|
|
189
|
+
readonly default: 100;
|
|
190
|
+
};
|
|
191
|
+
readonly width: {
|
|
192
|
+
readonly type: import('vue').PropType<number | string>;
|
|
193
|
+
readonly default: "auto";
|
|
194
|
+
};
|
|
195
|
+
readonly maxWidth: {
|
|
196
|
+
readonly type: import('vue').PropType<number | string>;
|
|
197
|
+
readonly default: 300;
|
|
198
|
+
};
|
|
199
|
+
readonly closeOnClickOutside: {
|
|
200
|
+
readonly type: BooleanConstructor;
|
|
201
|
+
readonly default: true;
|
|
202
|
+
};
|
|
203
|
+
readonly closeOnEscape: {
|
|
204
|
+
readonly type: BooleanConstructor;
|
|
205
|
+
readonly default: true;
|
|
206
|
+
};
|
|
207
|
+
readonly teleportTo: {
|
|
208
|
+
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
209
|
+
readonly default: "body";
|
|
210
|
+
};
|
|
211
|
+
readonly variant: {
|
|
212
|
+
readonly type: import('vue').PropType<import('.').PopoverVariant>;
|
|
213
|
+
readonly default: "solid";
|
|
214
|
+
};
|
|
215
|
+
readonly type: {
|
|
216
|
+
readonly type: import('vue').PropType<import('.').PopoverType>;
|
|
217
|
+
readonly default: "default";
|
|
218
|
+
};
|
|
219
|
+
readonly shape: {
|
|
220
|
+
readonly type: import('vue').PropType<import('.').PopoverShape>;
|
|
221
|
+
readonly default: "clip";
|
|
222
|
+
};
|
|
223
|
+
readonly color: {
|
|
224
|
+
readonly type: StringConstructor;
|
|
225
|
+
readonly default: "";
|
|
226
|
+
};
|
|
227
|
+
readonly transition: {
|
|
228
|
+
readonly type: import('vue').PropType<import('.').PopoverTransition>;
|
|
229
|
+
readonly default: "fade";
|
|
230
|
+
};
|
|
231
|
+
readonly fallback: {
|
|
232
|
+
readonly type: import('vue').PropType<import('.').PopoverFallback>;
|
|
233
|
+
readonly default: "flip";
|
|
234
|
+
};
|
|
235
|
+
}>> & Readonly<{
|
|
236
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
237
|
+
onClose?: (() => any) | undefined;
|
|
238
|
+
onOpen?: (() => any) | undefined;
|
|
239
|
+
}>, {
|
|
240
|
+
open: () => void;
|
|
241
|
+
close: () => void;
|
|
242
|
+
toggle: () => void;
|
|
243
|
+
updatePosition: () => void;
|
|
244
|
+
}, {}, {}, {}, {
|
|
245
|
+
readonly width: string | number;
|
|
246
|
+
readonly type: import('.').PopoverType;
|
|
247
|
+
readonly color: string;
|
|
248
|
+
readonly variant: import('.').PopoverVariant;
|
|
249
|
+
readonly disabled: boolean;
|
|
250
|
+
readonly shape: import('.').PopoverShape;
|
|
251
|
+
readonly title: string;
|
|
252
|
+
readonly transition: import('.').PopoverTransition;
|
|
253
|
+
readonly content: string;
|
|
254
|
+
readonly modelValue: boolean;
|
|
255
|
+
readonly tooltip: boolean;
|
|
256
|
+
readonly maxWidth: string | number;
|
|
257
|
+
readonly offset: number;
|
|
258
|
+
readonly teleportTo: string | HTMLElement;
|
|
259
|
+
readonly placement: import('.').PopoverPlacement;
|
|
260
|
+
readonly trigger: import('.').PopoverTrigger | import('.').PopoverTrigger[];
|
|
261
|
+
readonly showArrow: boolean;
|
|
262
|
+
readonly flipArrow: boolean;
|
|
263
|
+
readonly openDelay: number;
|
|
264
|
+
readonly closeDelay: number;
|
|
265
|
+
readonly closeOnClickOutside: boolean;
|
|
266
|
+
readonly closeOnEscape: boolean;
|
|
267
|
+
readonly fallback: import('.').PopoverFallback;
|
|
268
|
+
}>;
|
|
269
|
+
__isFragment?: never;
|
|
270
|
+
__isTeleport?: never;
|
|
271
|
+
__isSuspense?: never;
|
|
272
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
273
|
+
readonly modelValue: {
|
|
274
|
+
readonly type: BooleanConstructor;
|
|
275
|
+
readonly default: undefined;
|
|
276
|
+
};
|
|
277
|
+
readonly placement: {
|
|
278
|
+
readonly type: import('vue').PropType<import('.').PopoverPlacement>;
|
|
279
|
+
readonly default: "top";
|
|
280
|
+
};
|
|
281
|
+
readonly trigger: {
|
|
282
|
+
readonly type: import('vue').PropType<import('.').PopoverTrigger | import('.').PopoverTrigger[]>;
|
|
283
|
+
readonly default: "hover";
|
|
284
|
+
};
|
|
285
|
+
readonly content: {
|
|
286
|
+
readonly type: StringConstructor;
|
|
287
|
+
readonly default: "";
|
|
288
|
+
};
|
|
289
|
+
readonly title: {
|
|
290
|
+
readonly type: StringConstructor;
|
|
291
|
+
readonly default: "";
|
|
292
|
+
};
|
|
293
|
+
readonly showArrow: {
|
|
294
|
+
readonly type: BooleanConstructor;
|
|
295
|
+
readonly default: true;
|
|
296
|
+
};
|
|
297
|
+
readonly flipArrow: {
|
|
298
|
+
readonly type: BooleanConstructor;
|
|
299
|
+
readonly default: false;
|
|
300
|
+
};
|
|
301
|
+
readonly offset: {
|
|
302
|
+
readonly type: NumberConstructor;
|
|
303
|
+
readonly default: 8;
|
|
304
|
+
};
|
|
305
|
+
readonly disabled: {
|
|
306
|
+
readonly type: BooleanConstructor;
|
|
307
|
+
readonly default: false;
|
|
308
|
+
};
|
|
309
|
+
readonly tooltip: {
|
|
310
|
+
readonly type: BooleanConstructor;
|
|
311
|
+
readonly default: false;
|
|
312
|
+
};
|
|
313
|
+
readonly openDelay: {
|
|
314
|
+
readonly type: NumberConstructor;
|
|
315
|
+
readonly default: 100;
|
|
316
|
+
};
|
|
317
|
+
readonly closeDelay: {
|
|
318
|
+
readonly type: NumberConstructor;
|
|
319
|
+
readonly default: 100;
|
|
320
|
+
};
|
|
321
|
+
readonly width: {
|
|
322
|
+
readonly type: import('vue').PropType<number | string>;
|
|
323
|
+
readonly default: "auto";
|
|
324
|
+
};
|
|
325
|
+
readonly maxWidth: {
|
|
326
|
+
readonly type: import('vue').PropType<number | string>;
|
|
327
|
+
readonly default: 300;
|
|
328
|
+
};
|
|
329
|
+
readonly closeOnClickOutside: {
|
|
330
|
+
readonly type: BooleanConstructor;
|
|
331
|
+
readonly default: true;
|
|
332
|
+
};
|
|
333
|
+
readonly closeOnEscape: {
|
|
334
|
+
readonly type: BooleanConstructor;
|
|
335
|
+
readonly default: true;
|
|
336
|
+
};
|
|
337
|
+
readonly teleportTo: {
|
|
338
|
+
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
339
|
+
readonly default: "body";
|
|
340
|
+
};
|
|
341
|
+
readonly variant: {
|
|
342
|
+
readonly type: import('vue').PropType<import('.').PopoverVariant>;
|
|
343
|
+
readonly default: "solid";
|
|
344
|
+
};
|
|
345
|
+
readonly type: {
|
|
346
|
+
readonly type: import('vue').PropType<import('.').PopoverType>;
|
|
347
|
+
readonly default: "default";
|
|
348
|
+
};
|
|
349
|
+
readonly shape: {
|
|
350
|
+
readonly type: import('vue').PropType<import('.').PopoverShape>;
|
|
351
|
+
readonly default: "clip";
|
|
352
|
+
};
|
|
353
|
+
readonly color: {
|
|
354
|
+
readonly type: StringConstructor;
|
|
355
|
+
readonly default: "";
|
|
356
|
+
};
|
|
357
|
+
readonly transition: {
|
|
358
|
+
readonly type: import('vue').PropType<import('.').PopoverTransition>;
|
|
359
|
+
readonly default: "fade";
|
|
360
|
+
};
|
|
361
|
+
readonly fallback: {
|
|
362
|
+
readonly type: import('vue').PropType<import('.').PopoverFallback>;
|
|
363
|
+
readonly default: "flip";
|
|
364
|
+
};
|
|
365
|
+
}>> & Readonly<{
|
|
366
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
367
|
+
onClose?: (() => any) | undefined;
|
|
368
|
+
onOpen?: (() => any) | undefined;
|
|
369
|
+
}>, {
|
|
370
|
+
open: () => void;
|
|
371
|
+
close: () => void;
|
|
372
|
+
toggle: () => void;
|
|
373
|
+
updatePosition: () => void;
|
|
374
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
375
|
+
"update:modelValue": (value: boolean) => void;
|
|
376
|
+
close: () => void;
|
|
377
|
+
open: () => void;
|
|
378
|
+
}, string, {
|
|
379
|
+
readonly width: string | number;
|
|
380
|
+
readonly type: import('.').PopoverType;
|
|
381
|
+
readonly color: string;
|
|
382
|
+
readonly variant: import('.').PopoverVariant;
|
|
383
|
+
readonly disabled: boolean;
|
|
384
|
+
readonly shape: import('.').PopoverShape;
|
|
385
|
+
readonly title: string;
|
|
386
|
+
readonly transition: import('.').PopoverTransition;
|
|
387
|
+
readonly content: string;
|
|
388
|
+
readonly modelValue: boolean;
|
|
389
|
+
readonly tooltip: boolean;
|
|
390
|
+
readonly maxWidth: string | number;
|
|
391
|
+
readonly offset: number;
|
|
392
|
+
readonly teleportTo: string | HTMLElement;
|
|
393
|
+
readonly placement: import('.').PopoverPlacement;
|
|
394
|
+
readonly trigger: import('.').PopoverTrigger | import('.').PopoverTrigger[];
|
|
395
|
+
readonly showArrow: boolean;
|
|
396
|
+
readonly flipArrow: boolean;
|
|
397
|
+
readonly openDelay: number;
|
|
398
|
+
readonly closeDelay: number;
|
|
399
|
+
readonly closeOnClickOutside: boolean;
|
|
400
|
+
readonly closeOnEscape: boolean;
|
|
401
|
+
readonly fallback: import('.').PopoverFallback;
|
|
402
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
403
|
+
$slots: {
|
|
404
|
+
default?(_: {}): any;
|
|
405
|
+
popover?(_: {}): any;
|
|
406
|
+
content?(_: {}): any;
|
|
407
|
+
};
|
|
408
|
+
})>;
|
|
409
|
+
export default CpPopover;
|
|
3
410
|
export * from './src/popover';
|
|
4
411
|
export type { PopoverInstance } from './src/instance';
|
|
5
412
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../popover/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../popover/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuB,CAAA;AAC7C,eAAe,SAAS,CAAA;AAExB,cAAc,eAAe,CAAA;AAC7B,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -24,6 +24,21 @@ export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bot
|
|
|
24
24
|
* - `round` - 圆角矩形
|
|
25
25
|
*/
|
|
26
26
|
export type PopoverShape = 'clip' | 'no-clip' | 'round';
|
|
27
|
+
/**
|
|
28
|
+
* 弹层过渡动画
|
|
29
|
+
* - `fade` - 渐入淡出 + 缩放(默认,从中心展开)
|
|
30
|
+
* - `slide` - 从 placement 方向滑入/滑出
|
|
31
|
+
* - `slide-reverse` - 从 placement 反方向滑入/滑出
|
|
32
|
+
* - `none` - 无动画
|
|
33
|
+
*/
|
|
34
|
+
export type PopoverTransition = 'fade' | 'slide' | 'slide-reverse' | 'none';
|
|
35
|
+
/**
|
|
36
|
+
* 弹层退避策略(视口边界检测)
|
|
37
|
+
* - `flip` - 空间不足时自动翻转到反方向
|
|
38
|
+
* - `shift` - 保持方向不变,但将弹层位移到视口可见范围内
|
|
39
|
+
* - `none` - 不做任何退避
|
|
40
|
+
*/
|
|
41
|
+
export type PopoverFallback = 'flip' | 'shift' | 'none';
|
|
27
42
|
/**
|
|
28
43
|
* 触发方式
|
|
29
44
|
* - `hover` - 鼠标悬停
|
|
@@ -75,11 +90,12 @@ export declare const popoverProps: {
|
|
|
75
90
|
readonly default: "top";
|
|
76
91
|
};
|
|
77
92
|
/**
|
|
78
|
-
*
|
|
93
|
+
* 触发方式,支持单个或多个同时启用
|
|
94
|
+
* 多模式时各触发方式独立退出(hover 入→hover 出;click 入→click 出)
|
|
79
95
|
* @default 'hover'
|
|
80
96
|
*/
|
|
81
97
|
readonly trigger: {
|
|
82
|
-
readonly type: PropType<PopoverTrigger>;
|
|
98
|
+
readonly type: PropType<PopoverTrigger | PopoverTrigger[]>;
|
|
83
99
|
readonly default: "hover";
|
|
84
100
|
};
|
|
85
101
|
/**
|
|
@@ -232,6 +248,29 @@ export declare const popoverProps: {
|
|
|
232
248
|
readonly type: StringConstructor;
|
|
233
249
|
readonly default: "";
|
|
234
250
|
};
|
|
251
|
+
/**
|
|
252
|
+
* 过渡动画类型
|
|
253
|
+
* - `fade` - 渐入淡出 + 缩放(从中心展开)
|
|
254
|
+
* - `slide` - 从 placement 方向滑入/滑出
|
|
255
|
+
* - `slide-reverse` - 从 placement 反方向滑入/滑出
|
|
256
|
+
* - `none` - 无动画
|
|
257
|
+
* @default 'fade'
|
|
258
|
+
*/
|
|
259
|
+
readonly transition: {
|
|
260
|
+
readonly type: PropType<PopoverTransition>;
|
|
261
|
+
readonly default: "fade";
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* 视口边界退避策略
|
|
265
|
+
* - `flip` - 空间不足时自动翻转到反方向
|
|
266
|
+
* - `shift` - 保持方向不变,将弹层位移到视口可见范围内
|
|
267
|
+
* - `none` - 不做任何退避
|
|
268
|
+
* @default 'flip'
|
|
269
|
+
*/
|
|
270
|
+
readonly fallback: {
|
|
271
|
+
readonly type: PropType<PopoverFallback>;
|
|
272
|
+
readonly default: "flip";
|
|
273
|
+
};
|
|
235
274
|
};
|
|
236
275
|
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
|
|
237
276
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../popover/src/popover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAE1F;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GAAG,WAAW,GAAG,SAAS,GAC/B,QAAQ,GAAG,cAAc,GAAG,YAAY,GACxC,MAAM,GAAG,YAAY,GAAG,UAAU,GAClC,OAAO,GAAG,aAAa,GAAG,WAAW,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY;IACvB;;;OAGG;;;;;IAKH;;;OAGG;;uBAEe,QAAQ,CAAC,gBAAgB,CAAC;;;IAG5C
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../popover/src/popover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAE1F;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GAAG,WAAW,GAAG,SAAS,GAC/B,QAAQ,GAAG,cAAc,GAAG,YAAY,GACxC,MAAM,GAAG,YAAY,GAAG,UAAU,GAClC,OAAO,GAAG,aAAa,GAAG,WAAW,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,GAAG,MAAM,CAAA;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY;IACvB;;;OAGG;;;;;IAKH;;;OAGG;;uBAEe,QAAQ,CAAC,gBAAgB,CAAC;;;IAG5C;;;;OAIG;;uBAEwB,QAAQ,CAAC,cAAc,GAAG,cAAc,EAAE,CAAC;;;IAGtE;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;;;OAKG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;uBAEyB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD;;;OAGG;;uBAEyB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;uBAEyB,QAAQ,CAAC,MAAM,GAAG,WAAW,CAAC;;;IAG1D;;;OAGG;;uBAEe,QAAQ,CAAC,cAAc,CAAC;;;IAG1C;;;OAGG;;uBAEe,QAAQ,CAAC,WAAW,CAAC;;;IAGvC;;;;;;OAMG;;uBAEe,QAAQ,CAAC,YAAY,CAAC;;;IAGxC;;;;OAIG;;;;;IAKH;;;;;;;OAOG;;uBAEe,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C;;;;;;OAMG;;uBAEe,QAAQ,CAAC,eAAe,CAAC;;;CAGnC,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,YAAY,CAAC,CAAA;AAEhE;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB;;OAEG;iCAC0B,OAAO;IACpC;;OAEG;;IAEH;;OAEG;;CAEJ,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PopoverTrigger } from './popover';
|
|
1
2
|
declare function __VLS_template(): {
|
|
2
3
|
attrs: Partial<{}>;
|
|
3
4
|
slots: {
|
|
@@ -22,7 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
22
23
|
readonly default: "top";
|
|
23
24
|
};
|
|
24
25
|
readonly trigger: {
|
|
25
|
-
readonly type: import('vue').PropType<
|
|
26
|
+
readonly type: import('vue').PropType<PopoverTrigger | PopoverTrigger[]>;
|
|
26
27
|
readonly default: "hover";
|
|
27
28
|
};
|
|
28
29
|
readonly content: {
|
|
@@ -97,6 +98,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
97
98
|
readonly type: StringConstructor;
|
|
98
99
|
readonly default: "";
|
|
99
100
|
};
|
|
101
|
+
readonly transition: {
|
|
102
|
+
readonly type: import('vue').PropType<import('./popover').PopoverTransition>;
|
|
103
|
+
readonly default: "fade";
|
|
104
|
+
};
|
|
105
|
+
readonly fallback: {
|
|
106
|
+
readonly type: import('vue').PropType<import('./popover').PopoverFallback>;
|
|
107
|
+
readonly default: "flip";
|
|
108
|
+
};
|
|
100
109
|
}>, {
|
|
101
110
|
/** @description 打开弹层 */
|
|
102
111
|
open: () => void;
|
|
@@ -120,7 +129,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
120
129
|
readonly default: "top";
|
|
121
130
|
};
|
|
122
131
|
readonly trigger: {
|
|
123
|
-
readonly type: import('vue').PropType<
|
|
132
|
+
readonly type: import('vue').PropType<PopoverTrigger | PopoverTrigger[]>;
|
|
124
133
|
readonly default: "hover";
|
|
125
134
|
};
|
|
126
135
|
readonly content: {
|
|
@@ -195,6 +204,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
195
204
|
readonly type: StringConstructor;
|
|
196
205
|
readonly default: "";
|
|
197
206
|
};
|
|
207
|
+
readonly transition: {
|
|
208
|
+
readonly type: import('vue').PropType<import('./popover').PopoverTransition>;
|
|
209
|
+
readonly default: "fade";
|
|
210
|
+
};
|
|
211
|
+
readonly fallback: {
|
|
212
|
+
readonly type: import('vue').PropType<import('./popover').PopoverFallback>;
|
|
213
|
+
readonly default: "flip";
|
|
214
|
+
};
|
|
198
215
|
}>> & Readonly<{
|
|
199
216
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
200
217
|
onClose?: (() => any) | undefined;
|
|
@@ -207,6 +224,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
207
224
|
readonly disabled: boolean;
|
|
208
225
|
readonly shape: import('./popover').PopoverShape;
|
|
209
226
|
readonly title: string;
|
|
227
|
+
readonly transition: import('./popover').PopoverTransition;
|
|
210
228
|
readonly content: string;
|
|
211
229
|
readonly modelValue: boolean;
|
|
212
230
|
readonly tooltip: boolean;
|
|
@@ -214,13 +232,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
214
232
|
readonly offset: number;
|
|
215
233
|
readonly teleportTo: string | HTMLElement;
|
|
216
234
|
readonly placement: import('./popover').PopoverPlacement;
|
|
217
|
-
readonly trigger:
|
|
235
|
+
readonly trigger: PopoverTrigger | PopoverTrigger[];
|
|
218
236
|
readonly showArrow: boolean;
|
|
219
237
|
readonly flipArrow: boolean;
|
|
220
238
|
readonly openDelay: number;
|
|
221
239
|
readonly closeDelay: number;
|
|
222
240
|
readonly closeOnClickOutside: boolean;
|
|
223
241
|
readonly closeOnEscape: boolean;
|
|
242
|
+
readonly fallback: import('./popover').PopoverFallback;
|
|
224
243
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
225
244
|
triggerRef: HTMLDivElement;
|
|
226
245
|
popoverRef: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.vue.d.ts","sourceRoot":"","sources":["../../../popover/src/popover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"popover.vue.d.ts","sourceRoot":"","sources":["../../../popover/src/popover.vue"],"names":[],"mappings":"AA4dA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAsa/C,iBAAS,cAAc;WAkGT,OAAO,IAA6B;;yBAdrB,GAAG;yBACF,GAAG;yBACH,GAAG;;;;;;;EAiBhC;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAxKnB,wBAAwB;;IAExB,wBAAwB;;IAExB,wBAAwB;;IAExB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4KxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberpunk-vue/components",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Cyberpunk Vue components - A futuristic Vue 3 component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"vue": "^3.5.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cyberpunk-vue/
|
|
27
|
-
"@cyberpunk-vue/
|
|
28
|
-
"@cyberpunk-vue/
|
|
26
|
+
"@cyberpunk-vue/hooks": "1.9.4",
|
|
27
|
+
"@cyberpunk-vue/constants": "1.9.4",
|
|
28
|
+
"@cyberpunk-vue/theme-chalk": "1.9.4"
|
|
29
29
|
},
|
|
30
30
|
"author": "Juxest",
|
|
31
31
|
"license": "MIT",
|