@ew-color-picker/style 2.0.13 → 2.0.15

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/all.css ADDED
@@ -0,0 +1,2629 @@
1
+ @charset "UTF-8";
2
+ :root {
3
+ --ewcp-color-primary: #4096ef;
4
+ --ewcp-color-primary-hover: #66b1ff;
5
+ --ewcp-color-success: #52c41a;
6
+ --ewcp-color-danger: #f56c6c;
7
+ --ewcp-color-warning: #faad14;
8
+ --ewcp-color-info: #909399;
9
+ --ewcp-color-text: #303133;
10
+ --ewcp-color-text-secondary: #606266;
11
+ --ewcp-color-text-tertiary: #999;
12
+ --ewcp-color-text-disabled: #c0c4cc;
13
+ --ewcp-color-border: #dcdfe6;
14
+ --ewcp-color-border-light: #e5e6eb;
15
+ --ewcp-color-border-hover: #c0c4cc;
16
+ --ewcp-color-border-focus: var(--ewcp-color-primary);
17
+ --ewcp-color-bg: #fff;
18
+ --ewcp-color-bg-disabled: #f5f7fa;
19
+ --ewcp-color-bg-hover: #f0f8ff;
20
+ --ewcp-color-bg-secondary: #fafafa;
21
+ --ewcp-color-checkbox-border: #d9d9d9;
22
+ --ewcp-color-checkbox-disabled-bg: #f7f8fa;
23
+ --ewcp-color-checkbox-disabled-checked: #c8c9cc;
24
+ --ewcp-radius-sm: 3px;
25
+ --ewcp-radius-md: 4px;
26
+ --ewcp-radius-lg: 8px;
27
+ --ewcp-shadow-popper: 0 4px 16px rgba(0, 0, 0, 0.12);
28
+ --ewcp-z-popper: 1000;
29
+ --ewcp-z-tooltip: 3000;
30
+ }
31
+
32
+ :root {
33
+ --panel-width: 285px;
34
+ --panel-height: 180px;
35
+ --container-padding: 10px;
36
+ --container-margin-top: 8px;
37
+ --container-min-width: 320px;
38
+ --container-radius: 10px;
39
+ --panel-radius: 8px;
40
+ --content-gap: 12px;
41
+ --slider-width-v: 12px;
42
+ --slider-height-h: 12px;
43
+ --slider-gap: 4px;
44
+ --slider-hue-bg-offset: 3px;
45
+ --slider-alpha-top-gap: 3px;
46
+ --slider-hue-top-margin: 8px;
47
+ --thumb-size-v: 4px;
48
+ --thumb-size-v-bar: 12px;
49
+ --thumb-size-h: 4px;
50
+ --cursor-size: 4px;
51
+ --cursor-ring: 3px;
52
+ --drop-container-margin-top: 6px;
53
+ --drop-container-padding-top: 4px;
54
+ --drop-container-min-height: 28px;
55
+ --bottom-row-gap: 8px;
56
+ --bottom-row-margin-top: 8px;
57
+ --mode-container-gap: 8px;
58
+ --mode-container-padding: 8px;
59
+ --mode-container-margin-top: 8px;
60
+ --mode-container-margin-bottom: 12px;
61
+ --mode-container-radius: 6px;
62
+ --mode-title-font-size: 16px;
63
+ --mode-btn-size: 24px;
64
+ --mode-btn-icon-size: 16px;
65
+ --mode-btn-radius: 4px;
66
+ --mode-arrow-size: 6px;
67
+ --mode-text-font-size: 14px;
68
+ --mode-text-min-width: 60px;
69
+ --mode-text-padding: 0 8px;
70
+ --input-height: 32px;
71
+ --input-line-height: 32px;
72
+ --input-font-size: 14px;
73
+ --input-padding: 0 8px;
74
+ --input-radius: 5px;
75
+ --default-input-height: 28px;
76
+ --default-input-padding: 4px 8px;
77
+ --default-input-font-size: 12px;
78
+ --input-number-height: 32px;
79
+ --input-number-border-width: 1.5px;
80
+ --input-number-radius: 5px;
81
+ --input-number-input-padding: 4px 8px;
82
+ --input-number-input-font-size: 13px;
83
+ --input-number-buttons-width: 28px;
84
+ --input-number-buttons-min-width: 22px;
85
+ --input-number-icon-size: 8px;
86
+ --select-height: 32px;
87
+ --select-border-width: 1.5px;
88
+ --select-radius: 6px;
89
+ --select-padding: 0 8px;
90
+ --select-font-size: 13px;
91
+ --select-arrow-size: 10px;
92
+ --select-clear-size: 10px;
93
+ --checkbox-gap: 5px;
94
+ --checkbox-font-size: 12px;
95
+ --checkbox-border-width: 1.5px;
96
+ --checkbox-box-size: 14px;
97
+ --checkbox-box-radius: 3px;
98
+ --checkbox-icon-size: 9px;
99
+ --btn-padding: 5px;
100
+ --btn-font-size: 12px;
101
+ --btn-radius: 3px;
102
+ --btn-min-width: 60px;
103
+ --predefine-item-size: 20px;
104
+ --predefine-item-radius: 4px;
105
+ --predefine-gap: 8px;
106
+ --predefine-margin-top: 12px;
107
+ --predefine-font-size: 12px;
108
+ --extra-row-gap: 8px;
109
+ --extra-row-margin-top: 8px;
110
+ --eyedropper-btn-height: 28px;
111
+ --eyedropper-btn-padding: 0 6px;
112
+ --eyedropper-btn-icon: 16px;
113
+ --copy-btn-size: 28px;
114
+ --copy-btn-icon: 14px;
115
+ --gradient-bar-height: 14px;
116
+ --gradient-bar-radius: 7px;
117
+ --gradient-handle-size: 14px;
118
+ --gradient-row-gap: 4px;
119
+ --gradient-row-min-height: 24px;
120
+ --gradient-label-font-size: 12px;
121
+ --gradient-label-line-height: 24px;
122
+ --gradient-text-height: 24px;
123
+ --gradient-text-font-size: 12px;
124
+ --gradient-btn-height: 24px;
125
+ --gradient-btn-font-size: 12px;
126
+ --gradient-label-margin-top: 8px;
127
+ --gradient-stop-number-width: 60px;
128
+ --inputs-group-gap: 4px;
129
+ --inputs-label-font-size: 12px;
130
+ --inputs-label-height: 18px;
131
+ --inputs-label-line-height: 18px;
132
+ --inputs-label-margin-bottom: 2px;
133
+ --hsl-input-height: 32px;
134
+ --mode-new-container-gap: 8px;
135
+ --mode-new-btn-size: 24px;
136
+ --mode-new-btn-icon: 16px;
137
+ --color-inputs-max-width: 320px;
138
+ --color-inputs-min-width: 280px;
139
+ --color-inputs-gap: 6px;
140
+ --color-inputs-margin-bottom: 8px;
141
+ }
142
+
143
+ .ew-color-picker-alpha-slider-bg,
144
+ .ew-color-picker-alpha-slider-thumb,
145
+ .ew-color-picker-alpha-slider-wrapper,
146
+ .ew-color-picker-black-panel,
147
+ .ew-color-picker-panel-cursor,
148
+ .ew-color-picker-panel-container,
149
+ .ew-color-picker-arrow,
150
+ .ew-color-picker-no,
151
+ .ew-color-picker-slider-thumb,
152
+ .ew-color-picker-white-panel {
153
+ position: absolute;
154
+ }
155
+
156
+ .ew-color-picker-alpha-slider-bar,
157
+ .ew-color-picker-drop-container,
158
+ .ew-color-mode-container .ew-color-mode-down,
159
+ .ew-color-mode-container .ew-color-mode-up,
160
+ .ew-color-picker-panel,
161
+ .ew-color-picker-arrow-left,
162
+ .ew-color-picker-arrow-right,
163
+ .ew-color-picker-box,
164
+ .ew-color-picker-slider,
165
+ .ew-color-picker-slider-bar {
166
+ position: relative;
167
+ }
168
+
169
+ .ew-color-picker-alpha-slider-thumb,
170
+ .ew-color-picker-drop-btn,
171
+ .ew-color-picker-input,
172
+ .ew-color-picker-no,
173
+ .ew-color-picker-slider,
174
+ .ew-color-picker-slider-thumb {
175
+ box-sizing: border-box;
176
+ }
177
+
178
+ .ew-color-picker-alpha-slider-bar,
179
+ .ew-color-picker-alpha-slider-thumb,
180
+ .ew-color-picker-drop-btn,
181
+ .ew-color-picker-panel,
182
+ .ew-color-picker-box,
183
+ .ew-color-picker-slider-bar,
184
+ .ew-color-picker-slider-thumb,
185
+ .ew-color-picker-predefine-color {
186
+ cursor: pointer;
187
+ }
188
+
189
+ .ew-color-picker-input,
190
+ .ew-color-picker-panel-container,
191
+ .ew-color-picker-arrow-left,
192
+ .ew-color-picker-arrow-right,
193
+ .ew-color-picker-box,
194
+ .ew-color-picker-sure-btn {
195
+ background-color: #fff;
196
+ }
197
+
198
+ .ew-color-picker-drop-btn,
199
+ .ew-color-picker-input,
200
+ .ew-color-picker-box,
201
+ .ew-color-picker-predefine-color {
202
+ outline: none;
203
+ }
204
+
205
+ .ew-color-picker-drop-btn,
206
+ .ew-color-picker-input,
207
+ .ew-color-picker-arrow-left,
208
+ .ew-color-picker-arrow-right,
209
+ .ew-color-picker-box {
210
+ display: inline-block;
211
+ }
212
+
213
+ .ew-color-picker-panel-container .ew-color-picker-content:after {
214
+ content: "";
215
+ display: table;
216
+ clear: both;
217
+ }
218
+
219
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-alpha-slider-bar,
220
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-slider-bar {
221
+ float: left;
222
+ }
223
+
224
+ .ew-color-picker-drop-btn,
225
+ .ew-color-picker-no {
226
+ text-align: center;
227
+ }
228
+
229
+ .ew-color-picker {
230
+ display: inline-block;
231
+ position: relative;
232
+ }
233
+
234
+ .ew-color-picker:empty {
235
+ display: none;
236
+ }
237
+
238
+ .ew-color-picker-panel-container {
239
+ box-sizing: content-box;
240
+ display: inline-flex;
241
+ flex-direction: column;
242
+ align-items: stretch;
243
+ width: fit-content;
244
+ position: absolute;
245
+ left: 0;
246
+ top: 100%;
247
+ margin-top: var(--container-margin-top);
248
+ padding: var(--container-padding);
249
+ background: #fff;
250
+ border-radius: var(--container-radius);
251
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
252
+ border: 1px solid #e5e6eb;
253
+ overflow: visible;
254
+ z-index: 1000;
255
+ transition: opacity 0.2s, transform 0.2s;
256
+ opacity: 1;
257
+ }
258
+
259
+ .ew-color-picker-top-row {
260
+ display: flex;
261
+ flex-direction: row;
262
+ align-items: flex-start;
263
+ gap: var(--slider-gap);
264
+ width: fit-content;
265
+ flex-shrink: 0;
266
+ }
267
+
268
+ .ew-color-picker-top-row > .ew-color-picker-slider.ew-color-picker-is-vertical {
269
+ margin-left: 0;
270
+ }
271
+
272
+ .ew-color-picker-mode-container,
273
+ .ew-color-picker-extra-row,
274
+ .ew-color-picker-bottom-row,
275
+ .ew-color-picker-inputs-group,
276
+ .ew-color-picker-slider.ew-color-picker-is-horizontal,
277
+ .ew-color-picker-gradient-container {
278
+ max-width: 0;
279
+ min-width: 100%;
280
+ }
281
+
282
+ .ew-fade-in {
283
+ opacity: 1;
284
+ pointer-events: auto;
285
+ }
286
+
287
+ .ew-fade-out {
288
+ opacity: 0;
289
+ pointer-events: none;
290
+ }
291
+
292
+ .ew-color-picker-panel-container.ew-fade-in {
293
+ opacity: 1;
294
+ pointer-events: auto;
295
+ }
296
+
297
+ .ew-color-picker-panel-container.ew-fade-out {
298
+ opacity: 0;
299
+ pointer-events: none;
300
+ }
301
+
302
+ .ew-color-picker-content {
303
+ display: flex;
304
+ flex-direction: row;
305
+ align-items: flex-start;
306
+ gap: var(--content-gap);
307
+ }
308
+
309
+ .ew-color-picker-panel {
310
+ border-radius: var(--panel-radius);
311
+ margin-bottom: 0;
312
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
313
+ display: inline-block;
314
+ }
315
+
316
+ .ew-color-picker-alpha-slider-bg,
317
+ .ew-color-picker-alpha-slider-wrapper,
318
+ .ew-color-picker-black-panel,
319
+ .ew-color-picker-arrow,
320
+ .ew-color-picker-no,
321
+ .ew-color-picker-white-panel {
322
+ left: 0;
323
+ right: 0;
324
+ top: 0;
325
+ bottom: 0;
326
+ }
327
+
328
+ .ew-color-picker-white-panel {
329
+ background: linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));
330
+ }
331
+
332
+ .ew-color-picker-black-panel {
333
+ background: linear-gradient(0deg, #000, transparent);
334
+ }
335
+
336
+ .ew-color-picker-slider.ew-color-picker-is-vertical {
337
+ margin-left: var(--slider-gap);
338
+ margin-top: 0;
339
+ height: var(--panel-height);
340
+ display: inline-block;
341
+ vertical-align: top;
342
+ }
343
+
344
+ .ew-color-picker-slider.ew-color-picker-is-horizontal {
345
+ margin-top: var(--slider-hue-top-margin);
346
+ margin-bottom: 0;
347
+ }
348
+
349
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-slider-bar {
350
+ background: linear-gradient(180deg, red, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
351
+ margin-left: var(--slider-hue-bg-offset);
352
+ }
353
+
354
+ .ew-color-picker-slider.ew-color-picker-is-horizontal .ew-color-picker-slider-bar {
355
+ background: linear-gradient(90deg, red, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
356
+ }
357
+
358
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-alpha-slider-bar,
359
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-slider-bar {
360
+ width: var(--slider-width-v);
361
+ height: 100%;
362
+ }
363
+
364
+ .ew-color-picker-slider.ew-color-picker-is-horizontal .ew-color-picker-alpha-slider-bar,
365
+ .ew-color-picker-slider.ew-color-picker-is-horizontal .ew-color-picker-slider-bar {
366
+ width: 100%;
367
+ height: var(--slider-height-h);
368
+ }
369
+
370
+ .ew-color-picker-slider.ew-color-picker-is-horizontal .ew-color-picker-alpha-slider-bar {
371
+ margin-top: var(--slider-alpha-top-gap);
372
+ }
373
+
374
+ .ew-color-picker-alpha-slider-wrapper,
375
+ .ew-color-picker-predefine-color.ew-color-picker-has-alpha {
376
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==");
377
+ }
378
+
379
+ .ew-color-picker-alpha-slider-thumb,
380
+ .ew-color-picker-slider-thumb {
381
+ left: 0;
382
+ top: 0;
383
+ border-radius: 1px;
384
+ background: #fff;
385
+ border: 1px solid #f0f0f0;
386
+ box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
387
+ }
388
+
389
+ .ew-color-picker-slider.ew-color-picker-is-horizontal .ew-color-picker-alpha-slider-thumb,
390
+ .ew-color-picker-slider.ew-color-picker-is-horizontal .ew-color-picker-slider-thumb {
391
+ width: var(--thumb-size-h);
392
+ height: 100%;
393
+ }
394
+
395
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-alpha-slider-thumb,
396
+ .ew-color-picker-slider.ew-color-picker-is-vertical .ew-color-picker-slider-thumb {
397
+ width: var(--thumb-size-v-bar);
398
+ height: var(--thumb-size-v);
399
+ }
400
+
401
+ .ew-color-picker-panel-cursor {
402
+ left: 0;
403
+ top: 0;
404
+ cursor: default;
405
+ width: var(--cursor-size);
406
+ height: var(--cursor-size);
407
+ border-radius: 50%;
408
+ box-shadow: 0 0 0 var(--cursor-ring) #fff, inset 0 0 2px 2px rgba(0, 0, 0, 0.4), 0 0 2px 3px rgba(0, 0, 0, 0.5);
409
+ transform: translate(-50%, -50%);
410
+ }
411
+
412
+ .ew-color-picker-drop-container {
413
+ margin-top: var(--drop-container-margin-top);
414
+ padding-top: var(--drop-container-padding-top);
415
+ min-height: var(--drop-container-min-height);
416
+ border-top: 1px solid #cdcdcd;
417
+ }
418
+
419
+ .ew-has-mode-container .ew-color-picker-input {
420
+ width: 210px;
421
+ }
422
+
423
+ .ew-has-mode-container .ew-color-mode-container {
424
+ margin-left: 3px;
425
+ }
426
+
427
+ .ew-color-picker-bottom-row {
428
+ display: flex;
429
+ align-items: center;
430
+ justify-content: space-between;
431
+ gap: var(--bottom-row-gap);
432
+ margin-top: var(--bottom-row-margin-top);
433
+ }
434
+
435
+ .ew-color-picker-bottom-row input {
436
+ flex: 1 1 auto;
437
+ min-width: 0;
438
+ box-sizing: border-box;
439
+ }
440
+
441
+ .ew-color-picker-drop-btn-group {
442
+ display: flex;
443
+ gap: 2px;
444
+ }
445
+
446
+ .ew-color-picker-drop-btn-group button {
447
+ min-width: var(--btn-min-width);
448
+ box-sizing: border-box;
449
+ }
450
+
451
+ .ew-color-picker-input {
452
+ width: 100%;
453
+ height: var(--input-height);
454
+ line-height: var(--input-line-height);
455
+ border: 1px solid #dcdfe6;
456
+ border-radius: var(--input-radius);
457
+ padding: var(--input-padding);
458
+ font-size: var(--input-font-size);
459
+ transition: border-color 0.2s;
460
+ outline: none;
461
+ box-sizing: border-box;
462
+ }
463
+
464
+ .ew-color-picker-input:focus {
465
+ border-color: var(--ewcp-color-primary, #4096ef);
466
+ }
467
+
468
+ .ew-color-picker-drop-btn {
469
+ display: inline-flex;
470
+ align-items: center;
471
+ justify-content: center;
472
+ gap: 4px;
473
+ padding: var(--btn-padding);
474
+ font-size: var(--btn-font-size);
475
+ border-radius: var(--btn-radius);
476
+ transition: 0.1s;
477
+ font-weight: 500;
478
+ margin: 0;
479
+ white-space: nowrap;
480
+ color: #606266;
481
+ border: 1px solid #dcdfe6;
482
+ letter-spacing: 1px;
483
+ }
484
+
485
+ .ew-color-picker-clear-btn {
486
+ color: var(--ewcp-color-primary, #4096ef);
487
+ border-color: transparent;
488
+ background-color: transparent;
489
+ padding-left: 0;
490
+ padding-right: 0;
491
+ }
492
+
493
+ .ew-color-picker-clear-btn:active,
494
+ .ew-color-picker-clear-btn:hover {
495
+ color: #66b1ff;
496
+ }
497
+
498
+ .ew-color-picker-sure-btn:active,
499
+ .ew-color-picker-sure-btn:hover {
500
+ border-color: var(--ewcp-color-primary, #4096ef);
501
+ color: var(--ewcp-color-primary, #4096ef);
502
+ }
503
+
504
+ .ew-color-picker-predefine-container {
505
+ display: flex;
506
+ flex-wrap: wrap;
507
+ gap: var(--predefine-gap);
508
+ width: 100%;
509
+ font-size: var(--predefine-font-size);
510
+ margin-top: var(--predefine-margin-top);
511
+ }
512
+
513
+ .ew-color-picker-predefine-color {
514
+ margin: 0;
515
+ width: var(--predefine-item-size);
516
+ height: var(--predefine-item-size);
517
+ border-radius: var(--predefine-item-radius);
518
+ border: 1px solid #9b979b;
519
+ }
520
+
521
+ .ew-color-picker-predefine-color-item {
522
+ height: 100%;
523
+ border-radius: 3px;
524
+ }
525
+
526
+ .ew-color-picker-predefine-color.ew-color-picker-predefine-color-disabled {
527
+ cursor: not-allowed;
528
+ }
529
+
530
+ .ew-color-picker-predefine-color:not(.ew-color-picker-predefine-color-disabled):active,
531
+ .ew-color-picker-predefine-color:not(.ew-color-picker-predefine-color-disabled):hover {
532
+ opacity: 0.8;
533
+ }
534
+
535
+ .ew-color-picker-predefine-color-active {
536
+ box-shadow: 0 0 3px 2px #409eff;
537
+ }
538
+
539
+ .ew-color-picker-box {
540
+ display: inline-block;
541
+ border: 1.5px solid #dcdfe6;
542
+ border-radius: 6px;
543
+ background: #fff;
544
+ box-sizing: border-box;
545
+ cursor: pointer;
546
+ transition: border-color 0.2s, box-shadow 0.2s;
547
+ position: relative;
548
+ vertical-align: middle;
549
+ text-align: center;
550
+ /* 图标默认颜色,有背景色时由脚本按对比度覆盖 */
551
+ color: #666666;
552
+ }
553
+
554
+ .ew-color-picker-box:hover {
555
+ border-color: var(--ewcp-color-primary, #4096ef);
556
+ box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.12);
557
+ }
558
+
559
+ .ew-color-picker-box.is-disabled {
560
+ background: #f5f5f5;
561
+ cursor: not-allowed;
562
+ opacity: 0.7;
563
+ }
564
+
565
+ .ew-color-picker-box:hover {
566
+ border-color: var(--ewcp-color-primary, #4096ef);
567
+ }
568
+
569
+ .ew-color-picker-box:active {
570
+ border-color: var(--ewcp-color-primary, #4096ef);
571
+ box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.2);
572
+ }
573
+
574
+ .ew-color-picker-input.ew-input-disabled,
575
+ .ew-color-picker-box-disabled {
576
+ background-color: #ebe7e7;
577
+ cursor: not-allowed;
578
+ }
579
+
580
+ .ew-color-picker-arrow,
581
+ .ew-color-picker-no {
582
+ width: 20px;
583
+ height: 20px;
584
+ margin: auto;
585
+ z-index: 3;
586
+ }
587
+
588
+ .ew-color-picker-no {
589
+ width: 40px;
590
+ height: 40px;
591
+ font-size: 20px;
592
+ line-height: 40px;
593
+ color: #5e535f;
594
+ border: 1px solid #e2dfe2;
595
+ border-radius: 2px;
596
+ }
597
+
598
+ .ew-color-picker-arrow {
599
+ display: flex;
600
+ justify-content: center;
601
+ align-items: center;
602
+ }
603
+
604
+ .ew-color-mode-container {
605
+ display: inline-block;
606
+ vertical-align: middle;
607
+ padding: 6px;
608
+ border-radius: 2px;
609
+ }
610
+
611
+ .ew-color-mode-container:hover {
612
+ background-color: #ebe7e7;
613
+ }
614
+
615
+ .ew-color-mode-container .ew-color-mode-down,
616
+ .ew-color-mode-container .ew-color-mode-up {
617
+ width: 0;
618
+ height: 0;
619
+ border-width: 6px;
620
+ border-style: solid;
621
+ cursor: pointer;
622
+ }
623
+
624
+ .ew-color-mode-container .ew-color-mode-up {
625
+ bottom: 5px;
626
+ border-color: transparent transparent #606266;
627
+ }
628
+
629
+ .ew-color-mode-container .ew-color-mode-down {
630
+ top: 5px;
631
+ border-color: #606266 transparent transparent;
632
+ }
633
+
634
+ .ew-color-mode-title {
635
+ color: #535455;
636
+ font-size: 16px;
637
+ display: inline-block;
638
+ padding-right: 2px;
639
+ }
640
+
641
+ .ew-color-mode-title:after {
642
+ content: ":";
643
+ display: inline-block;
644
+ }
645
+
646
+ .ew-color-picker-arrow-icon {
647
+ fill: #fff;
648
+ }
649
+
650
+ .ew-color-picker-icon {
651
+ display: block;
652
+ fill: currentColor;
653
+ max-width: 100%;
654
+ max-height: 100%;
655
+ pointer-events: none;
656
+ }
657
+
658
+ .ew-color-picker-box-arrow-icon {
659
+ position: absolute;
660
+ top: 50%;
661
+ left: 50%;
662
+ transform: translate(-50%, -50%);
663
+ display: block;
664
+ pointer-events: none;
665
+ }
666
+
667
+ .ew-color-picker-box-close-icon {
668
+ position: absolute;
669
+ top: 50%;
670
+ left: 50%;
671
+ transform: translate(-50%, -50%);
672
+ display: block;
673
+ pointer-events: none;
674
+ }
675
+
676
+ @keyframes fadeIn {
677
+ from {
678
+ opacity: 0;
679
+ }
680
+ to {
681
+ opacity: 1;
682
+ }
683
+ }
684
+ @keyframes fadeOut {
685
+ from {
686
+ opacity: 1;
687
+ }
688
+ to {
689
+ opacity: 0;
690
+ }
691
+ }
692
+ @keyframes slideDown {
693
+ from {
694
+ transform: translateY(-10px);
695
+ opacity: 0;
696
+ }
697
+ to {
698
+ transform: translateY(0);
699
+ opacity: 1;
700
+ }
701
+ }
702
+ @keyframes slideUp {
703
+ from {
704
+ transform: translateY(0);
705
+ opacity: 1;
706
+ }
707
+ to {
708
+ transform: translateY(-10px);
709
+ opacity: 0;
710
+ }
711
+ }
712
+ .ew-fade-in {
713
+ animation: fadeIn 0.2s ease-in-out;
714
+ }
715
+
716
+ .ew-fade-out {
717
+ animation: fadeOut 0.2s ease-in-out;
718
+ }
719
+
720
+ .ew-slide-down {
721
+ animation: slideDown 0.2s ease-in-out;
722
+ }
723
+
724
+ .ew-slide-up {
725
+ animation: slideUp 0.2s ease-in-out;
726
+ }
727
+
728
+ .ew-color-picker-panel-container * {
729
+ box-sizing: border-box;
730
+ }
731
+
732
+ .ew-color-picker-white-panel,
733
+ .ew-color-picker-black-panel {
734
+ border-radius: inherit;
735
+ }
736
+
737
+ .ew-color-picker-panel-container .ew-color-picker-mode-container {
738
+ display: flex;
739
+ align-items: center;
740
+ justify-content: center;
741
+ gap: var(--mode-container-gap);
742
+ margin-top: var(--mode-container-margin-top);
743
+ margin-bottom: var(--mode-container-margin-bottom);
744
+ padding: var(--mode-container-padding);
745
+ border: 1px solid #e5e6eb;
746
+ border-radius: var(--mode-container-radius);
747
+ background-color: #fafafa;
748
+ }
749
+
750
+ .ew-color-picker-mode-up-btn,
751
+ .ew-color-picker-mode-down-btn {
752
+ width: var(--mode-btn-size);
753
+ height: var(--mode-btn-size);
754
+ flex: 0 0 var(--mode-btn-size);
755
+ border: 1px solid #ddd;
756
+ background: #fff;
757
+ cursor: pointer;
758
+ display: flex;
759
+ align-items: center;
760
+ justify-content: center;
761
+ border-radius: var(--mode-btn-radius);
762
+ transition: all 0.2s;
763
+ }
764
+
765
+ /* 防止图标在 flex 布局中被压缩到 0 宽度 */
766
+ .ew-color-picker-mode-up-btn svg,
767
+ .ew-color-picker-mode-down-btn svg {
768
+ width: var(--mode-btn-icon-size);
769
+ height: var(--mode-btn-icon-size);
770
+ flex: 0 0 var(--mode-btn-icon-size);
771
+ }
772
+
773
+ .ew-color-picker-mode-text {
774
+ min-width: var(--mode-text-min-width);
775
+ text-align: center;
776
+ font-size: var(--mode-text-font-size);
777
+ font-weight: bold;
778
+ color: #333;
779
+ user-select: none;
780
+ padding: var(--mode-text-padding);
781
+ }
782
+
783
+ .ew-color-picker-inputs-group {
784
+ display: flex;
785
+ flex-direction: row;
786
+ gap: var(--inputs-group-gap);
787
+ align-items: flex-end;
788
+ margin-bottom: 0;
789
+ width: 100%;
790
+ }
791
+
792
+ .ew-color-picker-inputs-col {
793
+ display: flex;
794
+ flex-direction: column;
795
+ align-items: center;
796
+ flex: 1;
797
+ min-width: 0;
798
+ }
799
+
800
+ .ew-color-picker-input-label {
801
+ font-size: var(--inputs-label-font-size);
802
+ color: #666;
803
+ text-align: center;
804
+ margin-bottom: var(--inputs-label-margin-bottom);
805
+ letter-spacing: 1px;
806
+ font-weight: bold;
807
+ height: var(--inputs-label-height);
808
+ line-height: var(--inputs-label-line-height);
809
+ user-select: none;
810
+ }
811
+
812
+ .ew-color-picker-input-container-flex {
813
+ flex: 1;
814
+ min-width: 0;
815
+ }
816
+
817
+ .ew-color-picker-input-default {
818
+ width: 100%;
819
+ padding: var(--default-input-padding);
820
+ border: 1px solid #ddd;
821
+ border-radius: 4px;
822
+ font-size: var(--default-input-font-size);
823
+ text-align: center;
824
+ }
825
+
826
+ .ew-color-picker-drop-btn-group-multi {
827
+ display: flex;
828
+ justify-content: center;
829
+ gap: 8px;
830
+ width: 100%;
831
+ margin-top: var(--bottom-row-margin-top);
832
+ }
833
+
834
+ .ew-color-picker-drop-btn-group-single {
835
+ display: flex;
836
+ gap: 4px;
837
+ }
838
+
839
+ .ew-color-picker-bottom-row-multi {
840
+ flex-direction: column;
841
+ align-items: stretch;
842
+ }
843
+
844
+ .ew-color-picker-bottom-row-single {
845
+ flex-direction: row;
846
+ align-items: center;
847
+ }
848
+
849
+ .ew-input-number-size-small {
850
+ height: 24px;
851
+ }
852
+
853
+ .ew-input-number-size-large {
854
+ height: 32px;
855
+ }
856
+
857
+ .ew-input-number-size-default {
858
+ height: 28px;
859
+ }
860
+
861
+ .ew-input-number-input-size-small {
862
+ font-size: 12px;
863
+ padding: 2px 6px;
864
+ }
865
+
866
+ .ew-input-number-input-size-large {
867
+ font-size: 16px;
868
+ padding: 6px 10px;
869
+ }
870
+
871
+ .ew-color-picker-panel-dynamic-size {
872
+ width: var(--panel-width, 285px); /* 使用 CSS 变量,默认值 285px */
873
+ height: var(--panel-height, 180px); /* 使用 CSS 变量,默认值 180px */
874
+ }
875
+
876
+ .ew-color-picker-panel-container-hidden {
877
+ display: none;
878
+ }
879
+
880
+ .ew-color-picker-panel-container .ew-color-picker-bottom-row-multi {
881
+ justify-content: center;
882
+ }
883
+
884
+ .ew-color-picker-panel-container .ew-color-picker-inputs-group {
885
+ display: flex;
886
+ width: 100%;
887
+ max-width: var(--color-inputs-max-width);
888
+ min-width: var(--color-inputs-min-width);
889
+ gap: var(--color-inputs-gap);
890
+ justify-content: center;
891
+ margin-bottom: var(--color-inputs-margin-bottom);
892
+ box-sizing: border-box;
893
+ }
894
+
895
+ .ew-color-picker-panel-container .ew-color-picker-hsl-h-input,
896
+ .ew-color-picker-panel-container .ew-color-picker-hsl-s-input,
897
+ .ew-color-picker-panel-container .ew-color-picker-hsl-l-input,
898
+ .ew-color-picker-panel-container .ew-color-picker-hsl-a-input {
899
+ height: var(--hsl-input-height);
900
+ min-height: var(--hsl-input-height);
901
+ max-height: var(--hsl-input-height);
902
+ box-sizing: border-box;
903
+ }
904
+
905
+ .ew-color-picker-panel-container .ew-color-picker-hsl-h-input.ew-input-number,
906
+ .ew-color-picker-panel-container .ew-color-picker-hsl-a-input.ew-input-number {
907
+ height: var(--hsl-input-height);
908
+ min-height: var(--hsl-input-height);
909
+ max-height: var(--hsl-input-height);
910
+ }
911
+
912
+ .ew-color-picker-panel-container .ew-color-picker-hsl-s-input.ew-color-picker-input,
913
+ .ew-color-picker-panel-container .ew-color-picker-hsl-l-input.ew-color-picker-input {
914
+ height: var(--hsl-input-height);
915
+ min-height: var(--hsl-input-height);
916
+ max-height: var(--hsl-input-height);
917
+ line-height: var(--hsl-input-height);
918
+ width: 100%;
919
+ }
920
+
921
+ .ew-color-picker-extra-row {
922
+ display: flex;
923
+ align-items: center;
924
+ justify-content: flex-start;
925
+ gap: var(--extra-row-gap);
926
+ margin-top: var(--extra-row-margin-top);
927
+ }
928
+
929
+ .ew-color-picker-eyedropper-group {
930
+ display: flex;
931
+ align-items: center;
932
+ flex: 0 0 auto;
933
+ }
934
+
935
+ .ew-color-picker-eyedropper-btn {
936
+ display: inline-flex;
937
+ align-items: center;
938
+ justify-content: center;
939
+ gap: 4px;
940
+ height: var(--eyedropper-btn-height);
941
+ padding: var(--eyedropper-btn-padding);
942
+ box-sizing: border-box;
943
+ font-size: var(--default-input-font-size);
944
+ line-height: 1;
945
+ color: #606266;
946
+ background: transparent;
947
+ border: 1px solid transparent;
948
+ border-radius: 3px;
949
+ outline: none;
950
+ cursor: pointer;
951
+ transition: color 0.1s, border-color 0.1s;
952
+ white-space: nowrap;
953
+ }
954
+
955
+ .ew-color-picker-eyedropper-btn:hover {
956
+ color: var(--ewcp-color-primary, #4096ef);
957
+ border-color: #dcdfe6;
958
+ }
959
+
960
+ .ew-color-picker-eyedropper-btn:focus-visible {
961
+ border-color: var(--ewcp-color-primary, #4096ef);
962
+ }
963
+
964
+ .ew-color-picker-eyedropper-btn .ew-color-picker-icon {
965
+ display: block;
966
+ width: var(--eyedropper-btn-icon);
967
+ height: var(--eyedropper-btn-icon);
968
+ }
969
+
970
+ .ew-color-picker-copy-group {
971
+ display: flex;
972
+ align-items: center;
973
+ flex: 0 0 auto;
974
+ position: relative;
975
+ }
976
+
977
+ .ew-color-picker-copy-btn {
978
+ display: inline-flex;
979
+ align-items: center;
980
+ justify-content: center;
981
+ width: var(--copy-btn-size);
982
+ height: var(--copy-btn-size);
983
+ flex: 0 0 var(--copy-btn-size);
984
+ padding: 0;
985
+ box-sizing: border-box;
986
+ border: 1px solid #dcdfe6;
987
+ border-radius: 50%;
988
+ background-color: #fff;
989
+ color: #333;
990
+ outline: none;
991
+ cursor: pointer;
992
+ transition: box-shadow 0.2s, border-color 0.2s, transform 0.1s;
993
+ }
994
+
995
+ .ew-color-picker-copy-btn:hover,
996
+ .ew-color-picker-copy-btn:focus-visible {
997
+ border-color: var(--ewcp-color-primary, #4096ef);
998
+ box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.18);
999
+ }
1000
+
1001
+ .ew-color-picker-copy-btn:active {
1002
+ transform: scale(0.94);
1003
+ }
1004
+
1005
+ .ew-color-picker-copy-btn.ew-color-picker-copy-btn-copied {
1006
+ border-color: #52c41a;
1007
+ box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.18);
1008
+ }
1009
+
1010
+ .ew-color-picker-copy-btn .ew-color-picker-icon {
1011
+ display: block;
1012
+ width: var(--copy-btn-icon);
1013
+ height: var(--copy-btn-icon);
1014
+ }
1015
+
1016
+ .ew-color-picker-copy-tip {
1017
+ position: absolute;
1018
+ display: inline-flex;
1019
+ align-items: center;
1020
+ gap: 4px;
1021
+ left: calc(100% + 8px);
1022
+ top: 50%;
1023
+ padding: 3px 8px;
1024
+ border: 1px solid #e5e6eb;
1025
+ border-radius: 4px;
1026
+ background: #fff;
1027
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
1028
+ color: #333;
1029
+ font-size: 12px;
1030
+ line-height: 18px;
1031
+ white-space: nowrap;
1032
+ opacity: 0;
1033
+ visibility: hidden;
1034
+ transform: translate(-4px, -50%);
1035
+ transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
1036
+ pointer-events: none;
1037
+ z-index: 2;
1038
+ }
1039
+
1040
+ .ew-color-picker-copy-tip.ew-color-picker-copy-tip-show {
1041
+ opacity: 1;
1042
+ visibility: visible;
1043
+ transform: translate(0, -50%);
1044
+ }
1045
+
1046
+ .ew-gradient-container {
1047
+ display: flex;
1048
+ flex-direction: column;
1049
+ gap: 6px;
1050
+ width: 100%;
1051
+ margin-top: var(--gradient-label-margin-top);
1052
+ box-sizing: border-box;
1053
+ font-size: var(--gradient-label-font-size);
1054
+ }
1055
+
1056
+ .ew-gradient-preview {
1057
+ position: relative;
1058
+ padding: 0 7px;
1059
+ cursor: crosshair;
1060
+ }
1061
+
1062
+ .ew-gradient-preview-bar {
1063
+ position: relative;
1064
+ height: var(--gradient-bar-height);
1065
+ border: 1px solid #e5e6eb;
1066
+ border-radius: var(--gradient-bar-radius);
1067
+ box-sizing: border-box;
1068
+ cursor: crosshair;
1069
+ }
1070
+
1071
+ .ew-gradient-handle {
1072
+ position: absolute;
1073
+ top: 50%;
1074
+ width: var(--gradient-handle-size);
1075
+ height: var(--gradient-handle-size);
1076
+ padding: 0;
1077
+ margin: 0;
1078
+ border: 2px solid #fff;
1079
+ border-radius: 50%;
1080
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
1081
+ box-sizing: border-box;
1082
+ transform: translate(-50%, -50%);
1083
+ cursor: pointer;
1084
+ z-index: 3;
1085
+ outline: none;
1086
+ }
1087
+
1088
+ .ew-gradient-handle.ew-gradient-handle-active {
1089
+ box-shadow: 0 0 0 2px #1890ff;
1090
+ z-index: 4;
1091
+ }
1092
+
1093
+ .ew-gradient-row {
1094
+ display: flex;
1095
+ align-items: center;
1096
+ flex-wrap: wrap;
1097
+ gap: var(--gradient-row-gap);
1098
+ min-height: var(--gradient-row-min-height);
1099
+ }
1100
+
1101
+ .ew-gradient-label {
1102
+ color: #666;
1103
+ font-size: var(--gradient-label-font-size);
1104
+ line-height: var(--gradient-label-line-height);
1105
+ white-space: nowrap;
1106
+ }
1107
+
1108
+ .ew-gradient-select {
1109
+ display: flex;
1110
+ flex: 1;
1111
+ min-width: 0;
1112
+ }
1113
+
1114
+ .ew-gradient-select .ew-select {
1115
+ width: 100%;
1116
+ }
1117
+
1118
+ .ew-gradient-text {
1119
+ flex: 1;
1120
+ min-width: 0;
1121
+ height: var(--gradient-text-height);
1122
+ padding: 0 6px;
1123
+ border: 1px solid #d9d9d9;
1124
+ border-radius: 6px;
1125
+ box-sizing: border-box;
1126
+ font-size: var(--gradient-text-font-size);
1127
+ outline: none;
1128
+ }
1129
+
1130
+ .ew-gradient-text:focus {
1131
+ border-color: var(--ewcp-color-primary, #4096ef);
1132
+ box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.18);
1133
+ }
1134
+
1135
+ .ew-gradient-btn {
1136
+ flex: none;
1137
+ height: var(--gradient-btn-height);
1138
+ padding: 0 6px;
1139
+ border: 1px solid #d9d9d9;
1140
+ border-radius: 6px;
1141
+ background: #fff;
1142
+ color: #333;
1143
+ font-size: var(--gradient-btn-font-size);
1144
+ line-height: 1;
1145
+ cursor: pointer;
1146
+ transition: border-color 0.2s, color 0.2s, transform 0.2s;
1147
+ }
1148
+
1149
+ .ew-gradient-btn:hover {
1150
+ border-color: var(--ewcp-color-primary, #4096ef);
1151
+ color: var(--ewcp-color-primary, #4096ef);
1152
+ }
1153
+
1154
+ .ew-gradient-btn:active {
1155
+ transform: scale(0.94);
1156
+ }
1157
+
1158
+ .ew-gradient-container .ew-input-number {
1159
+ flex: none;
1160
+ width: 84px;
1161
+ }
1162
+
1163
+ .ew-gradient-container .ew-input-number__buttons {
1164
+ width: 24px;
1165
+ min-width: 24px;
1166
+ }
1167
+
1168
+ .ew-color-picker-panel-mini {
1169
+ --container-padding: 6px;
1170
+ --container-margin-top: 6px;
1171
+ --container-min-width: 220px;
1172
+ --container-radius: 8px;
1173
+ --panel-radius: 6px;
1174
+ --content-gap: 8px;
1175
+ --slider-width-v: 9px;
1176
+ --slider-height-h: 9px;
1177
+ --slider-gap: 3px;
1178
+ --slider-hue-bg-offset: 2px;
1179
+ --slider-alpha-top-gap: 2px;
1180
+ --slider-hue-top-margin: 5px;
1181
+ --thumb-size-v: 3px;
1182
+ --thumb-size-v-bar: 9px;
1183
+ --thumb-size-h: 3px;
1184
+ --cursor-size: 3px;
1185
+ --cursor-ring: 2px;
1186
+ --drop-container-margin-top: 4px;
1187
+ --drop-container-padding-top: 3px;
1188
+ --drop-container-min-height: 22px;
1189
+ --bottom-row-gap: 5px;
1190
+ --bottom-row-margin-top: 5px;
1191
+ --mode-container-gap: 4px;
1192
+ --mode-container-padding: 4px;
1193
+ --mode-container-margin-top: 4px;
1194
+ --mode-container-margin-bottom: 6px;
1195
+ --mode-container-radius: 4px;
1196
+ --mode-title-font-size: 11px;
1197
+ --mode-btn-size: 18px;
1198
+ --mode-btn-icon-size: 10px;
1199
+ --mode-btn-radius: 2px;
1200
+ --mode-arrow-size: 4px;
1201
+ --mode-text-font-size: 10px;
1202
+ --mode-text-min-width: 36px;
1203
+ --mode-text-padding: 0 2px;
1204
+ --input-height: 24px;
1205
+ --input-line-height: 24px;
1206
+ --input-font-size: 11px;
1207
+ --input-padding: 0 6px;
1208
+ --input-radius: 4px;
1209
+ --default-input-height: 22px;
1210
+ --default-input-padding: 3px 6px;
1211
+ --default-input-font-size: 11px;
1212
+ --btn-padding: 3px;
1213
+ --btn-font-size: 11px;
1214
+ --btn-radius: 2px;
1215
+ --btn-min-width: 44px;
1216
+ --predefine-item-size: 14px;
1217
+ --predefine-item-radius: 3px;
1218
+ --predefine-gap: 5px;
1219
+ --predefine-margin-top: 8px;
1220
+ --predefine-font-size: 11px;
1221
+ --extra-row-gap: 5px;
1222
+ --extra-row-margin-top: 5px;
1223
+ --eyedropper-btn-height: 22px;
1224
+ --eyedropper-btn-padding: 0 4px;
1225
+ --eyedropper-btn-icon: 12px;
1226
+ --copy-btn-size: 22px;
1227
+ --copy-btn-icon: 11px;
1228
+ --gradient-bar-height: 10px;
1229
+ --gradient-bar-radius: 5px;
1230
+ --gradient-handle-size: 10px;
1231
+ --gradient-row-gap: 3px;
1232
+ --gradient-row-min-height: 20px;
1233
+ --gradient-label-font-size: 11px;
1234
+ --gradient-label-line-height: 20px;
1235
+ --gradient-text-height: 20px;
1236
+ --gradient-text-font-size: 11px;
1237
+ --gradient-btn-height: 20px;
1238
+ --gradient-btn-font-size: 11px;
1239
+ --gradient-label-margin-top: 5px;
1240
+ --gradient-stop-number-width: 44px;
1241
+ --inputs-group-gap: 3px;
1242
+ --inputs-label-font-size: 11px;
1243
+ --inputs-label-height: 15px;
1244
+ --inputs-label-line-height: 15px;
1245
+ --inputs-label-margin-bottom: 1px;
1246
+ --hsl-input-height: 24px;
1247
+ --input-number-height: 24px;
1248
+ --input-number-border-width: 1px;
1249
+ --input-number-radius: 3px;
1250
+ --input-number-input-padding: 2px 4px;
1251
+ --input-number-input-font-size: 11px;
1252
+ --input-number-buttons-width: 18px;
1253
+ --input-number-buttons-min-width: 16px;
1254
+ --input-number-icon-size: 6px;
1255
+ --select-height: 24px;
1256
+ --select-border-width: 1px;
1257
+ --select-radius: 3px;
1258
+ --select-padding: 0 5px;
1259
+ --select-font-size: 11px;
1260
+ --select-arrow-size: 8px;
1261
+ --select-clear-size: 8px;
1262
+ --checkbox-gap: 3px;
1263
+ --checkbox-font-size: 10px;
1264
+ --checkbox-border-width: 1px;
1265
+ --checkbox-box-size: 11px;
1266
+ --checkbox-box-radius: 2px;
1267
+ --checkbox-icon-size: 7px;
1268
+ --mode-new-container-gap: 5px;
1269
+ --mode-new-btn-size: 20px;
1270
+ --mode-new-btn-icon: 12px;
1271
+ --color-inputs-max-width: 220px;
1272
+ --color-inputs-min-width: 200px;
1273
+ --color-inputs-gap: 4px;
1274
+ --color-inputs-margin-bottom: 5px;
1275
+ }
1276
+
1277
+ .ew-color-picker-panel-small {
1278
+ --container-padding: 8px;
1279
+ --container-margin-top: 7px;
1280
+ --container-min-width: 260px;
1281
+ --container-radius: 9px;
1282
+ --panel-radius: 7px;
1283
+ --content-gap: 10px;
1284
+ --slider-width-v: 10px;
1285
+ --slider-height-h: 10px;
1286
+ --slider-gap: 3px;
1287
+ --slider-hue-bg-offset: 2px;
1288
+ --slider-alpha-top-gap: 2px;
1289
+ --slider-hue-top-margin: 6px;
1290
+ --thumb-size-v: 3px;
1291
+ --thumb-size-v-bar: 10px;
1292
+ --thumb-size-h: 3px;
1293
+ --cursor-size: 3px;
1294
+ --cursor-ring: 2px;
1295
+ --drop-container-margin-top: 5px;
1296
+ --drop-container-padding-top: 3px;
1297
+ --drop-container-min-height: 25px;
1298
+ --bottom-row-gap: 6px;
1299
+ --bottom-row-margin-top: 6px;
1300
+ --mode-container-gap: 5px;
1301
+ --mode-container-padding: 5px;
1302
+ --mode-container-margin-top: 5px;
1303
+ --mode-container-margin-bottom: 8px;
1304
+ --mode-container-radius: 5px;
1305
+ --mode-title-font-size: 12px;
1306
+ --mode-btn-size: 20px;
1307
+ --mode-btn-icon-size: 12px;
1308
+ --mode-btn-radius: 3px;
1309
+ --mode-arrow-size: 5px;
1310
+ --mode-text-font-size: 12px;
1311
+ --mode-text-min-width: 46px;
1312
+ --mode-text-padding: 0 4px;
1313
+ --input-height: 28px;
1314
+ --input-line-height: 28px;
1315
+ --input-font-size: 12px;
1316
+ --input-padding: 0 7px;
1317
+ --input-radius: 4px;
1318
+ --default-input-height: 25px;
1319
+ --default-input-padding: 3px 7px;
1320
+ --default-input-font-size: 11px;
1321
+ --btn-padding: 4px;
1322
+ --btn-font-size: 11px;
1323
+ --btn-radius: 2px;
1324
+ --btn-min-width: 50px;
1325
+ --predefine-item-size: 17px;
1326
+ --predefine-item-radius: 3px;
1327
+ --predefine-gap: 6px;
1328
+ --predefine-margin-top: 10px;
1329
+ --predefine-font-size: 11px;
1330
+ --extra-row-gap: 6px;
1331
+ --extra-row-margin-top: 6px;
1332
+ --eyedropper-btn-height: 25px;
1333
+ --eyedropper-btn-padding: 0 5px;
1334
+ --eyedropper-btn-icon: 14px;
1335
+ --copy-btn-size: 25px;
1336
+ --copy-btn-icon: 12px;
1337
+ --gradient-bar-height: 12px;
1338
+ --gradient-bar-radius: 6px;
1339
+ --gradient-handle-size: 12px;
1340
+ --gradient-row-gap: 3px;
1341
+ --gradient-row-min-height: 22px;
1342
+ --gradient-label-font-size: 11px;
1343
+ --gradient-label-line-height: 22px;
1344
+ --gradient-text-height: 22px;
1345
+ --gradient-text-font-size: 11px;
1346
+ --gradient-btn-height: 22px;
1347
+ --gradient-btn-font-size: 11px;
1348
+ --gradient-label-margin-top: 6px;
1349
+ --gradient-stop-number-width: 50px;
1350
+ --inputs-group-gap: 3px;
1351
+ --inputs-label-font-size: 11px;
1352
+ --inputs-label-height: 16px;
1353
+ --inputs-label-line-height: 16px;
1354
+ --inputs-label-margin-bottom: 1px;
1355
+ --hsl-input-height: 28px;
1356
+ --input-number-height: 28px;
1357
+ --input-number-border-width: 1px;
1358
+ --input-number-radius: 4px;
1359
+ --input-number-input-padding: 3px 5px;
1360
+ --input-number-input-font-size: 12px;
1361
+ --input-number-buttons-width: 22px;
1362
+ --input-number-buttons-min-width: 18px;
1363
+ --input-number-icon-size: 7px;
1364
+ --select-height: 28px;
1365
+ --select-border-width: 1px;
1366
+ --select-radius: 4px;
1367
+ --select-padding: 0 6px;
1368
+ --select-font-size: 12px;
1369
+ --select-arrow-size: 9px;
1370
+ --select-clear-size: 9px;
1371
+ --checkbox-gap: 4px;
1372
+ --checkbox-font-size: 11px;
1373
+ --checkbox-border-width: 1px;
1374
+ --checkbox-box-size: 13px;
1375
+ --checkbox-box-radius: 3px;
1376
+ --checkbox-icon-size: 8px;
1377
+ --mode-new-container-gap: 6px;
1378
+ --mode-new-btn-size: 22px;
1379
+ --mode-new-btn-icon: 14px;
1380
+ --color-inputs-max-width: 260px;
1381
+ --color-inputs-min-width: 230px;
1382
+ --color-inputs-gap: 5px;
1383
+ --color-inputs-margin-bottom: 6px;
1384
+ }
1385
+
1386
+ .ew-color-picker-panel-medium {
1387
+ --container-padding: 9px;
1388
+ --container-margin-top: 7px;
1389
+ --container-min-width: 290px;
1390
+ --container-radius: 9px;
1391
+ --panel-radius: 7px;
1392
+ --content-gap: 11px;
1393
+ --slider-width-v: 11px;
1394
+ --slider-height-h: 11px;
1395
+ --slider-gap: 4px;
1396
+ --slider-hue-bg-offset: 3px;
1397
+ --slider-alpha-top-gap: 3px;
1398
+ --slider-hue-top-margin: 7px;
1399
+ --thumb-size-v: 4px;
1400
+ --thumb-size-v-bar: 11px;
1401
+ --thumb-size-h: 4px;
1402
+ --cursor-size: 4px;
1403
+ --cursor-ring: 3px;
1404
+ --drop-container-margin-top: 5px;
1405
+ --drop-container-padding-top: 3px;
1406
+ --drop-container-min-height: 26px;
1407
+ --bottom-row-gap: 7px;
1408
+ --bottom-row-margin-top: 7px;
1409
+ --mode-container-gap: 7px;
1410
+ --mode-container-padding: 7px;
1411
+ --mode-container-margin-top: 7px;
1412
+ --mode-container-margin-bottom: 11px;
1413
+ --mode-container-radius: 6px;
1414
+ --mode-title-font-size: 15px;
1415
+ --mode-btn-size: 23px;
1416
+ --mode-btn-icon-size: 15px;
1417
+ --mode-btn-radius: 4px;
1418
+ --mode-arrow-size: 6px;
1419
+ --mode-text-font-size: 13px;
1420
+ --mode-text-min-width: 54px;
1421
+ --mode-text-padding: 0 6px;
1422
+ --input-height: 30px;
1423
+ --input-line-height: 30px;
1424
+ --input-font-size: 13px;
1425
+ --input-padding: 0 7px;
1426
+ --input-radius: 5px;
1427
+ --default-input-height: 26px;
1428
+ --default-input-padding: 4px 7px;
1429
+ --default-input-font-size: 12px;
1430
+ --btn-padding: 4px;
1431
+ --btn-font-size: 12px;
1432
+ --btn-radius: 3px;
1433
+ --btn-min-width: 55px;
1434
+ --predefine-item-size: 18px;
1435
+ --predefine-item-radius: 4px;
1436
+ --predefine-gap: 7px;
1437
+ --predefine-margin-top: 11px;
1438
+ --predefine-font-size: 12px;
1439
+ --extra-row-gap: 7px;
1440
+ --extra-row-margin-top: 7px;
1441
+ --eyedropper-btn-height: 26px;
1442
+ --eyedropper-btn-padding: 0 5px;
1443
+ --eyedropper-btn-icon: 15px;
1444
+ --copy-btn-size: 26px;
1445
+ --copy-btn-icon: 13px;
1446
+ --gradient-bar-height: 13px;
1447
+ --gradient-bar-radius: 6px;
1448
+ --gradient-handle-size: 13px;
1449
+ --gradient-row-gap: 4px;
1450
+ --gradient-row-min-height: 23px;
1451
+ --gradient-label-font-size: 12px;
1452
+ --gradient-label-line-height: 23px;
1453
+ --gradient-text-height: 23px;
1454
+ --gradient-text-font-size: 12px;
1455
+ --gradient-btn-height: 23px;
1456
+ --gradient-btn-font-size: 12px;
1457
+ --gradient-label-margin-top: 7px;
1458
+ --gradient-stop-number-width: 54px;
1459
+ --inputs-group-gap: 4px;
1460
+ --inputs-label-font-size: 12px;
1461
+ --inputs-label-height: 17px;
1462
+ --inputs-label-line-height: 17px;
1463
+ --inputs-label-margin-bottom: 2px;
1464
+ --hsl-input-height: 30px;
1465
+ --input-number-height: 30px;
1466
+ --input-number-border-width: 1px;
1467
+ --input-number-radius: 4px;
1468
+ --input-number-input-padding: 3px 6px;
1469
+ --input-number-input-font-size: 13px;
1470
+ --input-number-buttons-width: 24px;
1471
+ --input-number-buttons-min-width: 20px;
1472
+ --input-number-icon-size: 7px;
1473
+ --select-height: 30px;
1474
+ --select-border-width: 1px;
1475
+ --select-radius: 4px;
1476
+ --select-padding: 0 7px;
1477
+ --select-font-size: 12px;
1478
+ --select-arrow-size: 9px;
1479
+ --select-clear-size: 9px;
1480
+ --checkbox-gap: 4px;
1481
+ --checkbox-font-size: 11px;
1482
+ --checkbox-border-width: 1px;
1483
+ --checkbox-box-size: 14px;
1484
+ --checkbox-box-radius: 3px;
1485
+ --checkbox-icon-size: 8px;
1486
+ --mode-new-container-gap: 7px;
1487
+ --mode-new-btn-size: 23px;
1488
+ --mode-new-btn-icon: 15px;
1489
+ --color-inputs-max-width: 290px;
1490
+ --color-inputs-min-width: 260px;
1491
+ --color-inputs-gap: 6px;
1492
+ --color-inputs-margin-bottom: 7px;
1493
+ }
1494
+
1495
+ .ew-color-picker-panel-mini .ew-color-picker-inputs-group,
1496
+ .ew-color-picker-panel-small .ew-color-picker-inputs-group,
1497
+ .ew-color-picker-panel-medium .ew-color-picker-inputs-group {
1498
+ flex-wrap: wrap;
1499
+ gap: var(--inputs-group-gap);
1500
+ }
1501
+
1502
+ .ew-color-picker-panel-mini .ew-color-picker-inputs-col,
1503
+ .ew-color-picker-panel-small .ew-color-picker-inputs-col,
1504
+ .ew-color-picker-panel-medium .ew-color-picker-inputs-col {
1505
+ flex: 0 0 calc(50% - var(--inputs-group-gap) / 2);
1506
+ margin-bottom: var(--inputs-group-gap);
1507
+ }
1508
+
1509
+ .ew-color-picker-panel-mini .ew-gradient-row-type,
1510
+ .ew-color-picker-panel-small .ew-gradient-row-type,
1511
+ .ew-color-picker-panel-medium .ew-gradient-row-type {
1512
+ display: grid;
1513
+ grid-template-columns: auto 1fr auto auto auto;
1514
+ row-gap: 4px;
1515
+ column-gap: 3px;
1516
+ align-items: center;
1517
+ }
1518
+
1519
+ .ew-color-picker-panel-mini .ew-gradient-row-type > *:nth-child(1),
1520
+ .ew-color-picker-panel-small .ew-gradient-row-type > *:nth-child(1),
1521
+ .ew-color-picker-panel-medium .ew-gradient-row-type > *:nth-child(1) {
1522
+ grid-column: 1;
1523
+ grid-row: 1;
1524
+ }
1525
+
1526
+ .ew-color-picker-panel-mini .ew-gradient-row-type > *:nth-child(2),
1527
+ .ew-color-picker-panel-small .ew-gradient-row-type > *:nth-child(2),
1528
+ .ew-color-picker-panel-medium .ew-gradient-row-type > *:nth-child(2) {
1529
+ grid-column: 2/-1;
1530
+ grid-row: 1;
1531
+ min-width: 0;
1532
+ }
1533
+
1534
+ .ew-color-picker-panel-mini .ew-gradient-row-type > *:nth-child(3),
1535
+ .ew-color-picker-panel-small .ew-gradient-row-type > *:nth-child(3),
1536
+ .ew-color-picker-panel-medium .ew-gradient-row-type > *:nth-child(3) {
1537
+ grid-column: 1;
1538
+ grid-row: 2;
1539
+ }
1540
+
1541
+ .ew-color-picker-panel-mini .ew-gradient-row-type > *:nth-child(4),
1542
+ .ew-color-picker-panel-small .ew-gradient-row-type > *:nth-child(4),
1543
+ .ew-color-picker-panel-medium .ew-gradient-row-type > *:nth-child(4) {
1544
+ grid-column: 2;
1545
+ grid-row: 2;
1546
+ }
1547
+
1548
+ .ew-color-picker-panel-mini .ew-gradient-row-type > *:nth-child(5),
1549
+ .ew-color-picker-panel-small .ew-gradient-row-type > *:nth-child(5),
1550
+ .ew-color-picker-panel-medium .ew-gradient-row-type > *:nth-child(5) {
1551
+ grid-column: 3;
1552
+ grid-row: 2;
1553
+ }
1554
+
1555
+ .ew-gradient-row-stop {
1556
+ flex-wrap: nowrap;
1557
+ }
1558
+
1559
+ .ew-gradient-row-stop > .ew-input-number {
1560
+ flex: 1 1 var(--gradient-stop-number-width, 60px);
1561
+ width: var(--gradient-stop-number-width, 60px);
1562
+ min-width: 0;
1563
+ }
1564
+
1565
+ .ew-gradient-row-stop > .ew-gradient-label,
1566
+ .ew-gradient-row-stop > .ew-gradient-btn {
1567
+ flex: none;
1568
+ }
1569
+
1570
+ .ew-color-picker-panel-mini .ew-gradient-row-stop > .ew-gradient-btn,
1571
+ .ew-color-picker-panel-small .ew-gradient-row-stop > .ew-gradient-btn {
1572
+ padding: 0 3px;
1573
+ }
1574
+
1575
+ .ew-color-picker-panel-mini .ew-gradient-row-stop > .ew-input-number > .ew-input-number__buttons {
1576
+ width: 14px;
1577
+ min-width: 14px;
1578
+ }
1579
+
1580
+ [data-theme=dark],
1581
+ .ewcp-scope--dark {
1582
+ --ewcp-color-text: #e5e6eb;
1583
+ --ewcp-color-text-secondary: #c9cdd4;
1584
+ --ewcp-color-text-tertiary: #86909c;
1585
+ --ewcp-color-text-disabled: #6b6b6b;
1586
+ --ewcp-color-border: #3f3f46;
1587
+ --ewcp-color-border-light: #333338;
1588
+ --ewcp-color-border-hover: #52525b;
1589
+ --ewcp-color-bg: #1f1f23;
1590
+ --ewcp-color-bg-disabled: #2a2a30;
1591
+ --ewcp-color-bg-hover: #2f3640;
1592
+ --ewcp-color-bg-secondary: #26262b;
1593
+ --ewcp-color-checkbox-border: #4a4a52;
1594
+ --ewcp-color-checkbox-disabled-bg: #2a2a30;
1595
+ --ewcp-color-checkbox-disabled-checked: #4a4a52;
1596
+ --ewcp-shadow-popper: 0 4px 16px rgba(0, 0, 0, 0.45);
1597
+ }
1598
+
1599
+ [data-theme=dark] .ew-color-picker-panel-container,
1600
+ .ewcp-scope--dark .ew-color-picker-panel-container {
1601
+ background: var(--ewcp-color-bg);
1602
+ border-color: var(--ewcp-color-border-light);
1603
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
1604
+ }
1605
+
1606
+ [data-theme=dark] .ew-color-picker-input,
1607
+ [data-theme=dark] .ew-color-picker-box,
1608
+ [data-theme=dark] .ew-color-picker-sure-btn,
1609
+ [data-theme=dark] .ew-color-picker-arrow-left,
1610
+ [data-theme=dark] .ew-color-picker-arrow-right,
1611
+ .ewcp-scope--dark .ew-color-picker-input,
1612
+ .ewcp-scope--dark .ew-color-picker-box,
1613
+ .ewcp-scope--dark .ew-color-picker-sure-btn,
1614
+ .ewcp-scope--dark .ew-color-picker-arrow-left,
1615
+ .ewcp-scope--dark .ew-color-picker-arrow-right {
1616
+ background-color: var(--ewcp-color-bg);
1617
+ border-color: var(--ewcp-color-border);
1618
+ color: var(--ewcp-color-text);
1619
+ }
1620
+
1621
+ [data-theme=dark] .ew-color-picker-mode-container,
1622
+ .ewcp-scope--dark .ew-color-picker-mode-container {
1623
+ background-color: var(--ewcp-color-bg-secondary);
1624
+ border-color: var(--ewcp-color-border-light);
1625
+ }
1626
+
1627
+ [data-theme=dark] .ew-color-mode-title,
1628
+ [data-theme=dark] .ew-color-picker-mode-text,
1629
+ .ewcp-scope--dark .ew-color-mode-title,
1630
+ .ewcp-scope--dark .ew-color-picker-mode-text {
1631
+ color: var(--ewcp-color-text);
1632
+ }
1633
+
1634
+ [data-theme=dark] .ew-color-picker-drop-container,
1635
+ .ewcp-scope--dark .ew-color-picker-drop-container {
1636
+ border-top-color: var(--ewcp-color-border-light);
1637
+ }
1638
+
1639
+ @media (prefers-reduced-motion: reduce) {
1640
+ .ew-color-picker-panel-container,
1641
+ .ew-fade-in,
1642
+ .ew-fade-out,
1643
+ .ew-slide-down,
1644
+ .ew-slide-up,
1645
+ .ew-color-picker-copy-tip,
1646
+ .ew-input,
1647
+ .ew-select__dropdown,
1648
+ .ew-checkbox__box,
1649
+ .ew-button {
1650
+ transition: none !important;
1651
+ animation: none !important;
1652
+ }
1653
+ }
1654
+ .ew-input-number {
1655
+ display: flex;
1656
+ align-items: stretch;
1657
+ border: var(--input-number-border-width, 1.5px) solid var(--ewcp-color-border, #d9d9d9);
1658
+ border-radius: var(--input-number-radius, 8px);
1659
+ background: var(--ewcp-color-bg, #fff);
1660
+ overflow: hidden;
1661
+ width: 100%;
1662
+ min-width: 0;
1663
+ padding: 0;
1664
+ max-width: none;
1665
+ box-sizing: border-box;
1666
+ transition: border-color 0.2s;
1667
+ height: var(--input-number-height, 32px);
1668
+ }
1669
+
1670
+ .ew-input-number:focus-within {
1671
+ border-color: var(--ewcp-color-primary, #4096ef);
1672
+ }
1673
+
1674
+ .ew-input-number__input {
1675
+ flex: 1;
1676
+ border: none;
1677
+ outline: none;
1678
+ padding: var(--input-number-input-padding, 4px 10px);
1679
+ font-size: var(--input-number-input-font-size, 14px);
1680
+ background: transparent;
1681
+ min-width: 0;
1682
+ height: 100%;
1683
+ box-sizing: border-box;
1684
+ color: var(--ewcp-color-text, #222);
1685
+ font-family: inherit;
1686
+ line-height: 1;
1687
+ }
1688
+
1689
+ .ew-input-number__buttons {
1690
+ width: var(--input-number-buttons-width, 32px);
1691
+ min-width: var(--input-number-buttons-min-width, 24px);
1692
+ display: flex;
1693
+ flex-direction: column;
1694
+ background: var(--ewcp-color-bg, #fff);
1695
+ height: 100%;
1696
+ padding: 0;
1697
+ margin: 0;
1698
+ border-left: var(--input-number-border-width, 1.5px) solid var(--ewcp-color-border-light, #e5e6eb);
1699
+ flex-shrink: 0;
1700
+ }
1701
+
1702
+ .ew-input-number__button {
1703
+ display: flex;
1704
+ align-items: center;
1705
+ justify-content: center;
1706
+ height: 50%;
1707
+ width: 100%;
1708
+ border: none;
1709
+ background: transparent;
1710
+ cursor: pointer;
1711
+ padding: 0;
1712
+ min-height: 0;
1713
+ box-sizing: border-box;
1714
+ line-height: 0;
1715
+ transition: background 0.2s;
1716
+ color: var(--ewcp-color-text-secondary, #666);
1717
+ }
1718
+
1719
+ .ew-input-number__button--up {
1720
+ border-bottom: 1px solid var(--ewcp-color-border-light, #e5e6eb);
1721
+ }
1722
+
1723
+ .ew-input-number__button:active {
1724
+ background: var(--ewcp-color-bg-hover, #f0f8ff);
1725
+ }
1726
+
1727
+ .ew-input-number__icon {
1728
+ width: var(--input-number-icon-size, 10px);
1729
+ height: var(--input-number-icon-size, 10px);
1730
+ flex: 0 0 var(--input-number-icon-size, 10px);
1731
+ display: block;
1732
+ margin: 0 auto;
1733
+ pointer-events: none;
1734
+ }
1735
+
1736
+ /* 横向步进:− 值 + 单行 */
1737
+ .ew-input-number--horizontal {
1738
+ border-radius: var(--input-number-radius, 10px);
1739
+ }
1740
+
1741
+ .ew-input-number--horizontal:focus-within {
1742
+ border-color: #1677ff;
1743
+ box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
1744
+ }
1745
+
1746
+ .ew-input-number--horizontal .ew-input-number__button {
1747
+ width: var(--input-number-buttons-width, 32px);
1748
+ height: 100%;
1749
+ flex: 0 0 auto;
1750
+ }
1751
+
1752
+ .ew-input-number--horizontal .ew-input-number__button:hover {
1753
+ background: var(--ewcp-color-bg-disabled, #f5f5f5);
1754
+ color: #1677ff;
1755
+ }
1756
+
1757
+ .ew-input-number--horizontal .ew-input-number__button--down {
1758
+ border-right: 1px solid var(--ewcp-color-border-light, #e5e6eb);
1759
+ border-bottom: none;
1760
+ }
1761
+
1762
+ .ew-input-number--horizontal .ew-input-number__button--up {
1763
+ border-left: 1px solid var(--ewcp-color-border-light, #e5e6eb);
1764
+ border-bottom: none;
1765
+ }
1766
+
1767
+ .ew-input-number--horizontal .ew-input-number__icon {
1768
+ width: 12px;
1769
+ height: 12px;
1770
+ flex-basis: 12px;
1771
+ }
1772
+
1773
+ .ew-input-number--horizontal .ew-input-number__input {
1774
+ text-align: center;
1775
+ }
1776
+
1777
+ /* 尺寸 */
1778
+ .ew-input-number--small {
1779
+ height: var(--input-number-height-sm, 28px);
1780
+ }
1781
+
1782
+ .ew-input-number--large {
1783
+ height: var(--input-number-height-lg, 38px);
1784
+ }
1785
+
1786
+ /* 内前缀 / 内后缀 */
1787
+ .ew-input-number__prefix,
1788
+ .ew-input-number__suffix {
1789
+ display: inline-flex;
1790
+ align-items: center;
1791
+ gap: 4px;
1792
+ flex: 0 0 auto;
1793
+ color: var(--ewcp-color-text-tertiary, #999);
1794
+ font-size: var(--input-number-input-font-size, 13px);
1795
+ white-space: nowrap;
1796
+ }
1797
+
1798
+ .ew-input-number__prefix {
1799
+ padding-left: 8px;
1800
+ }
1801
+
1802
+ .ew-input-number__suffix {
1803
+ padding-right: 8px;
1804
+ }
1805
+
1806
+ /* 外置前后缀 */
1807
+ .ew-input-number__addon {
1808
+ display: inline-flex;
1809
+ align-items: center;
1810
+ gap: 4px;
1811
+ flex: 0 0 auto;
1812
+ padding: 0 8px;
1813
+ background: var(--ewcp-color-bg-secondary, #fafafa);
1814
+ color: var(--ewcp-color-text-secondary, #666);
1815
+ font-size: var(--input-number-input-font-size, 13px);
1816
+ white-space: nowrap;
1817
+ }
1818
+
1819
+ .ew-input-number__addon--before {
1820
+ border-right: 1px solid var(--ewcp-color-border-light, #e5e6eb);
1821
+ }
1822
+
1823
+ /* 清除按钮 */
1824
+ .ew-input-number__clear {
1825
+ display: inline-flex;
1826
+ align-items: center;
1827
+ justify-content: center;
1828
+ flex: 0 0 auto;
1829
+ /* 根节点为 stretch,固定高度的清除按钮需单独居中,否则会贴顶 */
1830
+ align-self: center;
1831
+ width: 16px;
1832
+ height: 16px;
1833
+ margin: 0 6px 0 4px;
1834
+ padding: 0;
1835
+ border: none;
1836
+ border-radius: 50%;
1837
+ background: #c9cdd4;
1838
+ color: var(--ewcp-color-bg, #fff);
1839
+ cursor: pointer;
1840
+ transition: background 0.2s, opacity 0.2s;
1841
+ }
1842
+
1843
+ .ew-input-number__clear:hover {
1844
+ background: var(--ewcp-color-info, #909399);
1845
+ }
1846
+
1847
+ .ew-input-number__clear--hidden {
1848
+ display: none;
1849
+ }
1850
+
1851
+ /* 变体 */
1852
+ .ew-input-number--filled {
1853
+ background: var(--ewcp-color-bg-disabled, #f5f5f5);
1854
+ border-color: transparent;
1855
+ }
1856
+
1857
+ .ew-input-number--filled:focus-within {
1858
+ background: var(--ewcp-color-bg, #fff);
1859
+ border-color: var(--ewcp-color-primary, #4096ef);
1860
+ }
1861
+
1862
+ .ew-input-number--borderless {
1863
+ background: transparent;
1864
+ border-color: transparent;
1865
+ }
1866
+
1867
+ .ew-input-number--borderless:focus-within {
1868
+ border-color: transparent;
1869
+ }
1870
+
1871
+ .ew-input-number--underlined {
1872
+ background: transparent;
1873
+ border-width: 0 0 var(--input-number-border-width, 1.5px) 0;
1874
+ border-radius: 0;
1875
+ }
1876
+
1877
+ /* 状态 */
1878
+ .ew-input-number--error,
1879
+ .ew-input-number--error:focus-within {
1880
+ border-color: var(--ewcp-color-danger, #ff4d4f);
1881
+ }
1882
+
1883
+ .ew-input-number--warning,
1884
+ .ew-input-number--warning:focus-within {
1885
+ border-color: var(--ewcp-color-warning, #faad14);
1886
+ }
1887
+
1888
+ /* 只读 / 禁用 */
1889
+ .ew-input-number--readonly,
1890
+ .ew-input-number--disabled {
1891
+ background: var(--ewcp-color-bg-disabled, #f5f5f5);
1892
+ cursor: not-allowed;
1893
+ }
1894
+
1895
+ .ew-input-number--disabled .ew-input-number__input {
1896
+ cursor: not-allowed;
1897
+ color: #b0b3b8;
1898
+ }
1899
+
1900
+ .ew-input-number__button:disabled {
1901
+ cursor: not-allowed;
1902
+ color: #c9cdd4;
1903
+ background: transparent;
1904
+ }
1905
+
1906
+ /* 拨轮模式 */
1907
+ .ew-input-number--spinner {
1908
+ height: auto;
1909
+ border: none;
1910
+ background: transparent;
1911
+ overflow: visible;
1912
+ }
1913
+
1914
+ .ew-input-number__input--hidden {
1915
+ display: none;
1916
+ }
1917
+
1918
+ .ew-input-number__spinner {
1919
+ position: relative;
1920
+ width: 100%;
1921
+ height: 84px;
1922
+ overflow: hidden;
1923
+ -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent);
1924
+ mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent);
1925
+ }
1926
+
1927
+ .ew-input-number__spinner-list {
1928
+ height: 100%;
1929
+ overflow-y: auto;
1930
+ scroll-snap-type: y mandatory;
1931
+ scrollbar-width: none;
1932
+ }
1933
+
1934
+ /* 上下留白让首尾项也能滚动到正中,与 scrollTop = index * 行高 的算法对齐 */
1935
+ .ew-input-number__spinner-list::before,
1936
+ .ew-input-number__spinner-list::after {
1937
+ content: "";
1938
+ display: block;
1939
+ height: calc((84px - 28px) / 2);
1940
+ }
1941
+
1942
+ .ew-input-number__spinner-list::-webkit-scrollbar {
1943
+ display: none;
1944
+ }
1945
+
1946
+ .ew-input-number__spinner-item {
1947
+ height: 28px;
1948
+ line-height: 28px;
1949
+ text-align: center;
1950
+ font-size: var(--input-number-input-font-size, 13px);
1951
+ color: var(--ewcp-color-text-tertiary, #999);
1952
+ scroll-snap-align: center;
1953
+ cursor: pointer;
1954
+ user-select: none;
1955
+ transition: color 0.2s;
1956
+ }
1957
+
1958
+ .ew-input-number__spinner-item:hover {
1959
+ color: var(--ewcp-color-primary, #4096ef);
1960
+ }
1961
+
1962
+ .ew-input-number__spinner-item--active {
1963
+ color: var(--ewcp-color-text, #222);
1964
+ font-weight: 600;
1965
+ }
1966
+
1967
+ .ew-select {
1968
+ position: relative;
1969
+ display: inline-block;
1970
+ width: 100%;
1971
+ min-width: 0;
1972
+ font-family: inherit;
1973
+ box-sizing: border-box;
1974
+ }
1975
+
1976
+ .ew-select__trigger {
1977
+ display: flex;
1978
+ align-items: center;
1979
+ justify-content: space-between;
1980
+ gap: 4px;
1981
+ width: 100%;
1982
+ height: var(--select-height, 32px);
1983
+ padding: var(--select-padding, 0 10px);
1984
+ border: var(--select-border-width, 1.5px) solid var(--ewcp-color-border, #d9d9d9);
1985
+ border-radius: var(--select-radius, 8px);
1986
+ background: var(--ewcp-color-bg, #fff);
1987
+ color: var(--ewcp-color-text, #222);
1988
+ font-family: inherit;
1989
+ font-size: var(--select-font-size, 14px);
1990
+ line-height: 1;
1991
+ text-align: left;
1992
+ cursor: pointer;
1993
+ box-sizing: border-box;
1994
+ transition: border-color 0.2s;
1995
+ }
1996
+
1997
+ .ew-select__trigger:focus {
1998
+ outline: none;
1999
+ border-color: var(--ewcp-color-primary, #4096ef);
2000
+ }
2001
+
2002
+ .ew-select--open .ew-select__trigger {
2003
+ border-color: var(--ewcp-color-primary, #4096ef);
2004
+ }
2005
+
2006
+ .ew-select__value {
2007
+ flex: 1;
2008
+ min-width: 0;
2009
+ overflow: hidden;
2010
+ text-overflow: ellipsis;
2011
+ white-space: nowrap;
2012
+ }
2013
+
2014
+ .ew-select__value--placeholder {
2015
+ color: var(--ewcp-color-text-tertiary, #999);
2016
+ }
2017
+
2018
+ /* 富内容(节点 / HTML):图标与文字水平居中对齐 */
2019
+ .ew-select__value--rich {
2020
+ display: inline-flex;
2021
+ align-items: center;
2022
+ gap: 6px;
2023
+ }
2024
+
2025
+ .ew-select__clear {
2026
+ display: inline-flex;
2027
+ align-items: center;
2028
+ justify-content: center;
2029
+ flex: 0 0 var(--select-clear-size, 12px);
2030
+ width: var(--select-clear-size, 12px);
2031
+ height: var(--select-clear-size, 12px);
2032
+ color: var(--ewcp-color-text-tertiary, #999);
2033
+ border-radius: 50%;
2034
+ cursor: pointer;
2035
+ transition: color 0.15s;
2036
+ }
2037
+
2038
+ .ew-select__clear:hover {
2039
+ color: var(--ewcp-color-text-secondary, #666);
2040
+ }
2041
+
2042
+ .ew-select__clear--hidden {
2043
+ display: none;
2044
+ }
2045
+
2046
+ .ew-select__clear-icon {
2047
+ display: block;
2048
+ width: var(--select-clear-size, 12px);
2049
+ height: var(--select-clear-size, 12px);
2050
+ pointer-events: none;
2051
+ }
2052
+
2053
+ .ew-select__arrow {
2054
+ display: flex;
2055
+ align-items: center;
2056
+ justify-content: center;
2057
+ flex: 0 0 var(--select-arrow-size, 12px);
2058
+ width: var(--select-arrow-size, 12px);
2059
+ height: var(--select-arrow-size, 12px);
2060
+ color: var(--ewcp-color-text-tertiary, #999);
2061
+ transition: transform 0.2s;
2062
+ }
2063
+
2064
+ .ew-select--open .ew-select__arrow {
2065
+ transform: rotate(180deg);
2066
+ }
2067
+
2068
+ .ew-select__arrow-icon {
2069
+ display: block;
2070
+ width: var(--select-arrow-size, 12px);
2071
+ height: var(--select-arrow-size, 12px);
2072
+ pointer-events: none;
2073
+ }
2074
+
2075
+ .ew-select__dropdown {
2076
+ position: absolute;
2077
+ top: calc(100% + 4px);
2078
+ left: 0;
2079
+ right: 0;
2080
+ z-index: var(--ewcp-z-popper, 3);
2081
+ display: none;
2082
+ max-height: 200px;
2083
+ overflow-y: auto;
2084
+ padding: 4px;
2085
+ border: 1px solid var(--ewcp-color-border-light, #e5e6eb);
2086
+ border-radius: 8px;
2087
+ background: var(--ewcp-color-bg, #fff);
2088
+ box-shadow: var(--ewcp-shadow-popper, 0 4px 16px rgba(0, 0, 0, 0.12));
2089
+ box-sizing: border-box;
2090
+ }
2091
+
2092
+ .ew-select--open .ew-select__dropdown {
2093
+ display: block;
2094
+ }
2095
+
2096
+ .ew-select__dropdown--open {
2097
+ display: block;
2098
+ }
2099
+
2100
+ .ew-select__empty,
2101
+ .ew-select__loading {
2102
+ padding: 8px 10px;
2103
+ color: var(--ewcp-color-text-tertiary, #999);
2104
+ font-size: 13px;
2105
+ text-align: center;
2106
+ }
2107
+
2108
+ .ew-select__option {
2109
+ padding: 6px 10px;
2110
+ border-radius: 6px;
2111
+ color: var(--ewcp-color-text, #333);
2112
+ font-size: 13px;
2113
+ line-height: 20px;
2114
+ white-space: nowrap;
2115
+ overflow: hidden;
2116
+ text-overflow: ellipsis;
2117
+ cursor: pointer;
2118
+ transition: background 0.15s;
2119
+ }
2120
+
2121
+ .ew-select__option--rich {
2122
+ display: flex;
2123
+ align-items: center;
2124
+ gap: 6px;
2125
+ text-overflow: clip;
2126
+ }
2127
+
2128
+ .ew-select__option:hover,
2129
+ .ew-select__option--active {
2130
+ background: var(--ewcp-color-bg-hover, #f0f8ff);
2131
+ }
2132
+
2133
+ .ew-select__option--selected {
2134
+ color: var(--ewcp-color-primary, #4096ef);
2135
+ font-weight: 500;
2136
+ }
2137
+
2138
+ .ew-select__option--disabled {
2139
+ color: var(--ewcp-color-text-disabled, #ccc);
2140
+ background: transparent;
2141
+ cursor: not-allowed;
2142
+ }
2143
+
2144
+ .ew-select--disabled {
2145
+ cursor: not-allowed;
2146
+ }
2147
+
2148
+ .ew-select--disabled .ew-select__trigger {
2149
+ border-color: var(--ewcp-color-border-light, #e5e6eb);
2150
+ background: var(--ewcp-color-bg-disabled, #f7f8fa);
2151
+ color: var(--ewcp-color-text-disabled, #ccc);
2152
+ cursor: not-allowed;
2153
+ }
2154
+
2155
+ .ew-select--small .ew-select__trigger {
2156
+ height: 24px;
2157
+ padding: 0 8px;
2158
+ font-size: 12px;
2159
+ border-radius: 6px;
2160
+ }
2161
+
2162
+ .ew-select--small .ew-select__option {
2163
+ padding: 4px 8px;
2164
+ font-size: 12px;
2165
+ }
2166
+
2167
+ .ew-select--large .ew-select__trigger {
2168
+ height: 40px;
2169
+ padding: 0 12px;
2170
+ font-size: 15px;
2171
+ }
2172
+
2173
+ .ew-select--large .ew-select__option {
2174
+ padding: 8px 12px;
2175
+ font-size: 14px;
2176
+ }
2177
+
2178
+ .ew-checkbox {
2179
+ position: relative;
2180
+ display: inline-flex;
2181
+ align-items: center;
2182
+ gap: var(--checkbox-gap, 6px);
2183
+ color: var(--ewcp-color-text-secondary, #666);
2184
+ font-family: inherit;
2185
+ font-size: var(--checkbox-font-size, 12px);
2186
+ line-height: 1;
2187
+ white-space: nowrap;
2188
+ cursor: pointer;
2189
+ user-select: none;
2190
+ box-sizing: border-box;
2191
+ }
2192
+
2193
+ /* 标签支持插入图标等节点,与文字水平居中对齐 */
2194
+ .ew-checkbox__label {
2195
+ display: inline-flex;
2196
+ align-items: center;
2197
+ gap: var(--checkbox-gap, 6px);
2198
+ }
2199
+
2200
+ .ew-checkbox__input {
2201
+ position: absolute;
2202
+ width: 1px;
2203
+ height: 1px;
2204
+ margin: -1px;
2205
+ padding: 0;
2206
+ overflow: hidden;
2207
+ clip: rect(0 0 0 0);
2208
+ white-space: nowrap;
2209
+ border: 0;
2210
+ opacity: 0;
2211
+ }
2212
+
2213
+ .ew-checkbox__box {
2214
+ position: relative;
2215
+ display: inline-flex;
2216
+ align-items: center;
2217
+ justify-content: center;
2218
+ flex: 0 0 var(--checkbox-box-size, 16px);
2219
+ width: var(--checkbox-box-size, 16px);
2220
+ height: var(--checkbox-box-size, 16px);
2221
+ border: var(--checkbox-border-width, 1.5px) solid var(--ewcp-color-checkbox-border, #d9d9d9);
2222
+ border-radius: var(--checkbox-box-radius, 4px);
2223
+ background: var(--ewcp-color-bg, #fff);
2224
+ box-sizing: border-box;
2225
+ transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
2226
+ }
2227
+
2228
+ .ew-checkbox__check-icon {
2229
+ display: block;
2230
+ width: var(--checkbox-icon-size, 10px);
2231
+ height: var(--checkbox-icon-size, 10px);
2232
+ color: var(--ewcp-color-bg, #fff);
2233
+ opacity: 0;
2234
+ pointer-events: none;
2235
+ transition: opacity 0.15s;
2236
+ }
2237
+
2238
+ .ew-checkbox__input:checked + .ew-checkbox__box {
2239
+ border-color: var(--ewcp-color-primary, #4096ef);
2240
+ background: var(--ewcp-color-primary, #4096ef);
2241
+ }
2242
+
2243
+ .ew-checkbox__input:checked + .ew-checkbox__box .ew-checkbox__check-icon {
2244
+ opacity: 1;
2245
+ }
2246
+
2247
+ .ew-checkbox__input:focus-visible + .ew-checkbox__box {
2248
+ box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.18);
2249
+ }
2250
+
2251
+ .ew-checkbox--indeterminate .ew-checkbox__box {
2252
+ border-color: var(--ewcp-color-primary, #4096ef);
2253
+ background: var(--ewcp-color-primary, #4096ef);
2254
+ }
2255
+
2256
+ .ew-checkbox__indeterminate-icon {
2257
+ display: block;
2258
+ width: var(--checkbox-icon-size, 10px);
2259
+ height: var(--checkbox-icon-size, 10px);
2260
+ color: var(--ewcp-color-bg, #fff);
2261
+ pointer-events: none;
2262
+ }
2263
+
2264
+ .ew-checkbox--disabled {
2265
+ color: var(--ewcp-color-text-disabled, #ccc);
2266
+ cursor: not-allowed;
2267
+ }
2268
+
2269
+ .ew-checkbox--disabled .ew-checkbox__box {
2270
+ border-color: var(--ewcp-color-border-light, #e5e6eb);
2271
+ background: var(--ewcp-color-checkbox-disabled-bg, #f7f8fa);
2272
+ }
2273
+
2274
+ .ew-checkbox--disabled .ew-checkbox__input:checked + .ew-checkbox__box {
2275
+ border-color: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
2276
+ background: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
2277
+ }
2278
+
2279
+ .ew-checkbox--disabled.ew-checkbox--indeterminate .ew-checkbox__box {
2280
+ border-color: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
2281
+ background: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
2282
+ }
2283
+
2284
+ .ew-checkbox--small {
2285
+ gap: 4px;
2286
+ font-size: 12px;
2287
+ }
2288
+
2289
+ .ew-checkbox--small .ew-checkbox__box {
2290
+ flex: 0 0 14px;
2291
+ width: 14px;
2292
+ height: 14px;
2293
+ border-radius: 3px;
2294
+ }
2295
+
2296
+ .ew-checkbox--small .ew-checkbox__check-icon {
2297
+ width: 9px;
2298
+ height: 9px;
2299
+ }
2300
+
2301
+ .ew-checkbox--large {
2302
+ gap: 8px;
2303
+ font-size: 14px;
2304
+ }
2305
+
2306
+ .ew-checkbox--large .ew-checkbox__box {
2307
+ flex: 0 0 18px;
2308
+ width: 18px;
2309
+ height: 18px;
2310
+ }
2311
+
2312
+ .ew-checkbox--large .ew-checkbox__check-icon {
2313
+ width: 12px;
2314
+ height: 12px;
2315
+ }
2316
+
2317
+ .ew-tooltip {
2318
+ position: fixed;
2319
+ z-index: var(--ewcp-z-tooltip, 3000);
2320
+ box-sizing: border-box;
2321
+ max-width: var(--ew-tooltip-max-width, none);
2322
+ padding: 5px 10px;
2323
+ border-radius: 4px;
2324
+ font-family: inherit;
2325
+ font-size: 12px;
2326
+ line-height: 1.4;
2327
+ text-align: left;
2328
+ word-break: break-word;
2329
+ pointer-events: none;
2330
+ opacity: 0;
2331
+ visibility: hidden;
2332
+ transition: opacity 0.2s ease, visibility 0.2s ease;
2333
+ }
2334
+
2335
+ .ew-tooltip--dark {
2336
+ --ew-tooltip-bg: #303133;
2337
+ --ew-tooltip-color: #fff;
2338
+ --ew-tooltip-border-color: transparent;
2339
+ --ew-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
2340
+ }
2341
+
2342
+ .ew-tooltip--light {
2343
+ --ew-tooltip-bg: var(--ewcp-color-bg, #fff);
2344
+ --ew-tooltip-color: var(--ewcp-color-text, #303133);
2345
+ --ew-tooltip-border-color: var(--ewcp-color-border-light, #e4e7ed);
2346
+ --ew-tooltip-shadow: var(--ewcp-shadow-popper, 0 2px 12px rgba(0, 0, 0, 0.1));
2347
+ }
2348
+
2349
+ @media (prefers-reduced-motion: reduce) {
2350
+ .ew-tooltip {
2351
+ transition: none;
2352
+ }
2353
+ }
2354
+ .ew-tooltip--dark,
2355
+ .ew-tooltip--light {
2356
+ background: var(--ew-tooltip-bg);
2357
+ color: var(--ew-tooltip-color);
2358
+ border: 1px solid var(--ew-tooltip-border-color);
2359
+ box-shadow: var(--ew-tooltip-shadow);
2360
+ }
2361
+
2362
+ .ew-tooltip--visible {
2363
+ opacity: 1;
2364
+ visibility: visible;
2365
+ }
2366
+
2367
+ .ew-tooltip--enterable {
2368
+ pointer-events: auto;
2369
+ }
2370
+
2371
+ .ew-tooltip__content {
2372
+ display: block;
2373
+ }
2374
+
2375
+ .ew-tooltip__arrow {
2376
+ position: absolute;
2377
+ width: 8px;
2378
+ height: 8px;
2379
+ box-sizing: border-box;
2380
+ background: inherit;
2381
+ border: 1px solid transparent;
2382
+ border-color: transparent;
2383
+ transform: rotate(45deg);
2384
+ pointer-events: none;
2385
+ z-index: -1;
2386
+ }
2387
+
2388
+ .ew-tooltip[data-placement^=top] .ew-tooltip__arrow {
2389
+ border-right-color: var(--ew-tooltip-border-color);
2390
+ border-bottom-color: var(--ew-tooltip-border-color);
2391
+ }
2392
+
2393
+ .ew-tooltip[data-placement^=bottom] .ew-tooltip__arrow {
2394
+ border-left-color: var(--ew-tooltip-border-color);
2395
+ border-top-color: var(--ew-tooltip-border-color);
2396
+ }
2397
+
2398
+ .ew-tooltip[data-placement^=left] .ew-tooltip__arrow {
2399
+ border-top-color: var(--ew-tooltip-border-color);
2400
+ border-right-color: var(--ew-tooltip-border-color);
2401
+ }
2402
+
2403
+ .ew-tooltip[data-placement^=right] .ew-tooltip__arrow {
2404
+ border-left-color: var(--ew-tooltip-border-color);
2405
+ border-bottom-color: var(--ew-tooltip-border-color);
2406
+ }
2407
+
2408
+ .ew-input {
2409
+ width: 100%;
2410
+ height: 32px;
2411
+ padding: 0 11px;
2412
+ box-sizing: border-box;
2413
+ border: 1px solid var(--ewcp-color-border, #dcdfe6);
2414
+ border-radius: var(--input-radius, 4px);
2415
+ background: var(--ewcp-color-bg, #fff);
2416
+ color: var(--ewcp-color-text, #303133);
2417
+ font-family: inherit;
2418
+ font-size: 14px;
2419
+ line-height: 1.5;
2420
+ outline: none;
2421
+ transition: border-color 0.2s, box-shadow 0.2s;
2422
+ }
2423
+
2424
+ .ew-input:hover {
2425
+ border-color: var(--ewcp-color-border-hover, #c0c4cc);
2426
+ }
2427
+
2428
+ .ew-input:focus {
2429
+ border-color: var(--ewcp-color-primary, #4096ef);
2430
+ box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.12);
2431
+ }
2432
+
2433
+ .ew-input::placeholder {
2434
+ color: var(--ewcp-color-text-tertiary, #a8abb2);
2435
+ }
2436
+
2437
+ .ew-input--small {
2438
+ height: 28px;
2439
+ padding: 0 9px;
2440
+ font-size: 12px;
2441
+ }
2442
+
2443
+ .ew-input--large {
2444
+ height: 36px;
2445
+ padding: 0 13px;
2446
+ font-size: 14px;
2447
+ }
2448
+
2449
+ .ew-input:disabled,
2450
+ .ew-input--disabled {
2451
+ border-color: var(--ewcp-color-border-light, #e4e7ed);
2452
+ background: var(--ewcp-color-bg-disabled, #f5f7fa);
2453
+ color: var(--ewcp-color-border-hover, #c0c4cc);
2454
+ cursor: not-allowed;
2455
+ }
2456
+
2457
+ .ew-input--readonly {
2458
+ background: var(--ewcp-color-bg-secondary, #fafafa);
2459
+ cursor: default;
2460
+ }
2461
+
2462
+ .ew-input-wrapper {
2463
+ position: relative;
2464
+ display: inline-flex;
2465
+ align-items: center;
2466
+ width: 100%;
2467
+ }
2468
+
2469
+ .ew-input-wrapper > .ew-input {
2470
+ padding-right: 30px;
2471
+ }
2472
+
2473
+ .ew-input__clear {
2474
+ position: absolute;
2475
+ right: 8px;
2476
+ display: inline-flex;
2477
+ align-items: center;
2478
+ justify-content: center;
2479
+ width: 16px;
2480
+ height: 16px;
2481
+ padding: 0;
2482
+ border: 0;
2483
+ border-radius: 50%;
2484
+ background: var(--ewcp-color-border-hover, #c0c4cc);
2485
+ color: var(--ewcp-color-bg, #fff);
2486
+ cursor: pointer;
2487
+ }
2488
+
2489
+ .ew-input__clear:hover {
2490
+ background: var(--ewcp-color-info, #909399);
2491
+ }
2492
+
2493
+ .ew-input__clear--hidden {
2494
+ display: none;
2495
+ }
2496
+
2497
+ .ew-input__clear-icon {
2498
+ display: block;
2499
+ width: 10px;
2500
+ height: 10px;
2501
+ }
2502
+
2503
+ .ew-button {
2504
+ display: inline-flex;
2505
+ align-items: center;
2506
+ justify-content: center;
2507
+ gap: 6px;
2508
+ height: 32px;
2509
+ padding: 0 15px;
2510
+ box-sizing: border-box;
2511
+ border: 1px solid var(--ewcp-color-border, #dcdfe6);
2512
+ border-radius: var(--btn-radius, 4px);
2513
+ background: var(--ewcp-color-bg, #fff);
2514
+ color: var(--ewcp-color-text-secondary, #606266);
2515
+ font-family: inherit;
2516
+ font-size: 14px;
2517
+ line-height: 1;
2518
+ white-space: nowrap;
2519
+ cursor: pointer;
2520
+ outline: none;
2521
+ transition: color 0.2s, border-color 0.2s, background-color 0.2s;
2522
+ }
2523
+
2524
+ .ew-button:hover {
2525
+ border-color: var(--ewcp-color-primary, #4096ef);
2526
+ color: var(--ewcp-color-primary, #4096ef);
2527
+ }
2528
+
2529
+ .ew-button--primary {
2530
+ border-color: var(--ewcp-color-primary, #4096ef);
2531
+ background: var(--ewcp-color-primary, #4096ef);
2532
+ color: var(--ewcp-color-bg, #fff);
2533
+ }
2534
+
2535
+ .ew-button--primary:hover {
2536
+ border-color: var(--ewcp-color-primary-hover, #66b1ff);
2537
+ background: var(--ewcp-color-primary-hover, #66b1ff);
2538
+ color: var(--ewcp-color-bg, #fff);
2539
+ }
2540
+
2541
+ .ew-button--danger {
2542
+ border-color: var(--ewcp-color-danger, #f56c6c);
2543
+ background: var(--ewcp-color-danger, #f56c6c);
2544
+ color: var(--ewcp-color-bg, #fff);
2545
+ }
2546
+
2547
+ .ew-button--danger:hover {
2548
+ border-color: #f78989;
2549
+ background: #f78989;
2550
+ color: var(--ewcp-color-bg, #fff);
2551
+ }
2552
+
2553
+ .ew-button--text {
2554
+ border-color: transparent;
2555
+ background: transparent;
2556
+ color: var(--ewcp-color-primary, #4096ef);
2557
+ }
2558
+
2559
+ .ew-button--text:hover {
2560
+ border-color: transparent;
2561
+ background: transparent;
2562
+ color: var(--ewcp-color-primary-hover, #66b1ff);
2563
+ }
2564
+
2565
+ .ew-button--ghost {
2566
+ border-color: var(--ewcp-color-primary, #4096ef);
2567
+ background: transparent;
2568
+ color: var(--ewcp-color-primary, #4096ef);
2569
+ }
2570
+
2571
+ .ew-button--ghost:hover {
2572
+ border-color: var(--ewcp-color-primary, #4096ef);
2573
+ background: rgba(64, 150, 239, 0.08);
2574
+ color: var(--ewcp-color-primary, #4096ef);
2575
+ }
2576
+
2577
+ .ew-button--link {
2578
+ border-color: transparent;
2579
+ background: transparent;
2580
+ color: var(--ewcp-color-primary, #4096ef);
2581
+ text-decoration: none;
2582
+ }
2583
+
2584
+ .ew-button--link:hover {
2585
+ border-color: transparent;
2586
+ background: transparent;
2587
+ color: var(--ewcp-color-primary-hover, #66b1ff);
2588
+ text-decoration: underline;
2589
+ }
2590
+
2591
+ a.ew-button {
2592
+ text-decoration: none;
2593
+ }
2594
+
2595
+ a.ew-button--disabled {
2596
+ pointer-events: none;
2597
+ }
2598
+
2599
+ .ew-button--small {
2600
+ height: 28px;
2601
+ padding: 0 11px;
2602
+ font-size: 12px;
2603
+ }
2604
+
2605
+ .ew-button--large {
2606
+ height: 36px;
2607
+ padding: 0 19px;
2608
+ font-size: 14px;
2609
+ }
2610
+
2611
+ .ew-button--block {
2612
+ display: flex;
2613
+ width: 100%;
2614
+ }
2615
+
2616
+ .ew-button:disabled,
2617
+ .ew-button--disabled {
2618
+ border-color: var(--ewcp-color-border-light, #e4e7ed);
2619
+ background: var(--ewcp-color-bg-disabled, #f5f7fa);
2620
+ color: var(--ewcp-color-text-disabled, #c0c4cc);
2621
+ cursor: not-allowed;
2622
+ }
2623
+
2624
+ .ew-button--primary:disabled,
2625
+ .ew-button--danger:disabled {
2626
+ border-color: #a0cfff;
2627
+ background: #a0cfff;
2628
+ color: var(--ewcp-color-bg, #fff);
2629
+ }