@cyberpunk-vue/theme-chalk 1.14.0 → 1.14.1

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.
Files changed (47) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/common/var.scss +247 -247
  5. package/src/components/avatar-group.scss +113 -113
  6. package/src/components/avatar.scss +123 -123
  7. package/src/components/badge.scss +210 -210
  8. package/src/components/breadcrumb.scss +203 -203
  9. package/src/components/button.scss +975 -975
  10. package/src/components/card.scss +696 -696
  11. package/src/components/checkbox-group.scss +22 -22
  12. package/src/components/checkbox.scss +320 -320
  13. package/src/components/col.scss +43 -43
  14. package/src/components/dialog.scss +359 -359
  15. package/src/components/divider.scss +250 -250
  16. package/src/components/empty.scss +99 -99
  17. package/src/components/form-item.scss +189 -189
  18. package/src/components/form.scss +59 -59
  19. package/src/components/icon.scss +83 -83
  20. package/src/components/image-preview.scss +147 -147
  21. package/src/components/image.scss +351 -351
  22. package/src/components/input-number.scss +129 -129
  23. package/src/components/input.scss +362 -362
  24. package/src/components/loading.scss +64 -64
  25. package/src/components/notification.scss +348 -348
  26. package/src/components/pagination.scss +287 -280
  27. package/src/components/pattern-background.scss +18 -18
  28. package/src/components/popover.scss +438 -438
  29. package/src/components/progress.scss +438 -438
  30. package/src/components/radio-group.scss +22 -22
  31. package/src/components/radio.scss +286 -286
  32. package/src/components/row.scss +12 -12
  33. package/src/components/scrollbar.scss +40 -40
  34. package/src/components/segmented.scss +566 -566
  35. package/src/components/select.scss +15 -1
  36. package/src/components/slider.scss +421 -421
  37. package/src/components/status-indicator.scss +206 -206
  38. package/src/components/switch.scss +405 -405
  39. package/src/components/table.scss +474 -474
  40. package/src/components/tag.scss +416 -416
  41. package/src/components/text.scss +310 -271
  42. package/src/components/textarea.scss +106 -104
  43. package/src/components/timeline.scss +379 -379
  44. package/src/components/tree.scss +397 -397
  45. package/src/components/upload.scss +509 -509
  46. package/src/index.scss +60 -60
  47. package/src/mixins/mixins.scss +156 -156
