@ew-color-picker/style 2.0.13 → 2.0.14

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