@363045841yyt/klinechart 0.7.5 → 0.7.7

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 (43) hide show
  1. package/README.md +4 -4
  2. package/dist/components/ChartSettingsDialog.vue.d.ts +14 -0
  3. package/dist/components/ChartSettingsDialog.vue.d.ts.map +1 -0
  4. package/dist/components/ColorPresetPanel.vue.d.ts +12 -0
  5. package/dist/components/ColorPresetPanel.vue.d.ts.map +1 -0
  6. package/dist/components/DrawingStyleToolbar.vue.d.ts +1 -15
  7. package/dist/components/DrawingStyleToolbar.vue.d.ts.map +1 -1
  8. package/dist/components/IndicatorParams.vue.d.ts.map +1 -1
  9. package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
  10. package/dist/components/KLineChart.vue.d.ts +7 -6
  11. package/dist/components/KLineChart.vue.d.ts.map +1 -1
  12. package/dist/components/KLineTooltip.vue.d.ts +9 -2
  13. package/dist/components/KLineTooltip.vue.d.ts.map +1 -1
  14. package/dist/components/LeftToolbar.vue.d.ts +4 -3
  15. package/dist/components/LeftToolbar.vue.d.ts.map +1 -1
  16. package/dist/components/MarkerTooltip.vue.d.ts +1 -12
  17. package/dist/components/MarkerTooltip.vue.d.ts.map +1 -1
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/composables/useFullscreenTeleportTarget.d.ts.map +1 -1
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.css +1 -0
  23. package/dist/index.d.cts +5 -5
  24. package/dist/index.d.ts +5 -5
  25. package/dist/index.js +1009 -905
  26. package/dist/version.d.ts +1 -1
  27. package/dist/web-component.d.ts +18 -0
  28. package/dist/web-component.d.ts.map +1 -0
  29. package/package.json +10 -2
  30. package/src/__tests__/_mockController.ts +11 -1
  31. package/src/components/ChartSettingsDialog.vue +624 -0
  32. package/src/components/ColorPresetPanel.vue +289 -0
  33. package/src/components/DrawingStyleToolbar.vue +12 -25
  34. package/src/components/IndicatorParams.vue +58 -57
  35. package/src/components/IndicatorSelector.vue +91 -88
  36. package/src/components/KLineChart.vue +267 -442
  37. package/src/components/KLineTooltip.vue +19 -13
  38. package/src/components/LeftToolbar.vue +35 -393
  39. package/src/components/MarkerTooltip.vue +5 -16
  40. package/src/components/index.ts +1 -0
  41. package/src/composables/useFullscreenTeleportTarget.ts +0 -2
  42. package/src/web-component.ts +14 -0
  43. package/dist/klinechart.css +0 -2
