@cyberpunk-vue/components 1.14.1 → 1.14.3
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/avatar/index.d.ts +30 -0
- package/dist/avatar/src/avatar-group.d.ts +11 -1
- package/dist/avatar/src/avatar-group.vue.d.ts +9 -0
- package/dist/avatar/src/avatar.d.ts +31 -5
- package/dist/avatar/src/avatar.vue.d.ts +9 -0
- package/dist/card/index.d.ts +3 -3
- package/dist/card/src/card.d.ts +3 -3
- package/dist/card/src/card.vue.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +751 -698
- package/dist/text/index.d.ts +60 -0
- package/dist/text/src/text.d.ts +43 -1
- package/dist/text/src/text.vue.d.ts +37 -0
- package/package.json +4 -4
package/dist/avatar/index.d.ts
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const CpAvatar: import('../utils').SFCWithInstall<{
|
|
14
14
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
readonly type: {
|
|
16
|
+
readonly type: import('vue').PropType<import('.').AvatarType>;
|
|
17
|
+
readonly default: "default";
|
|
18
|
+
};
|
|
15
19
|
readonly src: {
|
|
16
20
|
readonly type: StringConstructor;
|
|
17
21
|
readonly default: "";
|
|
@@ -62,6 +66,7 @@ export declare const CpAvatar: import('../utils').SFCWithInstall<{
|
|
|
62
66
|
readonly size: import('.').AvatarSize;
|
|
63
67
|
readonly fit: "fill" | "contain" | "cover";
|
|
64
68
|
readonly icon: import('..').IconValue;
|
|
69
|
+
readonly type: import('.').AvatarType;
|
|
65
70
|
readonly shape: import('.').AvatarShape;
|
|
66
71
|
readonly src: string;
|
|
67
72
|
readonly alt: string;
|
|
@@ -77,6 +82,10 @@ export declare const CpAvatar: import('../utils').SFCWithInstall<{
|
|
|
77
82
|
M: {};
|
|
78
83
|
Defaults: {};
|
|
79
84
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
85
|
+
readonly type: {
|
|
86
|
+
readonly type: import('vue').PropType<import('.').AvatarType>;
|
|
87
|
+
readonly default: "default";
|
|
88
|
+
};
|
|
80
89
|
readonly src: {
|
|
81
90
|
readonly type: StringConstructor;
|
|
82
91
|
readonly default: "";
|
|
@@ -124,6 +133,7 @@ export declare const CpAvatar: import('../utils').SFCWithInstall<{
|
|
|
124
133
|
readonly size: import('.').AvatarSize;
|
|
125
134
|
readonly fit: "fill" | "contain" | "cover";
|
|
126
135
|
readonly icon: import('..').IconValue;
|
|
136
|
+
readonly type: import('.').AvatarType;
|
|
127
137
|
readonly shape: import('.').AvatarShape;
|
|
128
138
|
readonly src: string;
|
|
129
139
|
readonly alt: string;
|
|
@@ -136,6 +146,10 @@ export declare const CpAvatar: import('../utils').SFCWithInstall<{
|
|
|
136
146
|
__isTeleport?: never;
|
|
137
147
|
__isSuspense?: never;
|
|
138
148
|
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
149
|
+
readonly type: {
|
|
150
|
+
readonly type: import('vue').PropType<import('.').AvatarType>;
|
|
151
|
+
readonly default: "default";
|
|
152
|
+
};
|
|
139
153
|
readonly src: {
|
|
140
154
|
readonly type: StringConstructor;
|
|
141
155
|
readonly default: "";
|
|
@@ -186,6 +200,7 @@ export declare const CpAvatar: import('../utils').SFCWithInstall<{
|
|
|
186
200
|
readonly size: import('.').AvatarSize;
|
|
187
201
|
readonly fit: "fill" | "contain" | "cover";
|
|
188
202
|
readonly icon: import('..').IconValue;
|
|
203
|
+
readonly type: import('.').AvatarType;
|
|
189
204
|
readonly shape: import('.').AvatarShape;
|
|
190
205
|
readonly src: string;
|
|
191
206
|
readonly alt: string;
|
|
@@ -224,6 +239,10 @@ export declare const CpAvatarGroup: import('../utils').SFCWithInstall<{
|
|
|
224
239
|
readonly type: import('vue').PropType<import('.').AvatarSize>;
|
|
225
240
|
readonly default: "md";
|
|
226
241
|
};
|
|
242
|
+
readonly type: {
|
|
243
|
+
readonly type: import('vue').PropType<import('.').AvatarType>;
|
|
244
|
+
readonly default: undefined;
|
|
245
|
+
};
|
|
227
246
|
readonly shape: {
|
|
228
247
|
readonly type: import('vue').PropType<import('.').AvatarShape>;
|
|
229
248
|
readonly default: "circle";
|
|
@@ -255,6 +274,7 @@ export declare const CpAvatarGroup: import('../utils').SFCWithInstall<{
|
|
|
255
274
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
256
275
|
readonly size: import('.').AvatarSize;
|
|
257
276
|
readonly total: number;
|
|
277
|
+
readonly type: import('.').AvatarType;
|
|
258
278
|
readonly shape: import('.').AvatarShape;
|
|
259
279
|
readonly max: number;
|
|
260
280
|
readonly spacing: string | number;
|
|
@@ -283,6 +303,10 @@ export declare const CpAvatarGroup: import('../utils').SFCWithInstall<{
|
|
|
283
303
|
readonly type: import('vue').PropType<import('.').AvatarSize>;
|
|
284
304
|
readonly default: "md";
|
|
285
305
|
};
|
|
306
|
+
readonly type: {
|
|
307
|
+
readonly type: import('vue').PropType<import('.').AvatarType>;
|
|
308
|
+
readonly default: undefined;
|
|
309
|
+
};
|
|
286
310
|
readonly shape: {
|
|
287
311
|
readonly type: import('vue').PropType<import('.').AvatarShape>;
|
|
288
312
|
readonly default: "circle";
|
|
@@ -314,6 +338,7 @@ export declare const CpAvatarGroup: import('../utils').SFCWithInstall<{
|
|
|
314
338
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
315
339
|
readonly size: import('.').AvatarSize;
|
|
316
340
|
readonly total: number;
|
|
341
|
+
readonly type: import('.').AvatarType;
|
|
317
342
|
readonly shape: import('.').AvatarShape;
|
|
318
343
|
readonly max: number;
|
|
319
344
|
readonly spacing: string | number;
|
|
@@ -339,6 +364,10 @@ export declare const CpAvatarGroup: import('../utils').SFCWithInstall<{
|
|
|
339
364
|
readonly type: import('vue').PropType<import('.').AvatarSize>;
|
|
340
365
|
readonly default: "md";
|
|
341
366
|
};
|
|
367
|
+
readonly type: {
|
|
368
|
+
readonly type: import('vue').PropType<import('.').AvatarType>;
|
|
369
|
+
readonly default: undefined;
|
|
370
|
+
};
|
|
342
371
|
readonly shape: {
|
|
343
372
|
readonly type: import('vue').PropType<import('.').AvatarShape>;
|
|
344
373
|
readonly default: "circle";
|
|
@@ -370,6 +399,7 @@ export declare const CpAvatarGroup: import('../utils').SFCWithInstall<{
|
|
|
370
399
|
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
371
400
|
readonly size: import('.').AvatarSize;
|
|
372
401
|
readonly total: number;
|
|
402
|
+
readonly type: import('.').AvatarType;
|
|
373
403
|
readonly shape: import('.').AvatarShape;
|
|
374
404
|
readonly max: number;
|
|
375
405
|
readonly spacing: string | number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
2
|
-
import { AvatarSize, AvatarShape } from './avatar';
|
|
2
|
+
import { AvatarSize, AvatarShape, AvatarType } from './avatar';
|
|
3
3
|
/**
|
|
4
4
|
* CpAvatarGroup 组件 Props 定义
|
|
5
5
|
*
|
|
@@ -51,6 +51,15 @@ export declare const avatarGroupProps: {
|
|
|
51
51
|
readonly type: PropType<AvatarSize>;
|
|
52
52
|
readonly default: "md";
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* 统一颜色类型
|
|
56
|
+
* 会通过 provide 注入到子 Avatar;未配置时子 Avatar 使用自身默认值
|
|
57
|
+
* @default undefined
|
|
58
|
+
*/
|
|
59
|
+
readonly type: {
|
|
60
|
+
readonly type: PropType<AvatarType>;
|
|
61
|
+
readonly default: undefined;
|
|
62
|
+
};
|
|
54
63
|
/**
|
|
55
64
|
* 统一形状
|
|
56
65
|
* 会通过 provide 注入到子 Avatar
|
|
@@ -118,6 +127,7 @@ export type AvatarGroupProps = ExtractPropTypes<typeof avatarGroupProps>;
|
|
|
118
127
|
export interface AvatarGroupContext {
|
|
119
128
|
size: AvatarSize;
|
|
120
129
|
shape: AvatarShape;
|
|
130
|
+
type?: AvatarType;
|
|
121
131
|
}
|
|
122
132
|
/**
|
|
123
133
|
* AvatarGroup 注入 key
|
|
@@ -22,6 +22,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
22
22
|
readonly type: import('vue').PropType<import('./avatar').AvatarSize>;
|
|
23
23
|
readonly default: "md";
|
|
24
24
|
};
|
|
25
|
+
readonly type: {
|
|
26
|
+
readonly type: import('vue').PropType<import('./avatar').AvatarType>;
|
|
27
|
+
readonly default: undefined;
|
|
28
|
+
};
|
|
25
29
|
readonly shape: {
|
|
26
30
|
readonly type: import('vue').PropType<import('./avatar').AvatarShape>;
|
|
27
31
|
readonly default: "circle";
|
|
@@ -63,6 +67,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
63
67
|
readonly type: import('vue').PropType<import('./avatar').AvatarSize>;
|
|
64
68
|
readonly default: "md";
|
|
65
69
|
};
|
|
70
|
+
readonly type: {
|
|
71
|
+
readonly type: import('vue').PropType<import('./avatar').AvatarType>;
|
|
72
|
+
readonly default: undefined;
|
|
73
|
+
};
|
|
66
74
|
readonly shape: {
|
|
67
75
|
readonly type: import('vue').PropType<import('./avatar').AvatarShape>;
|
|
68
76
|
readonly default: "circle";
|
|
@@ -94,6 +102,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
94
102
|
}>> & Readonly<{}>, {
|
|
95
103
|
readonly size: import('./avatar').AvatarSize;
|
|
96
104
|
readonly total: number;
|
|
105
|
+
readonly type: import('./avatar').AvatarType;
|
|
97
106
|
readonly shape: import('./avatar').AvatarShape;
|
|
98
107
|
readonly max: number;
|
|
99
108
|
readonly spacing: string | number;
|
|
@@ -13,11 +13,29 @@ import { Size } from '@cyberpunk-vue/hooks';
|
|
|
13
13
|
export type AvatarSize = Size | 'xs' | 'xl';
|
|
14
14
|
/**
|
|
15
15
|
* 头像形状模式
|
|
16
|
-
* - `circle` - 圆形(默认)
|
|
17
|
-
* - `square` - 圆角方形
|
|
16
|
+
* - `circle` / `round` - 圆形(默认)
|
|
17
|
+
* - `square` / `no-clip` - 圆角方形
|
|
18
18
|
* - `clip` - 机甲切角
|
|
19
19
|
*/
|
|
20
|
-
export type AvatarShape = 'circle' | 'square' | 'clip';
|
|
20
|
+
export type AvatarShape = 'circle' | 'square' | 'clip' | 'round' | 'no-clip';
|
|
21
|
+
/**
|
|
22
|
+
* 头像解析后的形状类名
|
|
23
|
+
*/
|
|
24
|
+
export type AvatarResolvedShape = 'circle' | 'square' | 'clip';
|
|
25
|
+
/**
|
|
26
|
+
* 头像颜色类型
|
|
27
|
+
* - `default` - 默认中性色
|
|
28
|
+
* - `primary` - 主色调
|
|
29
|
+
* - `success` - 成功
|
|
30
|
+
* - `warning` - 警告
|
|
31
|
+
* - `error` - 错误/危险
|
|
32
|
+
* - `info` - 信息
|
|
33
|
+
*/
|
|
34
|
+
export type AvatarType = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
35
|
+
/**
|
|
36
|
+
* 将组件库通用 shape 映射到 Avatar 内部形状
|
|
37
|
+
*/
|
|
38
|
+
export declare const normalizeAvatarShape: (shape: AvatarShape | undefined) => AvatarResolvedShape;
|
|
21
39
|
/**
|
|
22
40
|
* CpAvatar 组件 Props 定义
|
|
23
41
|
*
|
|
@@ -41,6 +59,14 @@ export type AvatarShape = 'circle' | 'square' | 'clip';
|
|
|
41
59
|
* @displayName CpAvatar 头像
|
|
42
60
|
*/
|
|
43
61
|
export declare const avatarProps: {
|
|
62
|
+
/**
|
|
63
|
+
* 头像颜色类型
|
|
64
|
+
* @default 'default'
|
|
65
|
+
*/
|
|
66
|
+
readonly type: {
|
|
67
|
+
readonly type: PropType<AvatarType>;
|
|
68
|
+
readonly default: "default";
|
|
69
|
+
};
|
|
44
70
|
/**
|
|
45
71
|
* 头像图片地址
|
|
46
72
|
* @default ''
|
|
@@ -69,8 +95,8 @@ export declare const avatarProps: {
|
|
|
69
95
|
};
|
|
70
96
|
/**
|
|
71
97
|
* 头像形状
|
|
72
|
-
* - `circle`: 圆形(默认)
|
|
73
|
-
* - `square`: 圆角方形
|
|
98
|
+
* - `circle` / `round`: 圆形(默认)
|
|
99
|
+
* - `square` / `no-clip`: 圆角方形
|
|
74
100
|
* - `clip`: 机甲切角
|
|
75
101
|
* @default 'circle'
|
|
76
102
|
*/
|
|
@@ -8,6 +8,10 @@ declare function __VLS_template(): {
|
|
|
8
8
|
};
|
|
9
9
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
10
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
+
readonly type: {
|
|
12
|
+
readonly type: import('vue').PropType<import('./avatar').AvatarType>;
|
|
13
|
+
readonly default: "default";
|
|
14
|
+
};
|
|
11
15
|
readonly src: {
|
|
12
16
|
readonly type: StringConstructor;
|
|
13
17
|
readonly default: "";
|
|
@@ -57,6 +61,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
57
61
|
error: (event: Event) => void;
|
|
58
62
|
load: (event: Event) => void;
|
|
59
63
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
64
|
+
readonly type: {
|
|
65
|
+
readonly type: import('vue').PropType<import('./avatar').AvatarType>;
|
|
66
|
+
readonly default: "default";
|
|
67
|
+
};
|
|
60
68
|
readonly src: {
|
|
61
69
|
readonly type: StringConstructor;
|
|
62
70
|
readonly default: "";
|
|
@@ -109,6 +117,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
109
117
|
readonly size: import('./avatar').AvatarSize;
|
|
110
118
|
readonly fit: "fill" | "contain" | "cover";
|
|
111
119
|
readonly icon: import('../../icon').IconValue;
|
|
120
|
+
readonly type: import('./avatar').AvatarType;
|
|
112
121
|
readonly shape: import('./avatar').AvatarShape;
|
|
113
122
|
readonly src: string;
|
|
114
123
|
readonly alt: string;
|
package/dist/card/index.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export declare const CpCard: import('../utils').SFCWithInstall<{
|
|
|
68
68
|
};
|
|
69
69
|
readonly overlayColor: {
|
|
70
70
|
readonly type: StringConstructor;
|
|
71
|
-
readonly default:
|
|
71
|
+
readonly default: undefined;
|
|
72
72
|
};
|
|
73
73
|
readonly overlayBlur: {
|
|
74
74
|
readonly type: import('vue').PropType<number | string>;
|
|
@@ -260,7 +260,7 @@ export declare const CpCard: import('../utils').SFCWithInstall<{
|
|
|
260
260
|
};
|
|
261
261
|
readonly overlayColor: {
|
|
262
262
|
readonly type: StringConstructor;
|
|
263
|
-
readonly default:
|
|
263
|
+
readonly default: undefined;
|
|
264
264
|
};
|
|
265
265
|
readonly overlayBlur: {
|
|
266
266
|
readonly type: import('vue').PropType<number | string>;
|
|
@@ -443,7 +443,7 @@ export declare const CpCard: import('../utils').SFCWithInstall<{
|
|
|
443
443
|
};
|
|
444
444
|
readonly overlayColor: {
|
|
445
445
|
readonly type: StringConstructor;
|
|
446
|
-
readonly default:
|
|
446
|
+
readonly default: undefined;
|
|
447
447
|
};
|
|
448
448
|
readonly overlayBlur: {
|
|
449
449
|
readonly type: import('vue').PropType<number | string>;
|
package/dist/card/src/card.d.ts
CHANGED
|
@@ -201,12 +201,12 @@ export declare const cardProps: {
|
|
|
201
201
|
};
|
|
202
202
|
/**
|
|
203
203
|
* 覆层颜色
|
|
204
|
-
* 支持任意 CSS
|
|
205
|
-
* @default
|
|
204
|
+
* 支持任意 CSS 颜色值;不传时使用当前主题背景与卡片主题色生成
|
|
205
|
+
* @default undefined
|
|
206
206
|
*/
|
|
207
207
|
readonly overlayColor: {
|
|
208
208
|
readonly type: StringConstructor;
|
|
209
|
-
readonly default:
|
|
209
|
+
readonly default: undefined;
|
|
210
210
|
};
|
|
211
211
|
/**
|
|
212
212
|
* 覆层毛玻璃模糊程度
|
|
@@ -68,7 +68,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
68
68
|
};
|
|
69
69
|
readonly overlayColor: {
|
|
70
70
|
readonly type: StringConstructor;
|
|
71
|
-
readonly default:
|
|
71
|
+
readonly default: undefined;
|
|
72
72
|
};
|
|
73
73
|
readonly overlayBlur: {
|
|
74
74
|
readonly type: import('vue').PropType<number | string>;
|
|
@@ -214,7 +214,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
214
214
|
};
|
|
215
215
|
readonly overlayColor: {
|
|
216
216
|
readonly type: StringConstructor;
|
|
217
|
-
readonly default:
|
|
217
|
+
readonly default: undefined;
|
|
218
218
|
};
|
|
219
219
|
readonly overlayBlur: {
|
|
220
220
|
readonly type: import('vue').PropType<number | string>;
|