@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/src/select.scss CHANGED
@@ -19,10 +19,10 @@ $prefix: "ew-" !default;
19
19
  width: 100%;
20
20
  height: var(--select-height, 32px);
21
21
  padding: var(--select-padding, 0 10px);
22
- border: var(--select-border-width, 1.5px) solid #d9d9d9;
22
+ border: var(--select-border-width, 1.5px) solid var(--ewcp-color-border, #d9d9d9);
23
23
  border-radius: var(--select-radius, 8px);
24
- background: #fff;
25
- color: #222;
24
+ background: var(--ewcp-color-bg, #fff);
25
+ color: var(--ewcp-color-text, #222);
26
26
  font-family: inherit;
27
27
  font-size: var(--select-font-size, 14px);
28
28
  line-height: 1;
@@ -34,11 +34,11 @@ $prefix: "ew-" !default;
34
34
 
35
35
  .#{$prefix}select__trigger:focus {
36
36
  outline: none;
37
- border-color: #4096ef;
37
+ border-color: var(--ewcp-color-primary, #4096ef);
38
38
  }
39
39
 
40
40
  .#{$prefix}select--open .#{$prefix}select__trigger {
41
- border-color: #4096ef;
41
+ border-color: var(--ewcp-color-primary, #4096ef);
42
42
  }
43
43
 
44
44
  .#{$prefix}select__value {
@@ -50,7 +50,14 @@ $prefix: "ew-" !default;
50
50
  }
51
51
 
52
52
  .#{$prefix}select__value--placeholder {
53
- color: #999;
53
+ color: var(--ewcp-color-text-tertiary, #999);
54
+ }
55
+
56
+ /* 富内容(节点 / HTML):图标与文字水平居中对齐 */
57
+ .#{$prefix}select__value--rich {
58
+ display: inline-flex;
59
+ align-items: center;
60
+ gap: 6px;
54
61
  }
55
62
 
56
63
  .#{$prefix}select__clear {
@@ -60,14 +67,14 @@ $prefix: "ew-" !default;
60
67
  flex: 0 0 var(--select-clear-size, 12px);
61
68
  width: var(--select-clear-size, 12px);
62
69
  height: var(--select-clear-size, 12px);
63
- color: #999;
70
+ color: var(--ewcp-color-text-tertiary, #999);
64
71
  border-radius: 50%;
65
72
  cursor: pointer;
66
73
  transition: color 0.15s;
67
74
  }
68
75
 
69
76
  .#{$prefix}select__clear:hover {
70
- color: #666;
77
+ color: var(--ewcp-color-text-secondary, #666);
71
78
  }
72
79
 
73
80
  .#{$prefix}select__clear--hidden {
@@ -88,7 +95,7 @@ $prefix: "ew-" !default;
88
95
  flex: 0 0 var(--select-arrow-size, 12px);
89
96
  width: var(--select-arrow-size, 12px);
90
97
  height: var(--select-arrow-size, 12px);
91
- color: #999;
98
+ color: var(--ewcp-color-text-tertiary, #999);
92
99
  transition: transform 0.2s;
93
100
  }
94
101
 
@@ -108,15 +115,15 @@ $prefix: "ew-" !default;
108
115
  top: calc(100% + 4px);
109
116
  left: 0;
110
117
  right: 0;
111
- z-index: 3;
118
+ z-index: var(--ewcp-z-popper, 3);
112
119
  display: none;
113
120
  max-height: 200px;
114
121
  overflow-y: auto;
115
122
  padding: 4px;
116
- border: 1px solid #e5e6eb;
123
+ border: 1px solid var(--ewcp-color-border-light, #e5e6eb);
117
124
  border-radius: 8px;
118
- background: #fff;
119
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
125
+ background: var(--ewcp-color-bg, #fff);
126
+ box-shadow: var(--ewcp-shadow-popper, 0 4px 16px rgba(0, 0, 0, 0.12));
120
127
  box-sizing: border-box;
121
128
  }
122
129
 
@@ -124,10 +131,23 @@ $prefix: "ew-" !default;
124
131
  display: block;
125
132
  }
126
133
 
134
+ // appendTo 到外部容器后,靠自身类名控制显隐
135
+ .#{$prefix}select__dropdown--open {
136
+ display: block;
137
+ }
138
+
139
+ .#{$prefix}select__empty,
140
+ .#{$prefix}select__loading {
141
+ padding: 8px 10px;
142
+ color: var(--ewcp-color-text-tertiary, #999);
143
+ font-size: 13px;
144
+ text-align: center;
145
+ }
146
+
127
147
  .#{$prefix}select__option {
