@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.
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 +699 -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 +360 -360
  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,97 +1,97 @@
1
- // CpDialog 组件样式
2
- // 赛博朋克/机甲风格模态对话框
3
-
4
- @use '../common/var' as *;
5
- @use '../mixins/mixins' as *;
6
-
7
- // ===== 动画 =====
8
- @keyframes cp-dialog-fade-in {
9
- from {
10
- opacity: 0;
11
- }
12
- to {
13
- opacity: 1;
14
- }
15
- }
16
-
17
- @keyframes cp-dialog-fade-out {
18
- from {
19
- opacity: 1;
20
- }
21
- to {
22
- opacity: 0;
23
- }
24
- }
25
-
26
- @keyframes cp-dialog-panel-in {
27
- from {
28
- opacity: 0;
29
- transform: scale(0.92) translateY(-10px);
30
- }
31
- to {
32
- opacity: 1;
33
- transform: scale(1) translateY(0);
34
- }
35
- }
36
-
37
- @keyframes cp-dialog-panel-out {
38
- from {
39
- opacity: 1;
40
- transform: scale(1) translateY(0);
41
- }
42
- to {
43
- opacity: 0;
44
- transform: scale(0.92) translateY(-10px);
45
- }
46
- }
47
-
48
- // 抖动动画 — 禁止关闭时的反馈
49
- @keyframes cp-dialog-shake {
50
- 0% { transform: translateX(0); }
51
- 15% { transform: translateX(-6px); }
52
- 30% { transform: translateX(5px); }
53
- 45% { transform: translateX(-4px); }
54
- 60% { transform: translateX(3px); }
55
- 75% { transform: translateX(-1px); }
56
- 100% { transform: translateX(0); }
57
- }
58
-
59
- // Transition classes
60
- .cp-dialog-fade-enter-active {
61
- animation: cp-dialog-fade-in 0.25s ease-out;
62
-
63
- .cp-dialog__panel {
64
- animation: cp-dialog-panel-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
65
- }
66
- }
67
-
68
- .cp-dialog-fade-leave-active {
69
- animation: cp-dialog-fade-out 0.2s ease-in forwards;
70
-
71
- .cp-dialog__panel {
72
- animation: cp-dialog-panel-out 0.2s ease-in forwards;
73
- }
74
- }
75
-
76
- @include b(dialog) {
77
-
78
- // ===== 遮罩层 =====
79
- @include e(overlay) {
80
- position: fixed;
81
- inset: 0;
82
- background: var(--cp-dialog-overlay-color, var(--cp-scrim));
83
- overflow: auto;
84
- scrollbar-gutter: stable both-edges; // 两侧预留 scroll-bar 空间,避免弹窗跳动
85
- }
86
-
87
- // ===== 定位容器 =====
88
- @include e(wrapper) {
89
- display: flex;
90
- align-items: flex-start;
91
- justify-content: center;
92
- min-height: 100%;
93
- padding: 16px;
94
-
1
+ // CpDialog 组件样式
2
+ // 赛博朋克/机甲风格模态对话框
3
+
4
+ @use '../common/var' as *;
5
+ @use '../mixins/mixins' as *;
6
+
7
+ // ===== 动画 =====
8
+ @keyframes cp-dialog-fade-in {
9
+ from {
10
+ opacity: 0;
11
+ }
12
+ to {
13
+ opacity: 1;
14
+ }
15
+ }
16
+
17
+ @keyframes cp-dialog-fade-out {
18
+ from {
19
+ opacity: 1;
20
+ }
21
+ to {
22
+ opacity: 0;
23
+ }
24
+ }
25
+
26
+ @keyframes cp-dialog-panel-in {
27
+ from {
28
+ opacity: 0;
29
+ transform: scale(0.92) translateY(-10px);
30
+ }
31
+ to {
32
+ opacity: 1;
33
+ transform: scale(1) translateY(0);
34
+ }
35
+ }
36
+
37
+ @keyframes cp-dialog-panel-out {
38
+ from {
39
+ opacity: 1;
40
+ transform: scale(1) translateY(0);
41
+ }
42
+ to {
43
+ opacity: 0;
44
+ transform: scale(0.92) translateY(-10px);
45
+ }
46
+ }
47
+
48
+ // 抖动动画 — 禁止关闭时的反馈
49
+ @keyframes cp-dialog-shake {
50
+ 0% { transform: translateX(0); }
51
+ 15% { transform: translateX(-6px); }
52
+ 30% { transform: translateX(5px); }
53
+ 45% { transform: translateX(-4px); }
54
+ 60% { transform: translateX(3px); }
55
+ 75% { transform: translateX(-1px); }
56
+ 100% { transform: translateX(0); }
57
+ }
58
+
59
+ // Transition classes
60
+ .cp-dialog-fade-enter-active {
61
+ animation: cp-dialog-fade-in 0.25s ease-out;
62
+
63
+ .cp-dialog__panel {
64
+ animation: cp-dialog-panel-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
65
+ }
66
+ }
67
+
68
+ .cp-dialog-fade-leave-active {
69
+ animation: cp-dialog-fade-out 0.2s ease-in forwards;
70
+
71
+ .cp-dialog__panel {
72
+ animation: cp-dialog-panel-out 0.2s ease-in forwards;
73
+ }
74
+ }
75
+
76
+ @include b(dialog) {
77
+
78
+ // ===== 遮罩层 =====
79
+ @include e(overlay) {
80
+ position: fixed;
81
+ inset: 0;
82
+ background: var(--cp-dialog-overlay-color, var(--cp-scrim));
83
+ overflow: auto;
84
+ scrollbar-gutter: stable both-edges; // 两侧预留 scroll-bar 空间,避免弹窗跳动
85
+ }
86
+
87
+ // ===== 定位容器 =====
88
+ @include e(wrapper) {
89
+ display: flex;
90
+ align-items: flex-start;
91
+ justify-content: center;
92
+ min-height: 100%;
93
+ padding: 16px;
94
+
95
95
  &.is-fullscreen {
96
96
  --cp-dialog-fullscreen-inset-top: env(safe-area-inset-top, 0px);
97
97
  --cp-dialog-fullscreen-inset-right: env(safe-area-inset-right, 0px);
@@ -107,40 +107,40 @@
107
107
  var(--cp-dialog-fullscreen-inset-left);
108
108
  box-sizing: border-box;
109
109
  }
110
-
111
- &.is-align-center {
112
- align-items: center;
113
- min-height: 100vh;
114
- }
115
- }
116
-
117
- // ===== 面板 =====
118
- @include e(panel) {
119
- --cp-dialog-color: var(--cp-border);
120
- --cp-dialog-color-light: rgba(255, 255, 255, 0.1);
121
- --cp-dialog-bg: var(--cp-bg-elevated);
122
- --cp-dialog-clip-path: polygon(
123
- 12px 0, 100% 0,
124
- 100% calc(100% - 12px), calc(100% - 12px) 100%,
125
- 0 100%, 0 12px
126
- );
127
-
128
- position: relative;
129
- display: flex;
130
- flex-direction: column;
131
- max-width: calc(100vw - 32px);
132
- max-height: calc(100vh - 32px);
133
- background: var(--cp-dialog-bg);
134
- border: 1px solid var(--cp-dialog-border-color, var(--cp-border));
135
- box-shadow:
136
- 0 8px 32px rgba(0, 0, 0, 0.5),
137
- 0 0 1px var(--cp-dialog-color),
138
- inset 0 0 30px color-mix(in srgb, var(--cp-color-primary) 2%, transparent);
139
- clip-path: var(--cp-dialog-clip-path);
140
- color: var(--cp-dialog-text-color, var(--cp-text-primary));
141
- transition: transform 0s;
142
-
143
- // 全屏
110
+
111
+ &.is-align-center {
112
+ align-items: center;
113
+ min-height: 100vh;
114
+ }
115
+ }
116
+
117
+ // ===== 面板 =====
118
+ @include e(panel) {
119
+ --cp-dialog-color: var(--cp-border);
120
+ --cp-dialog-color-light: rgba(255, 255, 255, 0.1);
121
+ --cp-dialog-bg: var(--cp-bg-elevated);
122
+ --cp-dialog-clip-path: polygon(
123
+ 12px 0, 100% 0,
124
+ 100% calc(100% - 12px), calc(100% - 12px) 100%,
125
+ 0 100%, 0 12px
126
+ );
127
+
128
+ position: relative;
129
+ display: flex;
130
+ flex-direction: column;
131
+ max-width: calc(100vw - 32px);
132
+ max-height: calc(100vh - 32px);
133
+ background: var(--cp-dialog-bg);
134
+ border: 1px solid var(--cp-dialog-border-color, var(--cp-border));
135
+ box-shadow:
136
+ 0 8px 32px rgba(0, 0, 0, 0.5),
137
+ 0 0 1px var(--cp-dialog-color),
138
+ inset 0 0 30px color-mix(in srgb, var(--cp-color-primary) 2%, transparent);
139
+ clip-path: var(--cp-dialog-clip-path);
140
+ color: var(--cp-dialog-text-color, var(--cp-text-primary));
141
+ transition: transform 0s;
142
+
143
+ // 全屏
144
144
  &.is-fullscreen {
145
145
  width: 100% !important;
146
146
  max-width: calc(100vw - var(--cp-dialog-fullscreen-inset-left, 0px) - var(--cp-dialog-fullscreen-inset-right, 0px));
@@ -149,26 +149,26 @@
149
149
  margin-top: 0 !important;
150
150
  clip-path: none;
151
151
  border-radius: 0;
152
- }
153
-
154
- // 居中对齐模式
155
- &.is-center {
156
- .cp-dialog__title {
157
- text-align: center;
158
- justify-content: center;
159
-
160
- &::before {
161
- display: none;
162
- }
163
- }
164
- }
165
-
166
- // 可拖拽光标
167
- &.is-draggable {
168
- will-change: transform;
169
- }
170
-
171
- // 拖拽中 — 禁止文字选中
152
+ }
153
+
154
+ // 居中对齐模式
155
+ &.is-center {
156
+ .cp-dialog__title {
157
+ text-align: center;
158
+ justify-content: center;
159
+
160
+ &::before {
161
+ display: none;
162
+ }
163
+ }
164
+ }
165
+
166
+ // 可拖拽光标
167
+ &.is-draggable {
168
+ will-change: transform;
169
+ }
170
+
171
+ // 拖拽中 — 禁止文字选中
172
172
  &.is-dragging {
173
173
  user-select: none;
174
174
  }
@@ -176,195 +176,195 @@
176
176
  &.is-loading {
177
177
  cursor: progress;
178
178
  }
179
-
180
- // 抖动反馈 — 禁止关闭时触发
181
- &.is-shaking {
182
- animation: cp-dialog-shake 0.4s ease-out !important;
183
- // 闪烁边框高亮
184
- border-color: var(--cp-dialog-color, var(--cp-color-primary));
185
- box-shadow:
186
- 0 8px 32px rgba(0, 0, 0, 0.5),
187
- 0 0 12px var(--cp-dialog-color-light, var(--cp-color-primary-light)),
188
- inset 0 0 30px color-mix(in srgb, var(--cp-color-primary) 4%, transparent);
189
- }
190
-
191
-
192
- // ===== 类型变体 =====
193
- @each $type in (primary, success, warning, error, info) {
194
- &.cp-dialog--#{$type} {
195
- --cp-dialog-color: var(--cp-color-#{$type});
196
- --cp-dialog-color-light: var(--cp-color-#{$type}-light);
197
- }
198
- }
199
-
200
- // ===== 变体样式 =====
201
-
202
- // Solid
203
- &.cp-dialog--solid {
204
- background: var(--cp-dialog-bg);
205
-
206
- // 顶部荧光线
207
- &::before {
208
- content: '';
209
- position: absolute;
210
- top: 0;
211
- left: 0;
212
- width: 100%;
213
- height: 48px;
214
- background: linear-gradient(to bottom, var(--cp-dialog-color) 2px, var(--cp-dialog-color-light) 2px, transparent 100%);
215
- opacity: 0;
216
- pointer-events: none;
217
- z-index: 1;
218
- transition: opacity 0.3s ease;
219
- }
220
-
221
- // 有主题色时显示荧光线
222
- &.cp-dialog--primary::before,
223
- &.cp-dialog--success::before,
224
- &.cp-dialog--warning::before,
225
- &.cp-dialog--error::before,
226
- &.cp-dialog--info::before {
227
- opacity: 0.8;
228
- }
229
-
230
- // 自定义 color 也显示
231
- &[style*='--cp-dialog-color']::before {
232
- opacity: 0.8;
233
- }
234
- }
235
-
236
- // Semi (毛玻璃)
237
- &.cp-dialog--semi {
238
- --cp-dialog-bg: color-mix(in srgb, var(--cp-border) 60%, transparent);
239
- backdrop-filter: blur(12px);
240
- border-color: var(--cp-dialog-color-light);
241
-
242
- &.cp-dialog--primary,
243
- &.cp-dialog--success,
244
- &.cp-dialog--warning,
245
- &.cp-dialog--error,
246
- &.cp-dialog--info {
247
- --cp-dialog-bg: color-mix(in srgb, var(--cp-bg-elevated) 80%, var(--cp-dialog-color));
248
- }
249
- }
250
-
251
- // Outline
252
- &.cp-dialog--outline {
253
- background: transparent;
254
- border-color: var(--cp-dialog-color);
255
- backdrop-filter: blur(6px);
256
-
257
- &.cp-dialog--default {
258
- border-color: var(--cp-border);
259
- }
260
- }
261
-
262
- // ===== 形状 =====
263
- &.cp-dialog--shape-clip {
264
- clip-path: var(--cp-dialog-clip-path);
265
- }
266
-
267
- &.cp-dialog--shape-no-clip {
268
- clip-path: none;
269
- border-radius: 0;
270
-
271
- .cp-dialog__decor {
272
- display: none;
273
- }
274
- }
275
-
276
- &.cp-dialog--shape-round {
277
- clip-path: none;
278
- border-radius: var(--cp-radius-lg);
279
- overflow: hidden;
280
-
281
- .cp-dialog__decor {
282
- display: none;
283
- }
284
- }
285
- }
286
-
287
- // ===== 装饰方块 (右上角) =====
288
- @include e(decor) {
289
- position: absolute;
290
- top: 0;
291
- right: 0;
292
- width: 12px;
293
- height: 12px;
294
- background: var(--cp-dialog-color);
295
- opacity: 0.5;
296
- z-index: 2;
297
- transition: opacity 0.3s ease;
298
-
299
- .cp-dialog__panel:hover & {
300
- opacity: 1;
301
- }
302
- }
303
- // ===== 封面区域 =====
304
- @include e(cover) {
305
- line-height: 0;
306
- overflow: hidden;
307
- flex-shrink: 0;
308
-
309
- img, video {
310
- width: 100%;
311
- display: block;
312
- }
313
- }
314
-
315
- // ===== 头部 =====
316
- @include e(header) {
317
- display: flex;
318
- align-items: center;
319
- justify-content: space-between;
320
- padding: var(--cp-spacing-md) var(--cp-spacing-lg);
321
- min-height: 52px;
322
- flex-shrink: 0;
323
- position: relative;
324
- z-index: 2;
325
-
326
- &.is-bordered {
327
- border-bottom: 1px solid var(--cp-dialog-header-divider-color, var(--cp-border));
328
- }
329
-
330
- &.is-draggable {
331
- cursor: move;
332
- user-select: none;
333
- }
334
- }
335
-
336
- // ===== 标题 =====
337
- @include e(title) {
338
- display: flex;
339
- align-items: center;
340
- font-family: var(--cp-font-family-display);
341
- font-weight: 600;
342
- font-size: var(--cp-font-size-lg);
343
- text-transform: uppercase;
344
- letter-spacing: 0.05em;
345
- color: var(--cp-dialog-title-color, var(--cp-text-primary));
346
- flex: 1;
347
- min-width: 0;
348
-
349
- // 左侧竖线装饰
350
- &::before {
351
- content: '';
352
- display: inline-block;
353
- width: 3px;
354
- height: 1.1em;
355
- background: var(--cp-dialog-color);
356
- margin-right: var(--cp-spacing-sm);
357
- flex-shrink: 0;
358
- }
359
- }
360
-
361
- // ===== 关闭按钮(CpButton) =====
362
- @include e(close) {
363
- flex-shrink: 0;
364
- margin-left: var(--cp-spacing-sm);
365
- }
366
-
367
- // ===== 内容区 =====
179
+
180
+ // 抖动反馈 — 禁止关闭时触发
181
+ &.is-shaking {
182
+ animation: cp-dialog-shake 0.4s ease-out !important;
183
+ // 闪烁边框高亮
184
+ border-color: var(--cp-dialog-color, var(--cp-color-primary));
185
+ box-shadow:
186
+ 0 8px 32px rgba(0, 0, 0, 0.5),
187
+ 0 0 12px var(--cp-dialog-color-light, var(--cp-color-primary-light)),
188
+ inset 0 0 30px color-mix(in srgb, var(--cp-color-primary) 4%, transparent);
189
+ }
190
+
191
+
192
+ // ===== 类型变体 =====
193
+ @each $type in (primary, success, warning, error, info) {
194
+ &.cp-dialog--#{$type} {
195
+ --cp-dialog-color: var(--cp-color-#{$type});
196
+ --cp-dialog-color-light: var(--cp-color-#{$type}-light);
197
+ }
198
+ }
199
+
200
+ // ===== 变体样式 =====
201
+
202
+ // Solid
203
+ &.cp-dialog--solid {
204
+ background: var(--cp-dialog-bg);
205
+
206
+ // 顶部荧光线
207
+ &::before {
208
+ content: '';
209
+ position: absolute;
210
+ top: 0;
211
+ left: 0;
212
+ width: 100%;
213
+ height: 48px;
214
+ background: linear-gradient(to bottom, var(--cp-dialog-color) 2px, var(--cp-dialog-color-light) 2px, transparent 100%);
215
+ opacity: 0;
216
+ pointer-events: none;
217
+ z-index: 1;
218
+ transition: opacity 0.3s ease;
219
+ }
220
+
221
+ // 有主题色时显示荧光线
222
+ &.cp-dialog--primary::before,
223
+ &.cp-dialog--success::before,
224
+ &.cp-dialog--warning::before,
225
+ &.cp-dialog--error::before,
226
+ &.cp-dialog--info::before {
227
+ opacity: 0.8;
228
+ }
229
+
230
+ // 自定义 color 也显示
231
+ &[style*='--cp-dialog-color']::before {
232
+ opacity: 0.8;
233
+ }
234
+ }
235
+
236
+ // Semi (毛玻璃)
237
+ &.cp-dialog--semi {
238
+ --cp-dialog-bg: color-mix(in srgb, var(--cp-border) 60%, transparent);
239
+ backdrop-filter: blur(12px);
240
+ border-color: var(--cp-dialog-color-light);
241
+
242
+ &.cp-dialog--primary,
243
+ &.cp-dialog--success,
244
+ &.cp-dialog--warning,
245
+ &.cp-dialog--error,
246
+ &.cp-dialog--info {
247
+ --cp-dialog-bg: color-mix(in srgb, var(--cp-bg-elevated) 80%, var(--cp-dialog-color));
248
+ }
249
+ }
250
+
251
+ // Outline
252
+ &.cp-dialog--outline {
253
+ background: transparent;
254
+ border-color: var(--cp-dialog-color);
255
+ backdrop-filter: blur(6px);
256
+
257
+ &.cp-dialog--default {
258
+ border-color: var(--cp-border);
259
+ }
260
+ }
261
+
262
+ // ===== 形状 =====
263
+ &.cp-dialog--shape-clip {
264
+ clip-path: var(--cp-dialog-clip-path);
265
+ }
266
+
267
+ &.cp-dialog--shape-no-clip {
268
+ clip-path: none;
269
+ border-radius: 0;
270
+
271
+ .cp-dialog__decor {
272
+ display: none;
273
+ }
274
+ }
275
+
276
+ &.cp-dialog--shape-round {
277
+ clip-path: none;
278
+ border-radius: var(--cp-radius-lg);
279
+ overflow: hidden;
280
+
281
+ .cp-dialog__decor {
282
+ display: none;
283
+ }
284
+ }
285
+ }
286
+
287
+ // ===== 装饰方块 (右上角) =====
288
+ @include e(decor) {
289
+ position: absolute;
290
+ top: 0;
291
+ right: 0;
292
+ width: 12px;
293
+ height: 12px;
294
+ background: var(--cp-dialog-color);
295
+ opacity: 0.5;
296
+ z-index: 2;
297
+ transition: opacity 0.3s ease;
298
+
299
+ .cp-dialog__panel:hover & {
300
+ opacity: 1;
301
+ }
302
+ }
303
+ // ===== 封面区域 =====
304
+ @include e(cover) {
305
+ line-height: 0;
306
+ overflow: hidden;
307
+ flex-shrink: 0;
308
+
309
+ img, video {
310
+ width: 100%;
311
+ display: block;
312
+ }
313
+ }
314
+
315
+ // ===== 头部 =====
316
+ @include e(header) {
317
+ display: flex;
318
+ align-items: center;
319
+ justify-content: space-between;
320
+ padding: var(--cp-spacing-md) var(--cp-spacing-lg);
321
+ min-height: 52px;
322
+ flex-shrink: 0;
323
+ position: relative;
324
+ z-index: 2;
325
+
326
+ &.is-bordered {
327
+ border-bottom: 1px solid var(--cp-dialog-header-divider-color, var(--cp-border));
328
+ }
329
+
330
+ &.is-draggable {
331
+ cursor: move;
332
+ user-select: none;
333
+ }
334
+ }
335
+
336
+ // ===== 标题 =====
337
+ @include e(title) {
338
+ display: flex;
339
+ align-items: center;
340
+ font-family: var(--cp-font-family-display);
341
+ font-weight: 600;
342
+ font-size: var(--cp-font-size-lg);
343
+ text-transform: uppercase;
344
+ letter-spacing: 0.05em;
345
+ color: var(--cp-dialog-title-color, var(--cp-text-primary));
346
+ flex: 1;
347
+ min-width: 0;
348
+
349
+ // 左侧竖线装饰
350
+ &::before {
351
+ content: '';
352
+ display: inline-block;
353
+ width: 3px;
354
+ height: 1.1em;
355
+ background: var(--cp-dialog-color);
356
+ margin-right: var(--cp-spacing-sm);
357
+ flex-shrink: 0;
358
+ }
359
+ }
360
+
361
+ // ===== 关闭按钮(CpButton) =====
362
+ @include e(close) {
363
+ flex-shrink: 0;
364
+ margin-left: var(--cp-spacing-sm);
365
+ }
366
+
367
+ // ===== 内容区 =====
368
368
  @include e(body) {
369
369
  flex: 1;
370
370
  padding: var(--cp-spacing-lg);
@@ -382,7 +382,7 @@
382
382
  align-items: center;
383
383
  justify-content: center;
384
384
  gap: var(--cp-spacing-sm);
385
- background: var(--cp-dialog-loading-bg, rgba(10, 10, 18, 0.75));
385
+ background: var(--cp-dialog-loading-bg, color-mix(in srgb, var(--cp-bg-elevated) 86%, transparent));
386
386
  backdrop-filter: var(--cp-dialog-loading-backdrop, blur(4px));
387
387
  z-index: 4;
388
388
  }
@@ -395,28 +395,28 @@
395
395
 
396
396
  // ===== 底部 =====
397
397
  @include e(footer) {
398
- display: flex;
399
- align-items: center;
400
- justify-content: flex-end;
401
- padding: var(--cp-spacing-md) var(--cp-spacing-lg);
402
- gap: var(--cp-spacing-sm);
403
- flex-shrink: 0;
404
-
405
- &.is-bordered {
406
- border-top: 1px solid var(--cp-dialog-footer-divider-color, var(--cp-border));
407
- }
408
-
409
- &.is-center {
410
- justify-content: center;
411
- }
412
- }
413
-
414
- // ===== 内置取消按钮 =====
415
- @include e(cancel-btn) {
416
- // 用户可通过 .cp-dialog__cancel-btn 覆盖样式
417
- }
418
-
419
- // ===== 内置确认按钮 =====
398
+ display: flex;
399
+ align-items: center;
400
+ justify-content: flex-end;
401
+ padding: var(--cp-spacing-md) var(--cp-spacing-lg);
402
+ gap: var(--cp-spacing-sm);
403
+ flex-shrink: 0;
404
+
405
+ &.is-bordered {
406
+ border-top: 1px solid var(--cp-dialog-footer-divider-color, var(--cp-border));
407
+ }
408
+
409
+ &.is-center {
410
+ justify-content: center;
411
+ }
412
+ }
413
+
414
+ // ===== 内置取消按钮 =====
415
+ @include e(cancel-btn) {
416
+ // 用户可通过 .cp-dialog__cancel-btn 覆盖样式
417
+ }
418
+
419
+ // ===== 内置确认按钮 =====
420
420
  @include e(confirm-btn) {
421
421
  // 用户可通过 .cp-dialog__confirm-btn 覆盖样式
422
422
  }