@cyberpunk-vue/components 1.14.2 → 1.14.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.
@@ -37,6 +37,22 @@ export declare const CpText: import('../utils').SFCWithInstall<{
37
37
  readonly type: import('vue').PropType<import('.').TextAlign>;
38
38
  readonly default: "middle";
39
39
  };
40
+ readonly ellipsis: {
41
+ readonly type: BooleanConstructor;
42
+ readonly default: false;
43
+ };
44
+ readonly lineClamp: {
45
+ readonly type: import('vue').PropType<number | string>;
46
+ readonly default: undefined;
47
+ };
48
+ readonly contentClass: {
49
+ readonly type: import('vue').PropType<import('.').TextContentClassValue>;
50
+ readonly default: undefined;
51
+ };
52
+ readonly contentStyle: {
53
+ readonly type: import('vue').PropType<import('vue').StyleValue>;
54
+ readonly default: undefined;
55
+ };
40
56
  readonly underline: {
41
57
  readonly type: BooleanConstructor;
42
58
  readonly default: false;
@@ -123,8 +139,12 @@ export declare const CpText: import('../utils').SFCWithInstall<{
123
139
  readonly marker: boolean;
124
140
  readonly italic: boolean;
125
141
  readonly underline: boolean;
142
+ readonly ellipsis: boolean;
143
+ readonly lineClamp: string | number;
126
144
  readonly level: import('.').TextLevel;
127
145
  readonly align: import('.').TextAlign;
146
+ readonly contentClass: import('.').TextContentClassValue;
147
+ readonly contentStyle: import('vue').StyleValue;
128
148
  readonly boxed: boolean;
129
149
  readonly strikethrough: boolean;
130
150
  readonly glow: boolean;
@@ -171,6 +191,22 @@ export declare const CpText: import('../utils').SFCWithInstall<{
171
191
  readonly type: import('vue').PropType<import('.').TextAlign>;
172
192
  readonly default: "middle";
173
193
  };
194
+ readonly ellipsis: {
195
+ readonly type: BooleanConstructor;
196
+ readonly default: false;
197
+ };
198
+ readonly lineClamp: {
199
+ readonly type: import('vue').PropType<number | string>;
200
+ readonly default: undefined;
201
+ };
202
+ readonly contentClass: {
203
+ readonly type: import('vue').PropType<import('.').TextContentClassValue>;
204
+ readonly default: undefined;
205
+ };
206
+ readonly contentStyle: {
207
+ readonly type: import('vue').PropType<import('vue').StyleValue>;
208
+ readonly default: undefined;
209
+ };
174
210
  readonly underline: {
175
211
  readonly type: BooleanConstructor;
176
212
  readonly default: false;
@@ -257,8 +293,12 @@ export declare const CpText: import('../utils').SFCWithInstall<{
257
293
  readonly marker: boolean;
258
294
  readonly italic: boolean;
259
295
  readonly underline: boolean;
296
+ readonly ellipsis: boolean;
297
+ readonly lineClamp: string | number;
260
298
  readonly level: import('.').TextLevel;
261
299
  readonly align: import('.').TextAlign;
300
+ readonly contentClass: import('.').TextContentClassValue;
301
+ readonly contentStyle: import('vue').StyleValue;
262
302
  readonly boxed: boolean;
263
303
  readonly strikethrough: boolean;
264
304
  readonly glow: boolean;
@@ -302,6 +342,22 @@ export declare const CpText: import('../utils').SFCWithInstall<{
302
342
  readonly type: import('vue').PropType<import('.').TextAlign>;
303
343
  readonly default: "middle";
304
344
  };
345
+ readonly ellipsis: {
346
+ readonly type: BooleanConstructor;
347
+ readonly default: false;
348
+ };
349
+ readonly lineClamp: {
350
+ readonly type: import('vue').PropType<number | string>;
351
+ readonly default: undefined;
352
+ };
353
+ readonly contentClass: {
354
+ readonly type: import('vue').PropType<import('.').TextContentClassValue>;
355
+ readonly default: undefined;
356
+ };
357
+ readonly contentStyle: {
358
+ readonly type: import('vue').PropType<import('vue').StyleValue>;
359
+ readonly default: undefined;
360
+ };
305
361
  readonly underline: {
306
362
  readonly type: BooleanConstructor;
307
363
  readonly default: false;
@@ -388,8 +444,12 @@ export declare const CpText: import('../utils').SFCWithInstall<{
388
444
  readonly marker: boolean;
389
445
  readonly italic: boolean;
390
446
  readonly underline: boolean;
447
+ readonly ellipsis: boolean;
448
+ readonly lineClamp: string | number;
391
449
  readonly level: import('.').TextLevel;
392
450
  readonly align: import('.').TextAlign;
451
+ readonly contentClass: import('.').TextContentClassValue;
452
+ readonly contentStyle: import('vue').StyleValue;
393
453
  readonly boxed: boolean;
394
454
  readonly strikethrough: boolean;
395
455
  readonly glow: boolean;
@@ -1,4 +1,4 @@
1
- import { ExtractPropTypes, PropType } from 'vue';
1
+ import { ExtractPropTypes, PropType, StyleValue } from 'vue';
2
2
  import { DurationValue } from '@cyberpunk-vue/hooks';
3
3
  /**
4
4
  * 文字尺寸
@@ -39,6 +39,10 @@ export type TextAlign = 'top' | 'middle' | 'bottom';
39
39
  * 渲染标签
40
40
  */
41
41
  export type TextTag = 'span' | 'p' | 'div' | 'label' | 'strong' | 'em' | 'small' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
42
+ /**
43
+ * 文字本体 class 绑定值
44
+ */
45
+ export type TextContentClassValue = string | string[] | Record<string, boolean> | null | undefined;
42
46
  /**
43
47
  * CpText 组件 Props 定义
44
48
  *
@@ -121,6 +125,44 @@ export declare const textProps: {
121
125
  readonly type: PropType<TextAlign>;
122
126
  readonly default: "middle";
123
127
  };
128
+ /**
129
+ * 单行省略
130
+ * 开启后文字本体超出可用宽度时显示省略号;需要根节点或父容器提供明确宽度/最大宽度
131
+ * @default false
132
+ * @example `<CpText ellipsis style="max-width: 180px">很长的文字</CpText>`
133
+ */
134
+ readonly ellipsis: {
135
+ readonly type: BooleanConstructor;
136
+ readonly default: false;
137
+ };
138
+ /**
139
+ * 多行省略行数
140
+ * 传入数字或数字字符串后,文字本体会在指定行数后裁剪;优先级高于 ellipsis
141
+ * @default undefined
142
+ * @example `<CpText :line-clamp="2">很长的段落</CpText>`
143
+ */
144
+ readonly lineClamp: {
145
+ readonly type: PropType<number | string>;
146
+ readonly default: undefined;
147
+ };
148
+ /**
149
+ * 文字本体自定义类名
150
+ * class 仍作用于根节点;该属性用于定向控制内部 `.cp-text__content`
151
+ * @default undefined
152
+ */
153
+ readonly contentClass: {
154
+ readonly type: PropType<TextContentClassValue>;
155
+ readonly default: undefined;
156
+ };
157
+ /**
158
+ * 文字本体自定义样式
159
+ * style 仍作用于根节点;该属性用于定向控制内部 `.cp-text__content`
160
+ * @default undefined
161
+ */
162
+ readonly contentStyle: {
163
+ readonly type: PropType<StyleValue>;
164
+ readonly default: undefined;
165
+ };
124
166
  /**
125
167
  * 下划线效果
126
168
  * @default false
@@ -1,3 +1,4 @@
1
+ import { StyleValue } from 'vue';
1
2
  declare function __VLS_template(): {
2
3
  attrs: Partial<{}>;
3
4
  slots: {
@@ -34,6 +35,22 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
34
35
  readonly type: import('vue').PropType<import('./text').TextAlign>;
35
36
  readonly default: "middle";
36
37
  };
38
+ readonly ellipsis: {
39
+ readonly type: BooleanConstructor;
40
+ readonly default: false;
41
+ };
42
+ readonly lineClamp: {
43
+ readonly type: import('vue').PropType<number | string>;
44
+ readonly default: undefined;
45
+ };
46
+ readonly contentClass: {
47
+ readonly type: import('vue').PropType<import('./text').TextContentClassValue>;
48
+ readonly default: undefined;
49
+ };
50
+ readonly contentStyle: {
51
+ readonly type: import('vue').PropType<StyleValue>;
52
+ readonly default: undefined;
53
+ };
37
54
  readonly underline: {
38
55
  readonly type: BooleanConstructor;
39
56
  readonly default: false;
@@ -135,6 +152,22 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
135
152
  readonly type: import('vue').PropType<import('./text').TextAlign>;
136
153
  readonly default: "middle";
137
154
  };
155
+ readonly ellipsis: {
156
+ readonly type: BooleanConstructor;
157
+ readonly default: false;
158
+ };
159
+ readonly lineClamp: {
160
+ readonly type: import('vue').PropType<number | string>;
161
+ readonly default: undefined;
162
+ };
163
+ readonly contentClass: {
164
+ readonly type: import('vue').PropType<import('./text').TextContentClassValue>;
165
+ readonly default: undefined;
166
+ };
167
+ readonly contentStyle: {
168
+ readonly type: import('vue').PropType<StyleValue>;
169
+ readonly default: undefined;
170
+ };
138
171
  readonly underline: {
139
172
  readonly type: BooleanConstructor;
140
173
  readonly default: false;
@@ -221,8 +254,12 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
221
254
  readonly marker: boolean;
222
255
  readonly italic: boolean;
223
256
  readonly underline: boolean;
257
+ readonly ellipsis: boolean;
258
+ readonly lineClamp: string | number;
224
259
  readonly level: import('./text').TextLevel;
225
260
  readonly align: import('./text').TextAlign;
261
+ readonly contentClass: import('./text').TextContentClassValue;
262
+ readonly contentStyle: StyleValue;
226
263
  readonly boxed: boolean;
227
264
  readonly strikethrough: boolean;
228
265
  readonly glow: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberpunk-vue/components",
3
- "version": "1.14.2",
3
+ "version": "1.14.4",
4
4
  "description": "Cyberpunk Vue components - A futuristic Vue 3 component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -25,9 +25,9 @@
25
25
  "dependencies": {
26
26
  "@floating-ui/dom": "^1.7.6",
27
27
  "dayjs": "^1.11.20",
28
- "@cyberpunk-vue/constants": "1.14.2",
29
- "@cyberpunk-vue/hooks": "1.14.2",
30
- "@cyberpunk-vue/theme-chalk": "1.14.2"
28
+ "@cyberpunk-vue/hooks": "1.14.4",
29
+ "@cyberpunk-vue/theme-chalk": "1.14.4",
30
+ "@cyberpunk-vue/constants": "1.14.4"
31
31
  },
32
32
  "author": "Juxest",
33
33
  "license": "MIT",