@@ -0,0 +1,289 @@
1
+ <template>
2
+ <div>
3
+ <div class="color-preset-tools">
4
+ <div class="theme-tabs" role="tablist" aria-label="颜色主题">
5
+ <button
6
+ v-for="option in themeOptions"
7
+ :key="option.value"
8
+ type="button"
9
+ class="theme-tab"
10
+ :class="{ active: editingTheme === option.value }"
11
+ @click="editingTheme = option.value"
12
+ >
13
+ {{ option.label }}
14
+ </button>
15
+ </div>
16
+ <button type="button" class="color-reset-btn" @click="resetCurrentThemeColors">
17
+ 重置颜色
18
+ </button>
19
+ </div>
20
+ <template v-for="group in colorPresetGroups" :key="group.group">
21
+ <div class="color-group-label">{{ group.label }}</div>
22
+ <div class="color-grid">
23
+ <label v-for="item in group.items" :key="item.key" class="color-item">
24
+ <span>{{ item.label }}</span>
25
+ <input
26
+ type="color"
27
+ class="color-input"
28
+ :value="getColorValue(item.key)"
29
+ @input="setColorValue(item.key, ($event.target as HTMLInputElement).value)"
30
+ />
31
+ </label>
32
+ </div>
33
+ </template>
34
+ </div>
35
+ </template>
36
+
37
+ <script setup lang="ts">
38
+ import { ref, computed } from 'vue'
39
+ import {
40
+ COLOR_PRESET_ITEMS,
41
+ darkTheme,
42
+ lightTheme,
43
+ normalizeColorPresetSettings,
44
+ type ColorPresetKey,
45
+ type ColorPresetThemeName,
46
+ type ColorPresetSettings,
47
+ } from '@363045841yyt/klinechart-core'
48
+
49
+ const props = defineProps<{
50
+ colorPresetSettings: ColorPresetSettings | undefined
51
+ }>()
52
+
53
+ const emit = defineEmits<{
54
+ (e: 'update:colorPresetSettings', value: ColorPresetSettings): void
55
+ }>()
56
+
57
+ const themeOptions: readonly { value: ColorPresetThemeName; label: string }[] = [
58
+ { value: 'light', label: '浅色' },
59
+ { value: 'dark', label: '深色' },
60
+ ]
61
+
62
+ const colorGroupLabels = {
63
+ canvas: '画布',
64
+ candle: 'K线 / 成交量',
65
+ axis: '坐标轴',
66
+ interaction: '交互 / 标记',
67
+ } as const
68
+
69
+ const colorPresetGroups = computed(() => {
70
+ return (Object.keys(colorGroupLabels) as Array<keyof typeof colorGroupLabels>)
71
+ .map((group) => ({
72
+ group,
73
+ label: colorGroupLabels[group],
74
+ items: COLOR_PRESET_ITEMS.filter((item) => item.group === group),
75
+ }))
76
+ .filter((group) => group.items.length > 0)
77
+ })
78
+
79
+ const editingTheme = ref<ColorPresetThemeName>('light')
80
+
81
+ function getThemeDefaultColor(themeName: ColorPresetThemeName, key: ColorPresetKey): string {
82
+ const theme = themeName === 'dark' ? darkTheme : lightTheme
83
+ return theme.colors[key]
84
+ }
85
+
86
+ function getColorValue(key: ColorPresetKey): string {
87
+ const colorSettings = normalizeColorPresetSettings(props.colorPresetSettings)
88
+ return colorSettings[editingTheme.value]?.[key] ?? getThemeDefaultColor(editingTheme.value, key)
89
+ }
90
+
91
+ function setColorValue(key: ColorPresetKey, value: string): void {
92
+ const colorSettings = normalizeColorPresetSettings(props.colorPresetSettings)
93
+ emit('update:colorPresetSettings', {
94
+ ...colorSettings,
95
+ [editingTheme.value]: {
96
+ ...colorSettings[editingTheme.value],
97
+ [key]: value,
98
+ },
99
+ })
100
+ }
101
+
102
+ function resetCurrentThemeColors(): void {
103
+ const colorSettings = normalizeColorPresetSettings(props.colorPresetSettings)
104
+ const nextColorSettings = { ...colorSettings }
105
+ delete nextColorSettings[editingTheme.value]
106
+ emit('update:colorPresetSettings', nextColorSettings)
107
+ }
108
+ </script>
109
+
110
+ <style scoped>
111
+ /* ── 工具栏 ── */
112
+ .color-preset-tools {
113
+ display: grid;
114
+ grid-template-columns: 1fr auto;
115
+ align-items: center;
116
+ gap: 8px;
117
+ margin-bottom: 4px;
118
+ }
119
+
120
+ /* ── 主题切换 ── */
121
+ .theme-tabs {
122
+ display: grid;
123
+ grid-template-columns: 1fr 1fr;
124
+ gap: 3px;
125
+ padding: 3px;
126
+ border: 1px solid var(--klc-color-border-button);
127
+ border-radius: 8px;
128
+ background: var(--klc-color-grid-minor);
129
+ }
130
+
131
+ .theme-tab {
132
+ height: 28px;
133
+ border: none;
134
+ border-radius: 6px;
135
+ background: transparent;
136
+ color: var(--klc-color-axis-text);
137
+ font-size: 12px;
138
+ font-weight: 500;
139
+ cursor: pointer;
140
+ transition:
141
+ background 0.18s ease,
142
+ color 0.18s ease,
143
+ box-shadow 0.18s ease;
144
+ }
145
+
146
+ .theme-tab:not(.active):hover {
147
+ color: var(--klc-color-foreground);
148
+ background: color-mix(in srgb, var(--klc-color-tag-bg-white) 60%, transparent);
149
+ }
150
+
151
+ .theme-tab.active {
152
+ background: var(--klc-color-tag-bg-white);
153
+ color: var(--klc-color-foreground);
154
+ font-weight: 600;
155
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
156
+ }
157
+
158
+ /* ── 重置按钮 ── */
159
+ .color-reset-btn {
160
+ height: 36px;
161
+ padding: 0 14px;
162
+ border: 1px solid var(--klc-color-axis-line);
163
+ border-radius: 8px;
164
+ background: var(--klc-color-tag-bg-white);
165
+ color: var(--klc-color-axis-text);
166
+ font-size: 12px;
167
+ font-weight: 500;
168
+ white-space: nowrap;
169
+ cursor: pointer;
170
+ transition:
171
+ background 0.18s ease,
172
+ border-color 0.18s ease,
173
+ color 0.18s ease,
174
+ box-shadow 0.18s ease;
175
+ }
176
+
177
+ .color-reset-btn:hover {
178
+ border-color: var(--klc-color-axis-text);
179
+ background: var(--klc-color-background);
180
+ color: var(--klc-color-foreground);
181
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
182
+ }
183
+
184
+ .color-reset-btn:active {
185
+ background: var(--klc-color-tag-bg-hover);
186
+ box-shadow: none;
187
+ }
188
+
189
+ /* ── 分组标签 ── */
190
+ .color-group-label {
191
+ margin: 6px 0 6px;
192
+ color: var(--klc-color-axis-text);
193
+ font-size: 12px;
194
+ font-weight: 600;
195
+ line-height: 1.3;
196
+ }
197
+
198
+ /* ── 颜色网格 ── */
199
+ .color-grid {
200
+ display: grid;
201
+ grid-template-columns: repeat(2, minmax(0, 1fr));
202
+ gap: 6px;
203
+ }
204
+
205
+ /* ── 颜色条目 ── */
206
+ .color-item {
207
+ display: flex;
208
+ align-items: center;
209
+ justify-content: space-between;
210
+ gap: 8px;
211
+ min-height: 36px;
212
+ padding: 6px 10px;
213
+ border: 1px solid var(--klc-color-grid-major);
214
+ border-radius: 8px;
215
+ background: var(--klc-color-background);
216
+ color: var(--klc-color-foreground);
217
+ font-size: 12px;
218
+ line-height: 1.3;
219
+ cursor: pointer;
220
+ transition:
221
+ border-color 0.18s ease,
222
+ background 0.18s ease,
223
+ box-shadow 0.18s ease;
224
+ }
225
+
226
+ .color-item:hover {
227
+ border-color: var(--klc-color-axis-line);
228
+ background: var(--klc-color-tag-bg-hover);
229
+ box-shadow: 0 1px 4px color-mix(in srgb, var(--klc-color-foreground) 6%, transparent);
230
+ }
231
+
232
+ .color-item span {
233
+ min-width: 0;
234
+ overflow: hidden;
235
+ text-overflow: ellipsis;
236
+ white-space: nowrap;
237
+ user-select: none;
238
+ }
239
+
240
+ /* ── 颜色输入 ── */
241
+ .color-input {
242
+ flex: 0 0 auto;
243
+ width: 26px;
244
+ height: 26px;
245
+ padding: 0;
246
+ border: 1px solid var(--klc-color-axis-line);
247
+ border-radius: 6px;
248
+ background: transparent;
249
+ cursor: pointer;
250
+ transition:
251
+ border-color 0.18s ease,
252
+ box-shadow 0.18s ease;
253
+ }
254
+
255
+ .color-input:hover {
256
+ border-color: var(--klc-color-axis-text);
257
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--klc-color-foreground) 6%, transparent);
258
+ }
259
+
260
+ .color-input:focus-visible {
261
+ outline: none;
262
+ border-color: var(--klc-color-axis-text);
263
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--klc-color-foreground) 10%, transparent);
264
+ }
265
+
266
+ .color-input::-webkit-color-swatch-wrapper {
267
+ padding: 2px;
268
+ }
269
+
270
+ .color-input::-webkit-color-swatch {
271
+ border: none;
272
+ border-radius: 4px;
273
+ }
274
+
275
+ /* ── 响应式 ── */
276
+ @media (max-width: 480px) {
277
+ .color-preset-tools {
278
+ grid-template-columns: 1fr;
279
+ }
280
+
281
+ .color-reset-btn {
282
+ width: 100%;
283
+ }
284
+
285
+ .color-grid {
286
+ grid-template-columns: 1fr;
287
+ }
288
+ }
289
+ </style>
@@ -50,20 +50,7 @@
50
50
 