128
148
  padding: 6px 10px;
129
149
  border-radius: 6px;
130
- color: #333;
150
+ color: var(--ewcp-color-text, #333);
131
151
  font-size: 13px;
132
152
  line-height: 20px;
133
153
  white-space: nowrap;
@@ -137,18 +157,25 @@ $prefix: "ew-" !default;
137
157
  transition: background 0.15s;
138
158
  }
139
159
 
160
+ .#{$prefix}select__option--rich {
161
+ display: flex;
162
+ align-items: center;
163
+ gap: 6px;
164
+ text-overflow: clip;
165
+ }
166
+
140
167
  .#{$prefix}select__option:hover,
141
168
  .#{$prefix}select__option--active {
142
- background: #f0f8ff;
169
+ background: var(--ewcp-color-bg-hover, #f0f8ff);
143
170
  }
144
171
 
145
172
  .#{$prefix}select__option--selected {
146
- color: #4096ef;
173
+ color: var(--ewcp-color-primary, #4096ef);
147
174
  font-weight: 500;
148
175
  }
149
176
 
150
177
  .#{$prefix}select__option--disabled {
151
- color: #ccc;
178
+ color: var(--ewcp-color-text-disabled, #ccc);
152
179
  background: transparent;
153
180
  cursor: not-allowed;
154
181
  }
@@ -158,9 +185,9 @@ $prefix: "ew-" !default;
158
185
  }
159
186
 
160
187
  .#{$prefix}select--disabled .#{$prefix}select__trigger {
161
- border-color: #e5e6eb;
162
- background: #f7f8fa;
163
- color: #ccc;
188
+ border-color: var(--ewcp-color-border-light, #e5e6eb);
189
+ background: var(--ewcp-color-bg-disabled, #f7f8fa);
190
+ color: var(--ewcp-color-text-disabled, #ccc);
164
191
  cursor: not-allowed;
165
192
  }
166
193
 
package/src/tooltip.scss CHANGED
@@ -5,7 +5,7 @@ $prefix: "ew-" !default;
5
5
  // 悬浮提示(供 Select / Checkbox / Gradient 等复用,能力对齐 el-tooltip)
6
6
  .#{$prefix}tooltip {
7
7
  position: fixed;
8
- z-index: 3000;
8
+ z-index: var(--ewcp-z-tooltip, 3000);
9
9
  box-sizing: border-box;
10
10
  max-width: var(--ew-tooltip-max-width, none);
11
11
  padding: 5px 10px;
@@ -31,10 +31,17 @@ $prefix: "ew-" !default;
31
31
 
32
32
  // 主题:light
33
33
  .#{$prefix}tooltip--light {
34
- --ew-tooltip-bg: #fff;
35
- --ew-tooltip-color: #303133;
36
- --ew-tooltip-border-color: #e4e7ed;
37
- --ew-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
34
+ --ew-tooltip-bg: var(--ewcp-color-bg, #fff);
35
+ --ew-tooltip-color: var(--ewcp-color-text, #303133);
36
+ --ew-tooltip-border-color: var(--ewcp-color-border-light, #e4e7ed);
37
+ --ew-tooltip-shadow: var(--ewcp-shadow-popper, 0 2px 12px rgba(0, 0, 0, 0.1));
38
+ }
39
+
40
+ // 减少动态效果
41
+ @media (prefers-reduced-motion: reduce) {
42
+ .#{$prefix}tooltip {
43
+ transition: none;
44
+ }
38
45
  }
39
46
 
40
47
  .#{$prefix}tooltip--dark,