@@ -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: inherit;
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
- @include when(underline) {
74
- .cp-text__content {
75
- text-decoration: underline;
76
- text-decoration-color: var(--cp-text-color);
77
- text-underline-offset: 3px;
78
- text-decoration-thickness: 2px;
79
- }
80
-
81
- // 虚线下划线
82
- &.is-dashed .cp-text__content {
83
- text-decoration-style: dashed;
84
- }
85
- }
86
-
87
- // 方框边框
88
- @include when(boxed) {
89
- .cp-text__content {
90
- border: 1px solid var(--cp-text-color);
91
- padding: 0 4px;
92
- border-radius: 2px;
93
- }
94
-
95
- // 虚线边框
96
- &.is-dashed .cp-text__content {
97
- border-style: dashed;
98
- }
99
- }
100
-
101
- // 加粗
102
- @include when(bold) {
103
- .cp-text__content {
104
- font-weight: 700;
105
- }
106
- }
107
-
108
- // 斜体
109
- @include when(italic) {
110
- .cp-text__content {
111
- font-style: italic;
112
- }
113
- }
114
-
115
- // 删除线
116
- @include when(strikethrough) {
117
- .cp-text__content {
118
- text-decoration: line-through;
119
- text-decoration-color: var(--cp-text-color);
120
- text-decoration-thickness: 2px;
121
- }
122
-
123
- // 与下划线组合
124
- &.is-underline .cp-text__content {
125
- text-decoration: underline line-through;
126
- text-decoration-color: var(--cp-text-color);
127
- }
128
- }
129
-
130
- // 发光效果 (强度可控)
131
- @include when(glow) {
132
- --cp-text-glow-intensity: 3px; // 默认强度
133
-
134
- .cp-text__content {
135
- $intensity: var(--cp-text-glow-intensity);
136
- text-shadow:
137
- 0 0 $intensity var(--cp-text-color),
138
- 0 0 calc(#{$intensity} * 2)
139
- color-mix(in srgb, var(--cp-text-color) 50%, transparent);
140
- }
141
- }
142
-
143
- // 发光心跳动画
144
- @include when(glow-pulse) {
145
- --cp-text-pulse-duration: 1.5s;
146
-
147
- .cp-text__content {
148
- // 注意:如果同时开启 light-wave,需要在 Vue 中处理动画合并
149
- animation: cp-text-glow-pulse var(--cp-text-pulse-duration) ease-in-out
150
- infinite;
151
- }
152
- }
153
-
154
- // 光波扫射动画 (仅在文字上显示白色高光)
155
- @include when(light-wave) {
156
- --cp-text-wave-duration: 2s; // 默认时长
157
-
158
- .cp-text__content {
159
- position: relative;
160
- // 使用渐变背景裁剪到文字
161
- background:
162
- linear-gradient(
163
- 105deg,
164
- transparent 0%,
165
- transparent 35%,
166
- rgba(255, 255, 255, 0.8) 45%,
167
- rgba(255, 255, 255, 0.9) 50%,
168
- rgba(255, 255, 255, 0.8) 55%,
169
- transparent 65%,
170
- transparent 100%
171
- ),
172
- linear-gradient(
173
- var(--cp-text-color, currentColor),
174
- var(--cp-text-color, currentColor)
175
- );
176
- background-size:
177
- 250% 100%,
178
- 100% 100%;
179
- background-position:
180
- 150% 0,
181
- 0 0;
182
- background-clip: text;
183
- -webkit-background-clip: text;
184
- -webkit-text-fill-color: transparent;
185
- animation: cp-text-light-wave var(--cp-text-wave-duration) linear infinite;
186
- }
187
- }
188
-
189
- // 马克笔背景效果 (支持自定义颜色)
190
- @include when(marker) {
191
- --cp-text-marker-color: var(--cp-text-color); // 默认使用文字颜色
192
-
193
- .cp-text__content {
194
- background: linear-gradient(
195
- to bottom,
196
- transparent 40%,
197
- color-mix(in srgb, var(--cp-text-marker-color) 40%, transparent) 40%,
198
- color-mix(in srgb, var(--cp-text-marker-color) 40%, transparent) 90%,
199
- transparent 90%
200
- );
201
- padding: 0 2px;
202
- }
203
- }
204
-
205
- // 重叠文字效果 (text-shadow 错位重影)
206
- @include when(overlap) {
207
- --cp-text-overlap-offset-x: 2px;
208
- --cp-text-overlap-offset-y: 2px;
209
- --cp-text-overlap-color: color-mix(
210
- in srgb,
211
- var(--cp-text-color) 60%,
212
- black
213
- );
214
-
215
- .cp-text__content {
216
- text-shadow: var(--cp-text-overlap-offset-x)
217
- var(--cp-text-overlap-offset-y) 0 var(--cp-text-overlap-color);
218
- }
219
- }
220
-
221
- // ===== 颜色类型 =====
222
- @include when(typed) {
223
- color: var(--cp-text-color);
224
-
225
- .cp-text__content {
226
- color: var(--cp-text-color);
227
- }
228
- }
229
-
230
- // ===== 自定义颜色 =====
231
- @include when(custom-color) {
232
- color: var(--cp-text-color);
233
-
234
- .cp-text__content {
235
- color: var(--cp-text-color);
236
- }
237
- }
238
-
239
- // ===== 禁止选中 =====
240
- @include when(unselectable) {
241
- user-select: none;
242
- cursor: default;
243
- }
244
- }
245
-
246
- // 发光脉冲动画 (明显的心跳效果)
247
- @keyframes cp-text-glow-pulse {
248
- 0%,
249
- 100% {
250
- opacity: 1;
251
- filter: brightness(1) drop-shadow(0 0 2px currentColor);
252
- }
253
- 50% {
254
- opacity: 0.85;
255
- filter: brightness(1.4) drop-shadow(0 0 10px currentColor);
256
- }
257
- }
258
-
259
- // 光波扫射动画 (完整扫过文字)
260
- @keyframes cp-text-light-wave {
261
- 0% {
262
- background-position:
263
- 150% 0,
264
- 0 0;
265
- }
266
- 100% {
267
- background-position:
268
- -50% 0,
269
- 0 0;
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
+ }