51
51
  <script setup lang="ts">
52
52
  import { onMounted, onUnmounted } from 'vue'
53
-
54
- export interface DrawingStyle {
55
- stroke?: string
56
- strokeWidth?: number
57
- strokeStyle?: 'solid' | 'dashed' | 'dotted'
58
- fill?: string
59
- }
60
-
61
- export interface DrawingObject {
62
- id: string
63
- type: string
64
- points: { x: number; y: number }[]
65
- style: DrawingStyle
66
- }
53
+ import type { DrawingObject, DrawingStyle } from '@363045841yyt/klinechart-core/plugin'
67
54
 
68
55
  const props = defineProps<{
69
56
  drawing: DrawingObject
@@ -108,10 +95,10 @@ function onLineStyleChange(style: 'solid' | 'dashed' | 'dotted') {
108
95
  gap: 6px;
109
96
  padding: 4px 8px;
110
97
  height: 32px;
111
- background: rgba(250, 251, 252, 0.88);
98
+ background: color-mix(in srgb, var(--klc-color-tag-bg-white) 88%, transparent);
112
99
  backdrop-filter: blur(8px);
113
100
  -webkit-backdrop-filter: blur(8px);
114
- border: 1px solid #e5e7eb;
101
+ border: 1px solid var(--klc-color-border-button);
115
102
  border-radius: 6px;
116
103
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
117
104
  z-index: 100;
@@ -135,7 +122,7 @@ function onLineStyleChange(style: 'solid' | 'dashed' | 'dotted') {
135
122
  display: block;
136
123
  width: 100%;
137
124
  height: 100%;
138
- border: 1px solid #d1d5db;
125
+ border: 1px solid var(--klc-color-axis-line);
139
126
  border-radius: 4px;
140
127
  cursor: pointer;
141
128
  }
@@ -152,17 +139,17 @@ function onLineStyleChange(style: 'solid' | 'dashed' | 'dotted') {
152
139
  .toolbar-select {
153
140
  height: 24px;
154
141
  padding: 0 4px;
155
- border: 1px solid #d1d5db;
142
+ border: 1px solid var(--klc-color-axis-line);
156
143
  border-radius: 4px;
157
- background: #fff;
158
- color: #374151;
144
+ background: var(--klc-color-tag-bg-white);
145
+ color: var(--klc-color-foreground);
159
146
  font-size: 12px;
160
147
  cursor: pointer;
161
148
  outline: none;
162
149
  }
163
150
 
164
151
  .toolbar-select:hover {
165
- border-color: #9ca3af;
152
+ border-color: var(--klc-color-axis-text);
166
153
  }
167
154
 
168
155
  .toolbar-btn {
@@ -175,15 +162,15 @@ function onLineStyleChange(style: 'solid' | 'dashed' | 'dotted') {
175
162
  border: 1px solid transparent;
176
163
  border-radius: 4px;
177
164
  background: transparent;
178
- color: #6b7280;
165
+ color: var(--klc-color-axis-text);
179
166
  cursor: pointer;
180
167
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
181
168
  }
182
169
 
183
170
  .toolbar-btn:hover {
184
- border-color: #d1d5db;
185
- background: #f3f4f6;
186
- color: #374151;
171
+ border-color: var(--klc-color-axis-line);
172
+ background: var(--klc-color-grid-minor);
173
+ color: var(--klc-color-foreground);
187
174
  }
188
175
 
189
176
  .delete-btn:hover {
@@ -117,6 +117,7 @@
117
117
 
118
118
  <script setup lang="ts">
119
119
  import { ref, watch, computed } from 'vue'
120
+ import { useFullscreenTeleportTarget } from '../composables/useFullscreenTeleportTarget'
120
121
 
121
122
  export interface ParamConfig {
122
123
  key: string
@@ -146,7 +147,7 @@ const emit = defineEmits<{
146
147
  const localValues = ref<Record<string, number>>({ ...props.values })
147
148
  const showDescription = ref(true)
148
149
 
149
- const teleportTarget = computed(() => 'body')
150
+ const teleportTarget = useFullscreenTeleportTarget()
150
151
 
151
152
  watch(
152
153
  () => props.values,
@@ -205,8 +206,8 @@ function onConfirm() {
205
206
 
206
207
  /* ── 弹窗 ── */
207
208
  .indicator-params {
208
- background: #ffffff;
209
- border: 1px solid #e0e0e0;
209
+ background: var(--klc-color-tag-bg-white);
210
+ border: 1px solid var(--klc-color-border-button);
210
211
  border-radius: 12px;
211
212
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
212
213
  min-width: 340px;
@@ -221,8 +222,8 @@ function onConfirm() {
221
222
  justify-content: space-between;
222
223
  align-items: center;
223
224
  padding: 16px 20px;
224
- background: #f8f8f8;
225
- border-bottom: 1px solid #e8e8e8;
225
+ background: var(--klc-color-background);
226
+ border-bottom: 1px solid var(--klc-color-grid-major);
226
227
  }
227
228
 
228
229
  .header-left {
@@ -240,18 +241,18 @@ function onConfirm() {
240
241
  .params-title {
241
242
  font-size: 14px;
242
243
  font-weight: 600;
243
- color: #1a1a1a;
244
+ color: var(--klc-color-foreground);
244
245
  letter-spacing: 0.2px;
245
246
  }
246
247
 
247
248
  .params-subtitle {
248
249
  font-size: 11px;
249
- color: #999;
250
+ color: var(--klc-color-axis-text);
250
251
  }
251
252
 
252
253
  .toggle-desc-btn {
253
- background: #fff;
254
- border: 1px solid #e0e0e0;
254
+ background: var(--klc-color-tag-bg-white);
255
+ border: 1px solid var(--klc-color-border-button);
255
256
  border-radius: 6px;
256
257
  width: 28px;
257
258
  height: 28px;
@@ -259,21 +260,21 @@ function onConfirm() {
259
260
  align-items: center;
260
261
  justify-content: center;
261
262
  cursor: pointer;
262
- color: #888;
263
+ color: var(--klc-color-axis-text);
263
264
  transition: all 0.2s;
264
265
  padding: 0;
265
266
  }
266
267
 
267
268
  .toggle-desc-btn:hover {
268
- background: #f0f0f0;
269
- color: #555;
270
- border-color: #ccc;
269
+ background: var(--klc-color-tag-bg-hover);
270
+ color: var(--klc-color-foreground);
271
+ border-color: var(--klc-color-axis-line);
271
272
  }
272
273
 
273
274
  .toggle-desc-btn.active {
274
- background: #1a1a1a;
275
- border-color: #1a1a1a;
276
- color: #fff;
275
+ background: var(--klc-color-foreground);
276
+ border-color: var(--klc-color-foreground);
277
+ color: var(--klc-color-background);
277
278
  }
278
279
 
279
280
  .toggle-desc-btn svg {
@@ -282,8 +283,8 @@ function onConfirm() {
282
283
  }
283
284
 
284
285
  .params-close {
285
- background: #fff;
286
- border: 1px solid #e0e0e0;
286
+ background: var(--klc-color-tag-bg-white);
287
+ border: 1px solid var(--klc-color-border-button);
287
288
  border-radius: 6px;
288
289
  width: 28px;
289
290
  height: 28px;
@@ -291,15 +292,15 @@ function onConfirm() {
291
292
  align-items: center;
292
293
  justify-content: center;
293
294
  cursor: pointer;
294
- color: #888;
295
+ color: var(--klc-color-axis-text);
295
296
  transition: background 0.15s, color 0.15s, border-color 0.15s;
296
297
  padding: 0;
297
298
  }
298
299
 
299
300
  .params-close:hover {
300
- background: #f0f0f0;
301
- color: #333;
302
- border-color: #ccc;
301
+ background: var(--klc-color-tag-bg-hover);
302
+ color: var(--klc-color-foreground);
303
+ border-color: var(--klc-color-axis-line);
303
304
  }
304
305
 
305
306
  .params-close svg {
@@ -310,15 +311,15 @@ function onConfirm() {
310
311
  /* ── 指标描述 ── */
311
312
  .indicator-description {
312
313
  padding: 12px 20px;
313
- background: #f0f7ff;
314
- border-bottom: 1px solid #d6e8f5;
314
+ background: color-mix(in srgb, var(--klc-color-alert-active) 10%, var(--klc-color-background));
315
+ border-bottom: 1px solid color-mix(in srgb, var(--klc-color-alert-active) 20%, transparent);
315
316
  }
316
317
 
317
318
  .indicator-description p {
318
319
  margin: 0;
319
320
  font-size: 12px;
320
321
  line-height: 1.6;
321
- color: #2c5282;
322
+ color: var(--klc-color-alert-active);
322
323
  }
323
324
 
324
325
  /* ── 体部 ── */
@@ -332,13 +333,13 @@ function onConfirm() {
332
333
  .param-item {
333
334
  padding: 10px 14px;
334
335
  border-radius: 8px;
335
- background: #f8f8f8;
336
- border: 1px solid #e8e8e8;
336
+ background: var(--klc-color-background);
337
+ border: 1px solid var(--klc-color-grid-major);
337
338
  transition: border-color 0.2s;
338
339
  }
339
340
 
340
341
  .param-item:has(.param-input:focus) {
341
- border-color: #bbb;
342
+ border-color: var(--klc-color-axis-text);
342
343
  }
343
344
 
344
345
  .param-item.has-desc {
@@ -361,22 +362,22 @@ function onConfirm() {
361
362
  .param-label-text {
362
363
  font-size: 13px;
363
364
  font-weight: 500;
364
- color: #333;
365
+ color: var(--klc-color-foreground);
365
366
  }
366
367
 
367
368
  .param-range {
368
369
  font-size: 11px;
369
- color: #999;
370
+ color: var(--klc-color-axis-text);
370
371
  }
371
372
 
372
373
  /* ── 参数描述 ── */
373
374
  .param-description {
374
375
  margin-top: 8px;
375
376
  padding-top: 8px;
376
- border-top: 1px dashed #e0e0e0;
377
+ border-top: 1px dashed var(--klc-color-border-button);
377
378
  font-size: 11px;
378
379
  line-height: 1.5;
379
- color: #666;
380
+ color: var(--klc-color-axis-text);
380
381
  }
381
382
 
382
383
  /* ── 步进输入框 ── */
@@ -384,25 +385,25 @@ function onConfirm() {
384
385
  display: flex;
385
386
  align-items: stretch;
386
387
  height: 32px;
387
- border: 1px solid #d0d0d0;
388
+ border: 1px solid var(--klc-color-axis-line);
388
389
  border-radius: 7px;
389
390
  overflow: hidden;
390
- background: #fff;
391
+ background: var(--klc-color-tag-bg-white);
391
392
  transition: border-color 0.2s;
392
393
  }
393
394
 
394
395
  .input-wrapper:focus-within {
395
- border-color: #999;
396
+ border-color: var(--klc-color-axis-text);
396
397
  }
397
398
 
398
399
  .stepper-btn {
399
400
  width: 28px;
400
- background: #f0f0f0;
401
+ background: var(--klc-color-grid-minor);
401
402
  border: none;
402
403
  cursor: pointer;
403
404
  font-size: 15px;
404
405
  font-weight: 400;
405
- color: #666;
406
+ color: var(--klc-color-axis-text);
406
407
  display: flex;
407
408
  align-items: center;
408
409
  justify-content: center;
@@ -412,24 +413,24 @@ function onConfirm() {
412
413
  }
413
414
 
414
415
  .stepper-btn:hover:not(:disabled) {
415
- background: #e0e0e0;
416
- color: #333;
416
+ background: var(--klc-color-border-button);
417
+ color: var(--klc-color-foreground);
417
418
  }
418
419
 
419
420
  .stepper-btn:disabled {
420
- color: #ccc;
421
+ color: var(--klc-color-axis-line);
421
422
  cursor: not-allowed;
422
423
  }
423
424
 
424
425
  .param-input {
425
426
  width: 60px;
426
427
  border: none;
427
- border-left: 1px solid #e8e8e8;
428
- border-right: 1px solid #e8e8e8;
428
+ border-left: 1px solid var(--klc-color-grid-major);
429
+ border-right: 1px solid var(--klc-color-grid-major);
429
430
  font-size: 13px;
430
431
  font-weight: 600;
431
432
  text-align: center;
432
- color: #1a1a1a;
433
+ color: var(--klc-color-foreground);
433
434
  background: transparent;
434
435
  -moz-appearance: textfield;
435
436
  appearance: textfield;
@@ -450,8 +451,8 @@ function onConfirm() {
450
451
  align-items: center;
451
452
  justify-content: space-between;
452
453
  padding: 12px 20px;
453
- background: #f8f8f8;
454
- border-top: 1px solid #e8e8e8;
454
+ background: var(--klc-color-background);
455
+ border-top: 1px solid var(--klc-color-grid-major);
455
456
  }
456
457
 
457
458
  .footer-right {
@@ -482,8 +483,8 @@ function onConfirm() {
482
483
  /* 重置 */
483
484
  .params-btn.reset {
484
485
  background: transparent;
485
- border-color: #d0d0d0;
486
- color: #666;
486
+ border-color: var(--klc-color-axis-line);
487
+ color: var(--klc-color-axis-text);
487
488
  }
488
489
 
489
490
  .params-btn.reset:hover {
@@ -495,26 +496,26 @@ function onConfirm() {
495
496
  /* 取消 */
496
497
  .params-btn.cancel {
497
498
  background: transparent;
498
- border-color: #d0d0d0;
499
- color: #666;
499
+ border-color: var(--klc-color-axis-line);
500
+ color: var(--klc-color-axis-text);
500
501
  }
501
502
 
502
503
  .params-btn.cancel:hover {
503
- background: #f0f0f0;
504
- color: #333;
505
- border-color: #bbb;
504
+ background: var(--klc-color-tag-bg-hover);
505
+ color: var(--klc-color-foreground);
506
+ border-color: var(--klc-color-axis-text);
506
507
  }
507
508
 
508
509
  /* 确定 */
509
510
  .params-btn.confirm {
510
- background: #1a1a1a;
511
- border-color: #1a1a1a;
512
- color: #fff;
511
+ background: var(--klc-color-foreground);
512
+ border-color: var(--klc-color-foreground);
513
+ color: var(--klc-color-background);
513
514
  }
514
515
 
515
516
  .params-btn.confirm:hover {
516
- background: #333;
517
- border-color: #333;
517
+ background: var(--klc-color-foreground);
518
+ border-color: var(--klc-color-foreground);
518
519
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
519
520
  transform: translateY(-1px);
520
521
  }