@ew-color-picker/style 2.0.12 → 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 +2415 -0
- package/dist/all.min.css +1 -0
- package/dist/button.css +1 -0
- package/dist/button.min.css +1 -1
- package/dist/checkbox.css +8 -0
- package/dist/checkbox.min.css +1 -1
- package/dist/index.css +7 -0
- package/dist/index.min.css +1 -1
- package/dist/input-number.css +232 -0
- package/dist/input-number.min.css +1 -1
- package/dist/select.css +15 -0
- package/dist/select.min.css +1 -1
- package/package.json +1 -1
- package/src/all.scss +10 -0
- package/src/button.scss +1 -0
- package/src/checkbox.scss +7 -0
- package/src/index.scss +7 -0
- package/src/input-number.scss +217 -0
- package/src/select.scss +14 -0
package/package.json
CHANGED
package/src/all.scss
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// 聚合样式入口:一次引入核心与全部插件/组件样式。
|
|
2
|
+
// 适合「不想逐个确认依赖」的场景(例如 select 需要同时引入 tooltip 样式);
|
|
3
|
+
// 只想按需加载时仍可单独引入 index.css、select.css 等。
|
|
4
|
+
@import './index.scss';
|
|
5
|
+
@import './input-number.scss';
|
|
6
|
+
@import './select.scss';
|
|
7
|
+
@import './checkbox.scss';
|
|
8
|
+
@import './tooltip.scss';
|
|
9
|
+
@import './input.scss';
|
|
10
|
+
@import './button.scss';
|
package/src/button.scss
CHANGED
package/src/checkbox.scss
CHANGED
|
@@ -17,6 +17,13 @@ $prefix: "ew-" !default;
|
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/* 标签支持插入图标等节点,与文字水平居中对齐 */
|
|
21
|
+
.#{$prefix}checkbox__label {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--checkbox-gap, 6px);
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
// 原生 input 只保留语义与键盘能力,视觉交给自定义方块
|
|
21
28
|
.#{$prefix}checkbox__input {
|
|
22
29
|
position: absolute;
|
package/src/index.scss
CHANGED
|
@@ -516,6 +516,10 @@ $prefix: "ew-" !default;
|
|
|
516
516
|
|
|
517
517
|
// 按钮
|
|
518
518
|
.#{$prefix}color-picker-drop-btn {
|
|
519
|
+
display: inline-flex;
|
|
520
|
+
align-items: center;
|
|
521
|
+
justify-content: center;
|
|
522
|
+
gap: 4px;
|
|
519
523
|
padding: var(--btn-padding);
|
|
520
524
|
font-size: var(--btn-font-size);
|
|
521
525
|
border-radius: var(--btn-radius);
|
|
@@ -1083,6 +1087,9 @@ $prefix: "ew-" !default;
|
|
|
1083
1087
|
// 复制成功提示气泡
|
|
1084
1088
|
.#{$prefix}color-picker-copy-tip {
|
|
1085
1089
|
position: absolute;
|
|
1090
|
+
display: inline-flex;
|
|
1091
|
+
align-items: center;
|
|
1092
|
+
gap: 4px;
|
|
1086
1093
|
left: calc(100% + 8px);
|
|
1087
1094
|
top: 50%;
|
|
1088
1095
|
padding: 3px 8px;
|
package/src/input-number.scss
CHANGED
|
@@ -75,3 +75,220 @@ $prefix: "ew-" !default;
|
|
|
75
75
|
margin: 0 auto;
|
|
76
76
|
pointer-events: none;
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
/* 横向步进:− 值 + 单行 */
|
|
80
|
+
.#{$prefix}input-number--horizontal {
|
|
81
|
+
border-radius: var(--input-number-radius, 10px);
|
|
82
|
+
}
|
|
83
|
+
.#{$prefix}input-number--horizontal:focus-within {
|
|
84
|
+
border-color: #1677ff;
|
|
85
|
+
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
|
|
86
|
+
}
|
|
87
|
+
.#{$prefix}input-number--horizontal .#{$prefix}input-number__button {
|
|
88
|
+
width: var(--input-number-buttons-width, 32px);
|
|
89
|
+
height: 100%;
|
|
90
|
+
flex: 0 0 auto;
|
|
91
|
+
}
|
|
92
|
+
.#{$prefix}input-number--horizontal .#{$prefix}input-number__button:hover {
|
|
93
|
+
background: #f5f5f5;
|
|
94
|
+
color: #1677ff;
|
|
95
|
+
}
|
|
96
|
+
.#{$prefix}input-number--horizontal .#{$prefix}input-number__button--down {
|
|
97
|
+
border-right: 1px solid #e5e6eb;
|
|
98
|
+
border-bottom: none;
|
|
99
|
+
}
|
|
100
|
+
.#{$prefix}input-number--horizontal .#{$prefix}input-number__button--up {
|
|
101
|
+
border-left: 1px solid #e5e6eb;
|
|
102
|
+
border-bottom: none;
|
|
103
|
+
}
|
|
104
|
+
.#{$prefix}input-number--horizontal .#{$prefix}input-number__icon {
|
|
105
|
+
width: 12px;
|
|
106
|
+
height: 12px;
|
|
107
|
+
flex-basis: 12px;
|
|
108
|
+
}
|
|
109
|
+
.#{$prefix}input-number--horizontal .#{$prefix}input-number__input {
|
|
110
|
+
text-align: center;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 尺寸 */
|
|
114
|
+
.#{$prefix}input-number--small {
|
|
115
|
+
height: var(--input-number-height-sm, 28px);
|
|
116
|
+
}
|
|
117
|
+
.#{$prefix}input-number--large {
|
|
118
|
+
height: var(--input-number-height-lg, 38px);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* 内前缀 / 内后缀 */
|
|
122
|
+
.#{$prefix}input-number__prefix,
|
|
123
|
+
.#{$prefix}input-number__suffix {
|
|
124
|
+
display: inline-flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
gap: 4px;
|
|
127
|
+
flex: 0 0 auto;
|
|
128
|
+
color: #999;
|
|
129
|
+
font-size: var(--input-number-input-font-size, 13px);
|
|
130
|
+
white-space: nowrap;
|
|
131
|
+
}
|
|
132
|
+
.#{$prefix}input-number__prefix {
|
|
133
|
+
padding-left: 8px;
|
|
134
|
+
}
|
|
135
|
+
.#{$prefix}input-number__suffix {
|
|
136
|
+
padding-right: 8px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* 外置前后缀 */
|
|
140
|
+
.#{$prefix}input-number__addon {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: 4px;
|
|
144
|
+
flex: 0 0 auto;
|
|
145
|
+
padding: 0 8px;
|
|
146
|
+
background: #fafafa;
|
|
147
|
+
color: #666;
|
|
148
|
+
font-size: var(--input-number-input-font-size, 13px);
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
}
|
|
151
|
+
.#{$prefix}input-number__addon--before {
|
|
152
|
+
border-right: 1px solid #e5e6eb;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* 清除按钮 */
|
|
156
|
+
.#{$prefix}input-number__clear {
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
flex: 0 0 auto;
|
|
161
|
+
/* 根节点为 stretch,固定高度的清除按钮需单独居中,否则会贴顶 */
|
|
162
|
+
align-self: center;
|
|
163
|
+
width: 16px;
|
|
164
|
+
height: 16px;
|
|
165
|
+
margin: 0 6px 0 4px;
|
|
166
|
+
padding: 0;
|
|
167
|
+
border: none;
|
|
168
|
+
border-radius: 50%;
|
|
169
|
+
background: #c9cdd4;
|
|
170
|
+
color: #fff;
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
transition: background 0.2s, opacity 0.2s;
|
|
173
|
+
}
|
|
174
|
+
.#{$prefix}input-number__clear:hover {
|
|
175
|
+
background: #909399;
|
|
176
|
+
}
|
|
177
|
+
.#{$prefix}input-number__clear--hidden {
|
|
178
|
+
display: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* 变体 */
|
|
182
|
+
.#{$prefix}input-number--filled {
|
|
183
|
+
background: #f5f5f5;
|
|
184
|
+
border-color: transparent;
|
|
185
|
+
}
|
|
186
|
+
.#{$prefix}input-number--filled:focus-within {
|
|
187
|
+
background: #fff;
|
|
188
|
+
border-color: #4096ef;
|
|
189
|
+
}
|
|
190
|
+
.#{$prefix}input-number--borderless {
|
|
191
|
+
background: transparent;
|
|
192
|
+
border-color: transparent;
|
|
193
|
+
}
|
|
194
|
+
.#{$prefix}input-number--borderless:focus-within {
|
|
195
|
+
border-color: transparent;
|
|
196
|
+
}
|
|
197
|
+
.#{$prefix}input-number--underlined {
|
|
198
|
+
background: transparent;
|
|
199
|
+
border-width: 0 0 var(--input-number-border-width, 1.5px) 0;
|
|
200
|
+
border-radius: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* 状态 */
|
|
204
|
+
.#{$prefix}input-number--error,
|
|
205
|
+
.#{$prefix}input-number--error:focus-within {
|
|
206
|
+
border-color: #ff4d4f;
|
|
207
|
+
}
|
|
208
|
+
.#{$prefix}input-number--warning,
|
|
209
|
+
.#{$prefix}input-number--warning:focus-within {
|
|
210
|
+
border-color: #faad14;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* 只读 / 禁用 */
|
|
214
|
+
.#{$prefix}input-number--readonly,
|
|
215
|
+
.#{$prefix}input-number--disabled {
|
|
216
|
+
background: #f5f5f5;
|
|
217
|
+
cursor: not-allowed;
|
|
218
|
+
}
|
|
219
|
+
.#{$prefix}input-number--disabled .#{$prefix}input-number__input {
|
|
220
|
+
cursor: not-allowed;
|
|
221
|
+
color: #b0b3b8;
|
|
222
|
+
}
|
|
223
|
+
.#{$prefix}input-number__button:disabled {
|
|
224
|
+
cursor: not-allowed;
|
|
225
|
+
color: #c9cdd4;
|
|
226
|
+
background: transparent;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* 拨轮模式 */
|
|
230
|
+
$spinner-height: 84px !default;
|
|
231
|
+
$spinner-item-height: 28px !default;
|
|
232
|
+
.#{$prefix}input-number--spinner {
|
|
233
|
+
height: auto;
|
|
234
|
+
border: none;
|
|
235
|
+
background: transparent;
|
|
236
|
+
overflow: visible;
|
|
237
|
+
}
|
|
238
|
+
.#{$prefix}input-number__input--hidden {
|
|
239
|
+
display: none;
|
|
240
|
+
}
|
|
241
|
+
.#{$prefix}input-number__spinner {
|
|
242
|
+
position: relative;
|
|
243
|
+
width: 100%;
|
|
244
|
+
height: $spinner-height;
|
|
245
|
+
overflow: hidden;
|
|
246
|
+
-webkit-mask-image: linear-gradient(
|
|
247
|
+
to bottom,
|
|
248
|
+
transparent,
|
|
249
|
+
#000 28%,
|
|
250
|
+
#000 72%,
|
|
251
|
+
transparent
|
|
252
|
+
);
|
|
253
|
+
mask-image: linear-gradient(
|
|
254
|
+
to bottom,
|
|
255
|
+
transparent,
|
|
256
|
+
#000 28%,
|
|
257
|
+
#000 72%,
|
|
258
|
+
transparent
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
.#{$prefix}input-number__spinner-list {
|
|
262
|
+
height: 100%;
|
|
263
|
+
overflow-y: auto;
|
|
264
|
+
scroll-snap-type: y mandatory;
|
|
265
|
+
scrollbar-width: none;
|
|
266
|
+
}
|
|
267
|
+
/* 上下留白让首尾项也能滚动到正中,与 scrollTop = index * 行高 的算法对齐 */
|
|
268
|
+
.#{$prefix}input-number__spinner-list::before,
|
|
269
|
+
.#{$prefix}input-number__spinner-list::after {
|
|
270
|
+
content: "";
|
|
271
|
+
display: block;
|
|
272
|
+
height: calc((#{$spinner-height} - #{$spinner-item-height}) / 2);
|
|
273
|
+
}
|
|
274
|
+
.#{$prefix}input-number__spinner-list::-webkit-scrollbar {
|
|
275
|
+
display: none;
|
|
276
|
+
}
|
|
277
|
+
.#{$prefix}input-number__spinner-item {
|
|
278
|
+
height: $spinner-item-height;
|
|
279
|
+
line-height: $spinner-item-height;
|
|
280
|
+
text-align: center;
|
|
281
|
+
font-size: var(--input-number-input-font-size, 13px);
|
|
282
|
+
color: #999;
|
|
283
|
+
scroll-snap-align: center;
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
user-select: none;
|
|
286
|
+
transition: color 0.2s;
|
|
287
|
+
}
|
|
288
|
+
.#{$prefix}input-number__spinner-item:hover {
|
|
289
|
+
color: #4096ef;
|
|
290
|
+
}
|
|
291
|
+
.#{$prefix}input-number__spinner-item--active {
|
|
292
|
+
color: #222;
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
}
|
package/src/select.scss
CHANGED
|
@@ -53,6 +53,13 @@ $prefix: "ew-" !default;
|
|
|
53
53
|
color: #999;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/* 富内容(节点 / HTML):图标与文字水平居中对齐 */
|
|
57
|
+
.#{$prefix}select__value--rich {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 6px;
|
|
61
|
+
}
|
|
62
|
+
|
|
56
63
|
.#{$prefix}select__clear {
|
|
57
64
|
display: inline-flex;
|
|
58
65
|
align-items: center;
|
|
@@ -137,6 +144,13 @@ $prefix: "ew-" !default;
|
|
|
137
144
|
transition: background 0.15s;
|
|
138
145
|
}
|
|
139
146
|
|
|
147
|
+
.#{$prefix}select__option--rich {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: 6px;
|
|
151
|
+
text-overflow: clip;
|
|
152
|
+
}
|
|
153
|
+
|
|
140
154
|
.#{$prefix}select__option:hover,
|
|
141
155
|
.#{$prefix}select__option--active {
|
|
142
156
|
background: #f0f8ff;
|