@cyberpunk-vue/components 0.1.3 → 0.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.
@@ -0,0 +1,223 @@
1
+ /**
2
+ * CpBadge 徽章组件
3
+ *
4
+ * @description 赛博朋克风格徽章,用于在另一个元素上显示数字、小红点或状态标识。
5
+ * 支持多种颜色类型、变体样式、最大值限制与自定义偏移。
6
+ *
7
+ * @example
8
+ * ```vue
9
+ * <CpBadge :value="5">
10
+ * <CpButton>消息</CpButton>
11
+ * </CpBadge>
12
+ * <CpBadge dot type="primary">
13
+ * <CpIcon icon="Bell" />
14
+ * </CpBadge>
15
+ * ```
16
+ */
17
+ export declare const CpBadge: import('../utils').SFCWithInstall<{
18
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
19
+ readonly value: {
20
+ readonly type: import('vue').PropType<string | number>;
21
+ readonly default: "";
22
+ };
23
+ readonly max: {
24
+ readonly type: NumberConstructor;
25
+ readonly default: 99;
26
+ };
27
+ readonly min: {
28
+ readonly type: NumberConstructor;
29
+ readonly default: undefined;
30
+ };
31
+ readonly dot: {
32
+ readonly type: BooleanConstructor;
33
+ readonly default: false;
34
+ };
35
+ readonly hidden: {
36
+ readonly type: BooleanConstructor;
37
+ readonly default: false;
38
+ };
39
+ readonly showZero: {
40
+ readonly type: BooleanConstructor;
41
+ readonly default: false;
42
+ };
43
+ readonly type: {
44
+ readonly type: import('vue').PropType<import('.').BadgeType>;
45
+ readonly default: "error";
46
+ };
47
+ readonly color: {
48
+ readonly type: StringConstructor;
49
+ readonly default: "";
50
+ };
51
+ readonly textColor: {
52
+ readonly type: StringConstructor;
53
+ readonly default: "";
54
+ };
55
+ readonly variant: {
56
+ readonly type: import('vue').PropType<import('.').BadgeVariant>;
57
+ readonly default: "solid";
58
+ };
59
+ readonly offset: {
60
+ readonly type: import('vue').PropType<[number, number]>;
61
+ readonly default: undefined;
62
+ };
63
+ readonly size: {
64
+ readonly type: import('vue').PropType<import('.').BadgeSize>;
65
+ readonly default: "default";
66
+ };
67
+ }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
68
+ readonly size: import('.').BadgeSize;
69
+ readonly type: import('.').BadgeType;
70
+ readonly variant: import('.').BadgeVariant;
71
+ readonly color: string;
72
+ readonly textColor: string;
73
+ readonly hidden: boolean;
74
+ readonly value: string | number;
75
+ readonly min: number;
76
+ readonly max: number;
77
+ readonly dot: boolean;
78
+ readonly offset: [number, number];
79
+ readonly showZero: boolean;
80
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
81
+ P: {};
82
+ B: {};
83
+ D: {};
84
+ C: {};
85
+ M: {};
86
+ Defaults: {};
87
+ }, Readonly<import('vue').ExtractPropTypes<{
88
+ readonly value: {
89
+ readonly type: import('vue').PropType<string | number>;
90
+ readonly default: "";
91
+ };
92
+ readonly max: {
93
+ readonly type: NumberConstructor;
94
+ readonly default: 99;
95
+ };
96
+ readonly min: {
97
+ readonly type: NumberConstructor;
98
+ readonly default: undefined;
99
+ };
100
+ readonly dot: {
101
+ readonly type: BooleanConstructor;
102
+ readonly default: false;
103
+ };
104
+ readonly hidden: {
105
+ readonly type: BooleanConstructor;
106
+ readonly default: false;
107
+ };
108
+ readonly showZero: {
109
+ readonly type: BooleanConstructor;
110
+ readonly default: false;
111
+ };
112
+ readonly type: {
113
+ readonly type: import('vue').PropType<import('.').BadgeType>;
114
+ readonly default: "error";
115
+ };
116
+ readonly color: {
117
+ readonly type: StringConstructor;
118
+ readonly default: "";
119
+ };
120
+ readonly textColor: {
121
+ readonly type: StringConstructor;
122
+ readonly default: "";
123
+ };
124
+ readonly variant: {
125
+ readonly type: import('vue').PropType<import('.').BadgeVariant>;
126
+ readonly default: "solid";
127
+ };
128
+ readonly offset: {
129
+ readonly type: import('vue').PropType<[number, number]>;
130
+ readonly default: undefined;
131
+ };
132
+ readonly size: {
133
+ readonly type: import('vue').PropType<import('.').BadgeSize>;
134
+ readonly default: "default";
135
+ };
136
+ }>> & Readonly<{}>, {}, {}, {}, {}, {
137
+ readonly size: import('.').BadgeSize;
138
+ readonly type: import('.').BadgeType;
139
+ readonly variant: import('.').BadgeVariant;
140
+ readonly color: string;
141
+ readonly textColor: string;
142
+ readonly hidden: boolean;
143
+ readonly value: string | number;
144
+ readonly min: number;
145
+ readonly max: number;
146
+ readonly dot: boolean;
147
+ readonly offset: [number, number];
148
+ readonly showZero: boolean;
149
+ }>;
150
+ __isFragment?: never;
151
+ __isTeleport?: never;
152
+ __isSuspense?: never;
153
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
154
+ readonly value: {
155
+ readonly type: import('vue').PropType<string | number>;
156
+ readonly default: "";
157
+ };
158
+ readonly max: {
159
+ readonly type: NumberConstructor;
160
+ readonly default: 99;
161
+ };
162
+ readonly min: {
163
+ readonly type: NumberConstructor;
164
+ readonly default: undefined;
165
+ };
166
+ readonly dot: {
167
+ readonly type: BooleanConstructor;
168
+ readonly default: false;
169
+ };
170
+ readonly hidden: {
171
+ readonly type: BooleanConstructor;
172
+ readonly default: false;
173
+ };
174
+ readonly showZero: {
175
+ readonly type: BooleanConstructor;
176
+ readonly default: false;
177
+ };
178
+ readonly type: {
179
+ readonly type: import('vue').PropType<import('.').BadgeType>;
180
+ readonly default: "error";
181
+ };
182
+ readonly color: {
183
+ readonly type: StringConstructor;
184
+ readonly default: "";
185
+ };
186
+ readonly textColor: {
187
+ readonly type: StringConstructor;
188
+ readonly default: "";
189
+ };
190
+ readonly variant: {
191
+ readonly type: import('vue').PropType<import('.').BadgeVariant>;
192
+ readonly default: "solid";
193
+ };
194
+ readonly offset: {
195
+ readonly type: import('vue').PropType<[number, number]>;
196
+ readonly default: undefined;
197
+ };
198
+ readonly size: {
199
+ readonly type: import('vue').PropType<import('.').BadgeSize>;
200
+ readonly default: "default";
201
+ };
202
+ }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
203
+ readonly size: import('.').BadgeSize;
204
+ readonly type: import('.').BadgeType;
205
+ readonly variant: import('.').BadgeVariant;
206
+ readonly color: string;
207
+ readonly textColor: string;
208
+ readonly hidden: boolean;
209
+ readonly value: string | number;
210
+ readonly min: number;
211
+ readonly max: number;
212
+ readonly dot: boolean;
213
+ readonly offset: [number, number];
214
+ readonly showZero: boolean;
215
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
216
+ $slots: {
217
+ default?(_: {}): any;
218
+ };
219
+ })>;
220
+ export default CpBadge;
221
+ export * from './src/badge';
222
+ export type { CpBadgeInstance } from './src/instance';
223
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../badge/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqB,CAAA;AAEzC,eAAe,OAAO,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,137 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ /**
3
+ * 徽章颜色类型
4
+ * - `primary` - 主要色(赛博蓝)
5
+ * - `success` - 成功色(霓虹绿)
6
+ * - `warning` - 警告色(赛博黄)
7
+ * - `error` - 错误色(霓虹红)
8
+ * - `info` - 信息色(中性蓝)
9
+ * - `default` - 默认中性色
10
+ */
11
+ export type BadgeType = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'default';
12
+ /**
13
+ * 徽章变体样式
14
+ * - `solid` - 实心填充(默认)
15
+ * - `outline` - 边框描边
16
+ * - `glow` - 发光效果
17
+ */
18
+ export type BadgeVariant = 'solid' | 'outline' | 'glow';
19
+ /**
20
+ * 徽章尺寸
21
+ * - `small` - 小尺寸
22
+ * - `default` - 默认尺寸
23
+ * - `large` - 大尺寸
24
+ */
25
+ export type BadgeSize = 'small' | 'default' | 'large';
26
+ /**
27
+ * CpBadge 组件 Props 定义
28
+ *
29
+ * @description 赛博朋克风格徽章组件,用于在另一个元素上显示数字、小红点或状态标识。
30
+ *
31
+ * @example
32
+ * ```vue
33
+ * <CpBadge :value="5">
34
+ * <CpButton>消息</CpButton>
35
+ * </CpBadge>
36
+ * ```
37
+ */
38
+ export declare const badgeProps: {
39
+ /**
40
+ * 徽章显示内容(数字或字符串)
41
+ * @default ''
42
+ */
43
+ readonly value: {
44
+ readonly type: PropType<string | number>;
45
+ readonly default: "";
46
+ };
47
+ /**
48
+ * 最大显示数值,超出显示 `{max}+`
49
+ * @default 99
50
+ */
51
+ readonly max: {
52
+ readonly type: NumberConstructor;
53
+ readonly default: 99;
54
+ };
55
+ /**
56
+ * 最小显示数值,低于时显示 `{min}-`
57
+ * @default undefined
58
+ */
59
+ readonly min: {
60
+ readonly type: NumberConstructor;
61
+ readonly default: undefined;
62
+ };
63
+ /**
64
+ * 小红点模式
65
+ * @default false
66
+ */
67
+ readonly dot: {
68
+ readonly type: BooleanConstructor;
69
+ readonly default: false;
70
+ };
71
+ /**
72
+ * 是否隐藏徽章
73
+ * @default false
74
+ */
75
+ readonly hidden: {
76
+ readonly type: BooleanConstructor;
77
+ readonly default: false;
78
+ };
79
+ /**
80
+ * 值为 0 时是否显示
81
+ * @default false
82
+ */
83
+ readonly showZero: {
84
+ readonly type: BooleanConstructor;
85
+ readonly default: false;
86
+ };
87
+ /**
88
+ * 徽章颜色类型
89
+ * @default 'error'
90
+ */
91
+ readonly type: {
92
+ readonly type: PropType<BadgeType>;
93
+ readonly default: "error";
94
+ };
95
+ /**
96
+ * 自定义背景颜色
97
+ * @default ''
98
+ */
99
+ readonly color: {
100
+ readonly type: StringConstructor;
101
+ readonly default: "";
102
+ };
103
+ /**
104
+ * 自定义文本颜色
105
+ * @default ''
106
+ */
107
+ readonly textColor: {
108
+ readonly type: StringConstructor;
109
+ readonly default: "";
110
+ };
111
+ /**
112
+ * 变体样式
113
+ * @default 'solid'
114
+ */
115
+ readonly variant: {
116
+ readonly type: PropType<BadgeVariant>;
117
+ readonly default: "solid";
118
+ };
119
+ /**
120
+ * 自定义偏移量 [x, y]
121
+ * @default undefined
122
+ */
123
+ readonly offset: {
124
+ readonly type: PropType<[number, number]>;
125
+ readonly default: undefined;
126
+ };
127
+ /**
128
+ * 徽章尺寸
129
+ * @default 'default'
130
+ */
131
+ readonly size: {
132
+ readonly type: PropType<BadgeSize>;
133
+ readonly default: "default";
134
+ };
135
+ };
136
+ export type BadgeProps = ExtractPropTypes<typeof badgeProps>;
137
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../badge/src/badge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAErD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAExF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU;IACnB;;;OAGG;;uBAE2B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGvD;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;uBAEiB,QAAQ,CAAC,SAAS,CAAC;;;IAGvC;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;OAGG;;uBAEiB,QAAQ,CAAC,YAAY,CAAC;;;IAG1C;;;OAGG;;uBAE2B,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;IAGxD;;;OAGG;;uBAEiB,QAAQ,CAAC,SAAS,CAAC;;;CAGjC,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,UAAU,CAAC,CAAA"}
@@ -0,0 +1,129 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
+ readonly value: {
12
+ readonly type: import('vue').PropType<string | number>;
13
+ readonly default: "";
14
+ };
15
+ readonly max: {
16
+ readonly type: NumberConstructor;
17
+ readonly default: 99;
18
+ };
19
+ readonly min: {
20
+ readonly type: NumberConstructor;
21
+ readonly default: undefined;
22
+ };
23
+ readonly dot: {
24
+ readonly type: BooleanConstructor;
25
+ readonly default: false;
26
+ };
27
+ readonly hidden: {
28
+ readonly type: BooleanConstructor;
29
+ readonly default: false;
30
+ };
31
+ readonly showZero: {
32
+ readonly type: BooleanConstructor;
33
+ readonly default: false;
34
+ };
35
+ readonly type: {
36
+ readonly type: import('vue').PropType<import('./badge').BadgeType>;
37
+ readonly default: "error";
38
+ };
39
+ readonly color: {
40
+ readonly type: StringConstructor;
41
+ readonly default: "";
42
+ };
43
+ readonly textColor: {
44
+ readonly type: StringConstructor;
45
+ readonly default: "";
46
+ };
47
+ readonly variant: {
48
+ readonly type: import('vue').PropType<import('./badge').BadgeVariant>;
49
+ readonly default: "solid";
50
+ };
51
+ readonly offset: {
52
+ readonly type: import('vue').PropType<[number, number]>;
53
+ readonly default: undefined;
54
+ };
55
+ readonly size: {
56
+ readonly type: import('vue').PropType<import('./badge').BadgeSize>;
57
+ readonly default: "default";
58
+ };
59
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
60
+ readonly value: {
61
+ readonly type: import('vue').PropType<string | number>;
62
+ readonly default: "";
63
+ };
64
+ readonly max: {
65
+ readonly type: NumberConstructor;
66
+ readonly default: 99;
67
+ };
68
+ readonly min: {
69
+ readonly type: NumberConstructor;
70
+ readonly default: undefined;
71
+ };
72
+ readonly dot: {
73
+ readonly type: BooleanConstructor;
74
+ readonly default: false;
75
+ };
76
+ readonly hidden: {
77
+ readonly type: BooleanConstructor;
78
+ readonly default: false;
79
+ };
80
+ readonly showZero: {
81
+ readonly type: BooleanConstructor;
82
+ readonly default: false;
83
+ };
84
+ readonly type: {
85
+ readonly type: import('vue').PropType<import('./badge').BadgeType>;
86
+ readonly default: "error";
87
+ };
88
+ readonly color: {
89
+ readonly type: StringConstructor;
90
+ readonly default: "";
91
+ };
92
+ readonly textColor: {
93
+ readonly type: StringConstructor;
94
+ readonly default: "";
95
+ };
96
+ readonly variant: {
97
+ readonly type: import('vue').PropType<import('./badge').BadgeVariant>;
98
+ readonly default: "solid";
99
+ };
100
+ readonly offset: {
101
+ readonly type: import('vue').PropType<[number, number]>;
102
+ readonly default: undefined;
103
+ };
104
+ readonly size: {
105
+ readonly type: import('vue').PropType<import('./badge').BadgeSize>;
106
+ readonly default: "default";
107
+ };
108
+ }>> & Readonly<{}>, {
109
+ readonly size: import('./badge').BadgeSize;
110
+ readonly type: import('./badge').BadgeType;
111
+ readonly variant: import('./badge').BadgeVariant;
112
+ readonly color: string;
113
+ readonly textColor: string;
114
+ readonly hidden: boolean;
115
+ readonly value: string | number;
116
+ readonly min: number;
117
+ readonly max: number;
118
+ readonly dot: boolean;
119
+ readonly offset: [number, number];
120
+ readonly showZero: boolean;
121
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
122
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
123
+ export default _default;
124
+ type __VLS_WithTemplateSlots<T, S> = T & {
125
+ new (): {
126
+ $slots: S;
127
+ };
128
+ };
129
+ //# sourceMappingURL=badge.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.vue.d.ts","sourceRoot":"","sources":["../../../badge/src/badge.vue"],"names":[],"mappings":"AA6MA,iBAAS,cAAc;WAiDT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAOnB,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"}
@@ -0,0 +1,3 @@
1
+ import { default as CpBadge } from './badge.vue';
2
+ export type CpBadgeInstance = InstanceType<typeof CpBadge> & unknown;
3
+ //# sourceMappingURL=instance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../../badge/src/instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,aAAa,CAAA;AAEtC,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,GAAG,OAAO,CAAA"}