@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,280 +1,287 @@
1
- // CpPagination 组件样式
2
- // 赛博朋克/机甲风格分页
3
-
4
- @use "sass:map";
5
- @use "../common/var" as *;
6
- @use "../mixins/mixins" as *;
7
-
8
- // 分页尺寸配置
9
- $pagination-sizes: (
10
- sm: (
11
- height: 24px,
12
- font-size: 12px,
13
- btn-size: 24px,
14
- clip: 4px,
15
- section-gap: 6px,
16
- pager-gap: 6px,
17
- ),
18
- md: (
19
- height: 32px,
20
- font-size: 13px,
21
- btn-size: 32px,
22
- clip: 5px,
23
- section-gap: 10px,
24
- pager-gap: 10px,
25
- ),
26
- lg: (
27
- height: 40px,
28
- font-size: 14px,
29
- btn-size: 40px,
30
- clip: 6px,
31
- section-gap: 14px,
32
- pager-gap: 12px,
33
- ),
34
- );
35
-
36
- // 颜色类型映射
37
- $pagination-types: (
38
- primary: var(--cp-color-primary),
39
- success: var(--cp-color-success),
40
- warning: var(--cp-color-warning),
41
- error: var(--cp-color-error),
42
- info: var(--cp-color-info),
43
- );
44
-
45
- @include b(pagination) {
46
- display: flex;
47
- align-items: center;
48
- gap: var(--cp-pagination-section-gap);
49
- font-family: var(--cp-font-family-ui);
50
- font-weight: var(--cp-pagination-font-weight);
51
- font-variation-settings: 'wght' var(--cp-pagination-font-weight);
52
- user-select: none;
53
-
54
- // CSS 变量默认值
55
- --cp-pagination-color: var(--cp-color-primary);
56
- --cp-pagination-color-light: var(--cp-color-primary-light);
57
- --cp-pagination-font-weight: var(--cp-font-weight-medium);
58
- --cp-pagination-active-font-weight: var(--cp-font-weight-semibold);
59
- --cp-pagination-strong-font-weight: var(--cp-font-weight-bold);
60
- --cp-pagination-font-weight-transition: var(--cp-font-weight-transition-fast);
61
- --cp-pagination-height: 32px;
62
- --cp-pagination-btn-size: 32px;
63
- --cp-pagination-font-size: 13px;
64
- --cp-pagination-clip: 5px;
65
- --cp-pagination-section-gap: 10px;
66
- --cp-pagination-pager-gap: 10px;
67
- --cp-pagination-sizes-width: 115px;
68
-
69
- // ===== 尺寸变体 =====
70
- @each $size-name, $size-config in $pagination-sizes {
71
- @include m(#{$size-name}) {
72
- --cp-pagination-height: #{map.get($size-config, height)};
73
- --cp-pagination-btn-size: #{map.get($size-config, btn-size)};
74
- --cp-pagination-font-size: #{map.get($size-config, font-size)};
75
- --cp-pagination-clip: #{map.get($size-config, clip)};
76
- --cp-pagination-section-gap: #{map.get($size-config, section-gap)};
77
- --cp-pagination-pager-gap: #{map.get($size-config, pager-gap)};
78
- font-size: map.get($size-config, font-size);
79
- }
80
- }
81
-
82
- // ===== 颜色类型 =====
83
- @each $type-name, $type-color in $pagination-types {
84
- @include m(type-#{$type-name}) {
85
- --cp-pagination-color: #{$type-color};
86
- --cp-pagination-color-light: var(--cp-color-#{$type-name}-light);
87
- }
88
- }
89
-
90
- @include m(type-default) {
91
- --cp-pagination-color: var(--cp-color-primary);
92
- --cp-pagination-color-light: var(--cp-color-primary-light);
93
- }
94
-
95
- // ===== Spacer (弹性占位,实现左右分离布局) =====
96
- @include e(spacer) {
97
- flex: 1;
98
- }
99
-
100
- // ===== Total =====
101
- @include e(total) {
102
- font-size: var(--cp-pagination-font-size);
103
- color: var(--cp-text-secondary);
104
- white-space: nowrap;
105
- }
106
-
107
- @include e(total-count) {
108
- color: var(--cp-pagination-color);
109
- font-weight: var(--cp-pagination-active-font-weight);
110
- font-variation-settings: 'wght' var(--cp-pagination-active-font-weight);
111
- }
112
-
113
- // ===== Sizes (uses CpSelect) =====
114
- @include e(sizes) {
115
- display: inline-flex;
116
- align-items: center;
117
- width: var(--cp-pagination-sizes-width);
118
- }
119
-
120
- // ===== Prev / Next (CpButton) =====
121
- // CpButton 自带完整的尺寸/形状/颜色/禁用样式,
122
- // 这里只需要确保 SVG 图标的尺寸正确。
123
- @include e(prev) {
124
- svg {
125
- width: 16px;
126
- height: 16px;
127
- }
128
- }
129
-
130
- @include e(next) {
131
- svg {
132
- width: 16px;
133
- height: 16px;
134
- }
135
- }
136
-
137
- // ===== Pager 页码组 =====
138
- @include e(pager) {
139
- display: inline-flex;
140
- align-items: center;
141
- gap: var(--cp-pagination-pager-gap);
142
- list-style: none;
143
- margin: 0;
144
- padding: 0;
145
- }
146
-
147
- @include e(pager-item) {
148
- display: inline-flex;
149
-
150
- // CpButton 内字体继承
151
- .cp-button {
152
- font-family: inherit;
153
- font-weight: var(--cp-pagination-font-weight);
154
- font-variation-settings: 'wght' var(--cp-pagination-font-weight);
155
- transition:
156
- font-weight var(--cp-pagination-font-weight-transition),
157
- font-variation-settings var(--cp-pagination-font-weight-transition);
158
- }
159
-
160
- &.is-active .cp-button {
161
- font-weight: var(--cp-pagination-strong-font-weight);
162
- font-variation-settings: 'wght' var(--cp-pagination-strong-font-weight);
163
- }
164
- }
165
-
166
- // 省略号按钮(透明背景 + 半透明圆点图标)
167
- @include e(ellipsis-btn) {
168
- svg {
169
- width: 14px;
170
- height: 14px;
171
- opacity: 0.6;
172
- }
173
-
174
- &:hover:not(:disabled) {
175
- svg {
176
- opacity: 1;
177
- color: var(--cp-pagination-color);
178
- }
179
- }
180
- }
181
-
182
- // ===== Jumper =====
183
- @include e(jumper) {
184
- display: inline-flex;
185
- align-items: center;
186
- gap: 6px;
187
- font-size: var(--cp-pagination-font-size);
188
- color: var(--cp-text-secondary);
189
- white-space: nowrap;
190
- }
191
-
192
- @include e(jumper-input) {
193
- width: 50px;
194
- height: var(--cp-pagination-btn-size);
195
- padding: 0 6px;
196
- font-size: var(--cp-pagination-font-size);
197
- font-family: inherit;
198
- font-weight: var(--cp-pagination-font-weight);
199
- font-variation-settings: 'wght' var(--cp-pagination-font-weight);
200
- color: var(--cp-text-primary);
201
- background: var(--cp-bg-elevated);
202
- border: 1px solid var(--cp-border);
203
- text-align: center;
204
- outline: none;
205
- transition:
206
- color 0.2s ease,
207
- background-color 0.2s ease,
208
- border-color 0.2s ease,
209
- box-shadow 0.2s ease,
210
- opacity 0.2s ease,
211
- font-weight var(--cp-pagination-font-weight-transition),
212
- font-variation-settings var(--cp-pagination-font-weight-transition);
213
-
214
- // 隐藏 number input 的 spinners
215
- &::-webkit-inner-spin-button,
216
- &::-webkit-outer-spin-button {
217
- -webkit-appearance: none;
218
- margin: 0;
219
- }
220
- -moz-appearance: textfield;
221
-
222
- &:hover:not(:disabled) {
223
- border-color: var(--cp-pagination-color);
224
- }
225
-
226
- &:focus {
227
- border-color: var(--cp-pagination-color);
228
- box-shadow: 0 0 8px var(--cp-pagination-color-light);
229
- }
230
-
231
- &:disabled {
232
- opacity: 0.5;
233
- cursor: not-allowed;
234
- }
235
- }
236
-
237
- // ===== 形状变体 (仅 jumper-input,CpButton 自带形状) =====
238
- @include m(shape-clip) {
239
- $clip: var(--cp-pagination-clip);
240
-
241
- .cp-pagination__jumper-input {
242
- clip-path: polygon(
243
- $clip 0,
244
- 100% 0,
245
- 100% calc(100% - #{$clip}),
246
- calc(100% - #{$clip}) 100%,
247
- 0 100%,
248
- 0 $clip
249
- );
250
- }
251
- }
252
-
253
- @include m(shape-no-clip) {
254
- .cp-pagination__jumper-input {
255
- clip-path: none;
256
- border-radius: 2px;
257
- }
258
- }
259
-
260
- @include m(shape-round) {
261
- .cp-pagination__jumper-input {
262
- clip-path: none;
263
- border-radius: 9999px;
264
- }
265
- }
266
-
267
- @include m(shape-circle) {
268
- .cp-pagination__jumper-input {
269
- clip-path: none;
270
- border-radius: 9999px;
271
- }
272
- }
273
-
274
- // ===== 禁用状态 =====
275
- @include when(disabled) {
276
- opacity: 0.6;
277
- pointer-events: none;
278
- filter: grayscale(0.4);
279
- }
280
- }
1
+ // CpPagination 组件样式
2
+ // 赛博朋克/机甲风格分页
3
+
4
+ @use "sass:map";
5
+ @use "../common/var" as *;
6
+ @use "../mixins/mixins" as *;
7
+
8
+ // 分页尺寸配置
9
+ $pagination-sizes: (
10
+ sm: (
11
+ height: 24px,
12
+ font-size: 12px,
13
+ btn-size: 24px,
14
+ clip: 4px,
15
+ section-gap: 6px,
16
+ pager-gap: 6px,
17
+ ),
18
+ md: (
19
+ height: 32px,
20
+ font-size: 13px,
21
+ btn-size: 32px,
22
+ clip: 5px,
23
+ section-gap: 10px,
24
+ pager-gap: 10px,
25
+ ),
26
+ lg: (
27
+ height: 40px,
28
+ font-size: 14px,
29
+ btn-size: 40px,
30
+ clip: 6px,
31
+ section-gap: 14px,
32
+ pager-gap: 12px,
33
+ ),
34
+ );
35
+
36
+ // 颜色类型映射
37
+ $pagination-types: (
38
+ primary: var(--cp-color-primary),
39
+ success: var(--cp-color-success),
40
+ warning: var(--cp-color-warning),
41
+ error: var(--cp-color-error),
42
+ info: var(--cp-color-info),
43
+ );
44
+
45
+ @include b(pagination) {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: var(--cp-pagination-section-gap);
49
+ font-family: var(--cp-font-family-ui);
50
+ font-weight: var(--cp-pagination-font-weight);
51
+ font-variation-settings: 'wght' var(--cp-pagination-font-weight);
52
+ user-select: none;
53
+
54
+ // CSS 变量默认值
55
+ --cp-pagination-color: var(--cp-color-primary);
56
+ --cp-pagination-color-light: var(--cp-color-primary-light);
57
+ --cp-pagination-font-weight: var(--cp-font-weight-medium);
58
+ --cp-pagination-active-font-weight: var(--cp-font-weight-semibold);
59
+ --cp-pagination-strong-font-weight: var(--cp-font-weight-bold);
60
+ --cp-pagination-font-weight-transition: var(--cp-font-weight-transition-fast);
61
+ --cp-pagination-height: 32px;
62
+ --cp-pagination-btn-size: 32px;
63
+ --cp-pagination-font-size: 13px;
64
+ --cp-pagination-clip: 5px;
65
+ --cp-pagination-section-gap: 10px;
66
+ --cp-pagination-pager-gap: 10px;
67
+ --cp-pagination-sizes-width: 115px;
68
+
69
+ // ===== 尺寸变体 =====
70
+ @each $size-name, $size-config in $pagination-sizes {
71
+ @include m(#{$size-name}) {
72
+ --cp-pagination-height: #{map.get($size-config, height)};
73
+ --cp-pagination-btn-size: #{map.get($size-config, btn-size)};
74
+ --cp-pagination-font-size: #{map.get($size-config, font-size)};
75
+ --cp-pagination-clip: #{map.get($size-config, clip)};
76
+ --cp-pagination-section-gap: #{map.get($size-config, section-gap)};
77
+ --cp-pagination-pager-gap: #{map.get($size-config, pager-gap)};
78
+ font-size: map.get($size-config, font-size);
79
+ }
80
+ }
81
+
82
+ // ===== 颜色类型 =====
83
+ @each $type-name, $type-color in $pagination-types {
84
+ @include m(type-#{$type-name}) {
85
+ --cp-pagination-color: #{$type-color};
86
+ --cp-pagination-color-light: var(--cp-color-#{$type-name}-light);
87
+ }
88
+ }
89
+
90
+ @include m(type-default) {
91
+ --cp-pagination-color: var(--cp-color-primary);
92
+ --cp-pagination-color-light: var(--cp-color-primary-light);
93
+ }
94
+
95
+ // ===== Spacer (弹性占位,实现左右分离布局) =====
96
+ @include e(spacer) {
97
+ flex: 1;
98
+ }
99
+
100
+ // ===== Total =====
101
+ @include e(total) {
102
+ font-size: var(--cp-pagination-font-size);
103
+ color: var(--cp-text-secondary);
104
+ white-space: nowrap;
105
+ }
106
+
107
+ @include e(total-count) {
108
+ color: var(--cp-pagination-color);
109
+ font-weight: var(--cp-pagination-active-font-weight);
110
+ font-variation-settings: 'wght' var(--cp-pagination-active-font-weight);
111
+ }
112
+
113
+ // ===== Sizes (uses CpSelect) =====
114
+ @include e(sizes) {
115
+ display: inline-flex;
116
+ align-items: center;
117
+ width: var(--cp-pagination-sizes-width);
118
+ }
119
+
120
+ // ===== Prev / Next (CpButton) =====
121
+ // CpButton 自带完整的尺寸/形状/颜色/禁用样式,
122
+ // 这里只需要确保 SVG 图标的尺寸正确。
123
+ @include e(prev) {
124
+ svg {
125
+ width: 16px;
126
+ height: 16px;
127
+ }
128
+ }
129
+
130
+ @include e(next) {
131
+ svg {
132
+ width: 16px;
133
+ height: 16px;
134
+ }
135
+ }
136
+
137
+ // ===== Pager 页码组 =====
138
+ @include e(pager) {
139
+ display: inline-flex;
140
+ align-items: center;
141
+ gap: var(--cp-pagination-pager-gap);
142
+ list-style: none;
143
+ margin: 0;
144
+ padding: 0;
145
+ }
146
+
147
+ @include e(pager-item) {
148
+ display: inline-flex;
149
+
150
+ // CpButton 内字体继承
151
+ .cp-button {
152
+ font-family: inherit;
153
+ font-weight: var(--cp-pagination-font-weight);
154
+ font-variation-settings: 'wght' var(--cp-pagination-font-weight);
155
+ transition:
156
+ background 0.2s ease,
157
+ border-color 0.2s ease,
158
+ color 0.2s ease,
159
+ box-shadow 0.2s ease,
160
+ filter 0.2s ease,
161
+ text-shadow 0.2s ease,
162
+ transform 0.2s ease,
163
+ font-weight var(--cp-pagination-font-weight-transition),
164
+ font-variation-settings var(--cp-pagination-font-weight-transition);
165
+ }
166
+
167
+ &.is-active .cp-button {
168
+ font-weight: var(--cp-pagination-strong-font-weight);
169
+ font-variation-settings: 'wght' var(--cp-pagination-strong-font-weight);
170
+ }
171
+ }
172
+
173
+ // 省略号按钮(透明背景 + 半透明圆点图标)
174
+ @include e(ellipsis-btn) {
175
+ svg {
176
+ width: 14px;
177
+ height: 14px;
178
+ opacity: 0.6;
179
+ }
180
+
181
+ &:hover:not(:disabled) {
182
+ svg {
183
+ opacity: 1;
184
+ color: var(--cp-pagination-color);
185
+ }
186
+ }
187
+ }
188
+
189
+ // ===== Jumper =====
190
+ @include e(jumper) {
191
+ display: inline-flex;
192
+ align-items: center;
193
+ gap: 6px;
194
+ font-size: var(--cp-pagination-font-size);
195
+ color: var(--cp-text-secondary);
196
+ white-space: nowrap;
197
+ }
198
+
199
+ @include e(jumper-input) {
200
+ width: 50px;
201
+ height: var(--cp-pagination-btn-size);
202
+ padding: 0 6px;
203
+ font-size: var(--cp-pagination-font-size);
204
+ font-family: inherit;
205
+ font-weight: var(--cp-pagination-font-weight);
206
+ font-variation-settings: 'wght' var(--cp-pagination-font-weight);
207
+ color: var(--cp-text-primary);
208
+ background: var(--cp-bg-elevated);
209
+ border: 1px solid var(--cp-border);
210
+ text-align: center;
211
+ outline: none;
212
+ transition:
213
+ color 0.2s ease,
214
+ background-color 0.2s ease,
215
+ border-color 0.2s ease,
216
+ box-shadow 0.2s ease,
217
+ opacity 0.2s ease,
218
+ font-weight var(--cp-pagination-font-weight-transition),
219
+ font-variation-settings var(--cp-pagination-font-weight-transition);
220
+
221
+ // 隐藏 number input 的 spinners
222
+ &::-webkit-inner-spin-button,
223
+ &::-webkit-outer-spin-button {
224
+ -webkit-appearance: none;
225
+ margin: 0;
226
+ }
227
+ -moz-appearance: textfield;
228
+
229
+ &:hover:not(:disabled) {
230
+ border-color: var(--cp-pagination-color);
231
+ }
232
+
233
+ &:focus {
234
+ border-color: var(--cp-pagination-color);
235
+ box-shadow: 0 0 8px var(--cp-pagination-color-light);
236
+ }
237
+
238
+ &:disabled {
239
+ opacity: 0.5;
240
+ cursor: not-allowed;
241
+ }
242
+ }
243
+
244
+ // ===== 形状变体 (仅 jumper-input,CpButton 自带形状) =====
245
+ @include m(shape-clip) {
246
+ $clip: var(--cp-pagination-clip);
247
+
248
+ .cp-pagination__jumper-input {
249
+ clip-path: polygon(
250
+ $clip 0,
251
+ 100% 0,
252
+ 100% calc(100% - #{$clip}),
253
+ calc(100% - #{$clip}) 100%,
254
+ 0 100%,
255
+ 0 $clip
256
+ );
257
+ }
258
+ }
259
+
260
+ @include m(shape-no-clip) {
261
+ .cp-pagination__jumper-input {
262
+ clip-path: none;
263
+ border-radius: 2px;
264
+ }
265
+ }
266
+
267
+ @include m(shape-round) {
268
+ .cp-pagination__jumper-input {
269
+ clip-path: none;
270
+ border-radius: 9999px;
271
+ }
272
+ }
273
+
274
+ @include m(shape-circle) {
275
+ .cp-pagination__jumper-input {
276
+ clip-path: none;
277
+ border-radius: 9999px;
278
+ }
279
+ }
280
+
281
+ // ===== 禁用状态 =====
282
+ @include when(disabled) {
283
+ opacity: 0.6;
284
+ pointer-events: none;
285
+ filter: grayscale(0.4);
286
+ }
287
+ }
@@ -1,18 +1,18 @@
1
- @use '../common/var' as *;
2
- @use '../mixins/mixins' as *;
3
-
4
- @include b(pattern-background) {
5
- position: relative;
6
- width: 100%;
7
- height: 100%;
8
-
9
- @include when(cover) {
10
- position: absolute;
11
- inset: 0;
12
- z-index: 0;
13
- }
14
-
15
- @include when(decorative) {
16
- pointer-events: none;
17
- }
18
- }
1
+ @use '../common/var' as *;
2
+ @use '../mixins/mixins' as *;
3
+
4
+ @include b(pattern-background) {
5
+ position: relative;
6
+ width: 100%;
7
+ height: 100%;
8
+
9
+ @include when(cover) {
10
+ position: absolute;
11
+ inset: 0;
12
+ z-index: 0;
13
+ }
14
+
15
+ @include when(decorative) {
16
+ pointer-events: none;
17
+ }
18
+ }