@cyberpunk-vue/theme-chalk 1.14.0 → 1.14.2
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.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
- package/src/common/var.scss +247 -247
- package/src/components/avatar-group.scss +113 -113
- package/src/components/avatar.scss +123 -123
- package/src/components/badge.scss +210 -210
- package/src/components/breadcrumb.scss +203 -203
- package/src/components/button.scss +975 -975
- package/src/components/card.scss +699 -696
- package/src/components/checkbox-group.scss +22 -22
- package/src/components/checkbox.scss +320 -320
- package/src/components/col.scss +43 -43
- package/src/components/dialog.scss +360 -360
- package/src/components/divider.scss +250 -250
- package/src/components/empty.scss +99 -99
- package/src/components/form-item.scss +189 -189
- package/src/components/form.scss +59 -59
- package/src/components/icon.scss +83 -83
- package/src/components/image-preview.scss +147 -147
- package/src/components/image.scss +351 -351
- package/src/components/input-number.scss +129 -129
- package/src/components/input.scss +362 -362
- package/src/components/loading.scss +64 -64
- package/src/components/notification.scss +348 -348
- package/src/components/pagination.scss +287 -280
- package/src/components/pattern-background.scss +18 -18
- package/src/components/popover.scss +438 -438
- package/src/components/progress.scss +438 -438
- package/src/components/radio-group.scss +22 -22
- package/src/components/radio.scss +286 -286
- package/src/components/row.scss +12 -12
- package/src/components/scrollbar.scss +40 -40
- package/src/components/segmented.scss +566 -566
- package/src/components/select.scss +15 -1
- package/src/components/slider.scss +421 -421
- package/src/components/status-indicator.scss +206 -206
- package/src/components/switch.scss +405 -405
- package/src/components/table.scss +474 -474
- package/src/components/tag.scss +416 -416
- package/src/components/text.scss +310 -271
- package/src/components/textarea.scss +106 -104
- package/src/components/timeline.scss +379 -379
- package/src/components/tree.scss +397 -397
- package/src/components/upload.scss +509 -509
- package/src/index.scss +60 -60
- package/src/mixins/mixins.scss +156 -156
package/src/components/text.scss
CHANGED
|
@@ -1,271 +1,310 @@
|
|
|
1
|
-
// CpText 特殊文字组件样式
|
|
2
|
-
// 赛博朋克/机甲风格
|
|
3
|
-
|
|
4
|
-
@use "../common/var" as *;
|
|
5
|
-
@use "../mixins/mixins" as *;
|
|
6
|
-
|
|
7
|
-
// 尺寸配置
|
|
8
|
-
$text-sizes: (
|
|
9
|
-
sm: 12px,
|
|
10
|
-
md: 14px,
|
|
11
|
-
lg: 16px,
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
// 颜色映射
|
|
15
|
-
$text-types: (
|
|
16
|
-
primary: var(--cp-color-primary),
|
|
17
|
-
success: var(--cp-color-success),
|
|
18
|
-
warning: var(--cp-color-warning),
|
|
19
|
-
error: var(--cp-color-error),
|
|
20
|
-
info: var(--cp-color-info),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
@include b(text) {
|
|
24
|
-
// 基础样式 - 内联元素
|
|
25
|
-
display: inline-flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
position: relative;
|
|
28
|
-
font-family: inherit;
|
|
29
|
-
font-size: var(--cp-text-size, 14px);
|
|
30
|
-
vertical-align: middle;
|
|
31
|
-
transition: all 0.2s ease;
|
|
32
|
-
|
|
33
|
-
// CSS 变量默认值
|
|
34
|
-
--cp-text-color:
|
|
35
|
-
|
|
36
|
-
// ===== 内容区域 =====
|
|
37
|
-
@include e(content) {
|
|
38
|
-
display: inline-block; // 保证动画和滤镜正常工作
|
|
39
|
-
color: var(--cp-text-color);
|
|
40
|
-
vertical-align: middle;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// ===== 前缀元素 =====
|
|
44
|
-
@include e(prefix) {
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
margin-right: 4px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// ===== 后缀元素 =====
|
|
51
|
-
@include e(suffix) {
|
|
52
|
-
display: inline-flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
margin-left: 4px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// ===== 垂直对齐 =====
|
|
58
|
-
@include m(align-top) {
|
|
59
|
-
vertical-align: top;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@include m(align-middle) {
|
|
63
|
-
vertical-align: middle;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@include m(align-bottom) {
|
|
67
|
-
vertical-align: bottom;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// =====
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
//
|
|
155
|
-
@include when(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
1
|
+
// CpText 特殊文字组件样式
|
|
2
|
+
// 赛博朋克/机甲风格
|
|
3
|
+
|
|
4
|
+
@use "../common/var" as *;
|
|
5
|
+
@use "../mixins/mixins" as *;
|
|
6
|
+
|
|
7
|
+
// 尺寸配置
|
|
8
|
+
$text-sizes: (
|
|
9
|
+
sm: 12px,
|
|
10
|
+
md: 14px,
|
|
11
|
+
lg: 16px,
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
// 颜色映射
|
|
15
|
+
$text-types: (
|
|
16
|
+
primary: var(--cp-color-primary),
|
|
17
|
+
success: var(--cp-color-success),
|
|
18
|
+
warning: var(--cp-color-warning),
|
|
19
|
+
error: var(--cp-color-error),
|
|
20
|
+
info: var(--cp-color-info),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
@include b(text) {
|
|
24
|
+
// 基础样式 - 内联元素
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
position: relative;
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
font-size: var(--cp-text-size, 14px);
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
transition: all 0.2s ease;
|
|
32
|
+
|
|
33
|
+
// CSS 变量默认值
|
|
34
|
+
--cp-text-color: var(--cp-text-primary);
|
|
35
|
+
|
|
36
|
+
// ===== 内容区域 =====
|
|
37
|
+
@include e(content) {
|
|
38
|
+
display: inline-block; // 保证动画和滤镜正常工作
|
|
39
|
+
color: var(--cp-text-color);
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ===== 前缀元素 =====
|
|
44
|
+
@include e(prefix) {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
margin-right: 4px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ===== 后缀元素 =====
|
|
51
|
+
@include e(suffix) {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
margin-left: 4px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ===== 垂直对齐 =====
|
|
58
|
+
@include m(align-top) {
|
|
59
|
+
vertical-align: top;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include m(align-middle) {
|
|
63
|
+
vertical-align: middle;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@include m(align-bottom) {
|
|
67
|
+
vertical-align: bottom;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ===== 文字层级 =====
|
|
71
|
+
@include m(level-heading) {
|
|
72
|
+
--cp-text-size: 24px;
|
|
73
|
+
--cp-text-color: var(--cp-text-primary);
|
|
74
|
+
line-height: 1.2;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@include m(level-subheading) {
|
|
79
|
+
--cp-text-size: 17px;
|
|
80
|
+
--cp-text-color: var(--cp-text-secondary);
|
|
81
|
+
line-height: 1.35;
|
|
82
|
+
font-weight: 700;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@include m(level-body) {
|
|
86
|
+
--cp-text-size: 14px;
|
|
87
|
+
--cp-text-color: var(--cp-text-primary);
|
|
88
|
+
line-height: 1.75;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include m(level-secondary) {
|
|
92
|
+
--cp-text-size: 13px;
|
|
93
|
+
--cp-text-color: var(--cp-text-secondary);
|
|
94
|
+
line-height: 1.65;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@include m(level-caption) {
|
|
98
|
+
--cp-text-size: 12px;
|
|
99
|
+
--cp-text-color: var(--cp-text-muted);
|
|
100
|
+
line-height: 1.55;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include m(level-muted) {
|
|
104
|
+
--cp-text-size: 12px;
|
|
105
|
+
--cp-text-color: var(--cp-text-muted);
|
|
106
|
+
line-height: 1.6;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ===== 文字效果 =====
|
|
110
|
+
|
|
111
|
+
// 下划线
|
|
112
|
+
@include when(underline) {
|
|
113
|
+
.cp-text__content {
|
|
114
|
+
text-decoration: underline;
|
|
115
|
+
text-decoration-color: var(--cp-text-color);
|
|
116
|
+
text-underline-offset: 3px;
|
|
117
|
+
text-decoration-thickness: 2px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 虚线下划线
|
|
121
|
+
&.is-dashed .cp-text__content {
|
|
122
|
+
text-decoration-style: dashed;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 方框边框
|
|
127
|
+
@include when(boxed) {
|
|
128
|
+
.cp-text__content {
|
|
129
|
+
border: 1px solid var(--cp-text-color);
|
|
130
|
+
padding: 0 4px;
|
|
131
|
+
border-radius: 2px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 虚线边框
|
|
135
|
+
&.is-dashed .cp-text__content {
|
|
136
|
+
border-style: dashed;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// 加粗
|
|
141
|
+
@include when(bold) {
|
|
142
|
+
.cp-text__content {
|
|
143
|
+
font-weight: 700;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 斜体
|
|
148
|
+
@include when(italic) {
|
|
149
|
+
.cp-text__content {
|
|
150
|
+
font-style: italic;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// 删除线
|
|
155
|
+
@include when(strikethrough) {
|
|
156
|
+
.cp-text__content {
|
|
157
|
+
text-decoration: line-through;
|
|
158
|
+
text-decoration-color: var(--cp-text-color);
|
|
159
|
+
text-decoration-thickness: 2px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// 与下划线组合
|
|
163
|
+
&.is-underline .cp-text__content {
|
|
164
|
+
text-decoration: underline line-through;
|
|
165
|
+
text-decoration-color: var(--cp-text-color);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// 发光效果 (强度可控)
|
|
170
|
+
@include when(glow) {
|
|
171
|
+
--cp-text-glow-intensity: 3px; // 默认强度
|
|
172
|
+
|
|
173
|
+
.cp-text__content {
|
|
174
|
+
$intensity: var(--cp-text-glow-intensity);
|
|
175
|
+
text-shadow:
|
|
176
|
+
0 0 $intensity var(--cp-text-color),
|
|
177
|
+
0 0 calc(#{$intensity} * 2)
|
|
178
|
+
color-mix(in srgb, var(--cp-text-color) 50%, transparent);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// 发光心跳动画
|
|
183
|
+
@include when(glow-pulse) {
|
|
184
|
+
--cp-text-pulse-duration: 1.5s;
|
|
185
|
+
|
|
186
|
+
.cp-text__content {
|
|
187
|
+
// 注意:如果同时开启 light-wave,需要在 Vue 中处理动画合并
|
|
188
|
+
animation: cp-text-glow-pulse var(--cp-text-pulse-duration) ease-in-out
|
|
189
|
+
infinite;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// 光波扫射动画 (仅在文字上显示白色高光)
|
|
194
|
+
@include when(light-wave) {
|
|
195
|
+
--cp-text-wave-duration: 2s; // 默认时长
|
|
196
|
+
|
|
197
|
+
.cp-text__content {
|
|
198
|
+
position: relative;
|
|
199
|
+
// 使用渐变背景裁剪到文字
|
|
200
|
+
background:
|
|
201
|
+
linear-gradient(
|
|
202
|
+
105deg,
|
|
203
|
+
transparent 0%,
|
|
204
|
+
transparent 35%,
|
|
205
|
+
rgba(255, 255, 255, 0.8) 45%,
|
|
206
|
+
rgba(255, 255, 255, 0.9) 50%,
|
|
207
|
+
rgba(255, 255, 255, 0.8) 55%,
|
|
208
|
+
transparent 65%,
|
|
209
|
+
transparent 100%
|
|
210
|
+
),
|
|
211
|
+
linear-gradient(
|
|
212
|
+
var(--cp-text-color, currentColor),
|
|
213
|
+
var(--cp-text-color, currentColor)
|
|
214
|
+
);
|
|
215
|
+
background-size:
|
|
216
|
+
250% 100%,
|
|
217
|
+
100% 100%;
|
|
218
|
+
background-position:
|
|
219
|
+
150% 0,
|
|
220
|
+
0 0;
|
|
221
|
+
background-clip: text;
|
|
222
|
+
-webkit-background-clip: text;
|
|
223
|
+
-webkit-text-fill-color: transparent;
|
|
224
|
+
animation: cp-text-light-wave var(--cp-text-wave-duration) linear infinite;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 马克笔背景效果 (支持自定义颜色)
|
|
229
|
+
@include when(marker) {
|
|
230
|
+
--cp-text-marker-color: var(--cp-text-color); // 默认使用文字颜色
|
|
231
|
+
|
|
232
|
+
.cp-text__content {
|
|
233
|
+
background: linear-gradient(
|
|
234
|
+
to bottom,
|
|
235
|
+
transparent 40%,
|
|
236
|
+
color-mix(in srgb, var(--cp-text-marker-color) 40%, transparent) 40%,
|
|
237
|
+
color-mix(in srgb, var(--cp-text-marker-color) 40%, transparent) 90%,
|
|
238
|
+
transparent 90%
|
|
239
|
+
);
|
|
240
|
+
padding: 0 2px;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// 重叠文字效果 (text-shadow 错位重影)
|
|
245
|
+
@include when(overlap) {
|
|
246
|
+
--cp-text-overlap-offset-x: 2px;
|
|
247
|
+
--cp-text-overlap-offset-y: 2px;
|
|
248
|
+
--cp-text-overlap-color: color-mix(
|
|
249
|
+
in srgb,
|
|
250
|
+
var(--cp-text-color) 60%,
|
|
251
|
+
black
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
.cp-text__content {
|
|
255
|
+
text-shadow: var(--cp-text-overlap-offset-x)
|
|
256
|
+
var(--cp-text-overlap-offset-y) 0 var(--cp-text-overlap-color);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// ===== 颜色类型 =====
|
|
261
|
+
@include when(typed) {
|
|
262
|
+
color: var(--cp-text-color);
|
|
263
|
+
|
|
264
|
+
.cp-text__content {
|
|
265
|
+
color: var(--cp-text-color);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// ===== 自定义颜色 =====
|
|
270
|
+
@include when(custom-color) {
|
|
271
|
+
color: var(--cp-text-color);
|
|
272
|
+
|
|
273
|
+
.cp-text__content {
|
|
274
|
+
color: var(--cp-text-color);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ===== 禁止选中 =====
|
|
279
|
+
@include when(unselectable) {
|
|
280
|
+
user-select: none;
|
|
281
|
+
cursor: default;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// 发光脉冲动画 (明显的心跳效果)
|
|
286
|
+
@keyframes cp-text-glow-pulse {
|
|
287
|
+
0%,
|
|
288
|
+
100% {
|
|
289
|
+
opacity: 1;
|
|
290
|
+
filter: brightness(1) drop-shadow(0 0 2px currentColor);
|
|
291
|
+
}
|
|
292
|
+
50% {
|
|
293
|
+
opacity: 0.85;
|
|
294
|
+
filter: brightness(1.4) drop-shadow(0 0 10px currentColor);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// 光波扫射动画 (完整扫过文字)
|
|
299
|
+
@keyframes cp-text-light-wave {
|
|
300
|
+
0% {
|
|
301
|
+
background-position:
|
|
302
|
+
150% 0,
|
|
303
|
+
0 0;
|
|
304
|
+
}
|
|
305
|
+
100% {
|
|
306
|
+
background-position:
|
|
307
|
+
-50% 0,
|
|
308
|
+
0 0;
|
|
309
|
+
}
|
|
310
|
+
}
|