UNPKG

20.1 kBCSSView Raw
1
2.next-sr-only {
3 position: absolute;
4 width: 1px;
5 height: 1px;
6 padding: 0;
7 overflow: hidden;
8 clip: rect(0, 0, 0, 0);
9 white-space: nowrap;
10 border: 0;
11 top: 0;
12 margin: -1px; }
13
14.next-select {
15 box-sizing: border-box;
16 display: inline-block;
17 position: relative;
18 font-size: 0;
19 vertical-align: middle;
20 /* Select trigger */
21 /* 在搜索框未激活时,将 input 的 color 置为透明 */
22 /* ISSUE: 在 IE11 中,<input readonly/> 仍然会显示光标, 要隐藏掉 */
23 /*
24 &.next-no-search {
25 .next-select-trigger-search input {
26 color: $color-transparent;
27 }
28 }
29 */
30 /* 弹层 */
31 /* 全选按钮 */
32 /* -------------- IE polyfill -------------- */
33 /* 根据最新的数据,在中国,PC 端的 IE9 份额为 2%, */
34 /* 所以不应该因为 IE9 而不使用 flex,而是应该做降级 polyfill */
35 /* @see http://gs.statcounter.com/ */
36 /* IE10、IE11 虽然支持 flex,但还是会有各种各样奇奇怪怪的问题 */ }
37 .next-select *,
38 .next-select *:before,
39 .next-select *:after {
40 box-sizing: border-box; }
41 .next-select-trigger {
42 min-width: 100px;
43 outline: 0;
44 transition: all 100ms linear;
45 transition: all var(--motion-duration-immediately, 100ms) var(--motion-linear, linear); }
46 .next-select-trigger .next-input-label {
47 flex: 0 0 auto;
48 width: auto; }
49 .next-select-trigger .next-select-values {
50 display: block;
51 width: 100%;
52 flex: 1 1 0;
53 overflow: hidden; }
54 .next-select-trigger .next-select-values > em {
55 font-style: inherit; }
56 .next-select-trigger .next-select-values input {
57 padding-left: 0;
58 padding-right: 0; }
59 .next-select-trigger .next-input-control {
60 flex: 0 0 auto;
61 width: auto; }
62 .next-select-trigger .next-input-control > * {
63 display: inline-block;
64 width: auto; }
65 .next-select-trigger .next-input-control > .next-select-arrow {
66 padding-right: 0; }
67 .next-select-trigger .next-input.next-disabled em {
68 color: #CCCCCC;
69 color: var(--input-disabled-color, #CCCCCC); }
70 .next-select-trigger .next-input.next-disabled .next-select-arrow {
71 cursor: not-allowed; }
72 .next-select-trigger .next-select-clear {
73 display: none; }
74 .next-select-trigger.next-has-clear:hover .next-select-clear {
75 display: inline-block; }
76 .next-select-trigger.next-has-clear:hover .next-select-arrow {
77 display: none; }
78 .next-select .next-select-inner {
79 display: inline-flex;
80 align-items: center;
81 width: 100%;
82 min-width: 100px;
83 outline: 0;
84 color: #333333;
85 color: var(--select-color, #333333); }
86 .next-select .next-select-inner .next-tag {
87 line-height: 1;
88 margin-right: 4px;
89 margin-right: var(--select-tag-spacing-lr, 4px);
90 margin-bottom: 3px;
91 margin-bottom: var(--select-tag-spacing-tb, 3px);
92 padding-left: 0px;
93 padding-left: var(--select-tag-padding-lr, 0px);
94 padding-right: 0px;
95 padding-right: var(--select-tag-padding-lr, 0px); }
96 .next-select .next-select-inner .next-input-inner {
97 width: auto; }
98 .next-select-trigger-search {
99 position: relative;
100 display: inline-block;
101 vertical-align: top;
102 overflow: hidden;
103 width: 100%;
104 max-width: 100%; }
105 .next-select-trigger-search > input, .next-select-trigger-search > span {
106 display: block;
107 font-size: inherit;
108 font-family: inherit;
109 letter-spacing: inherit;
110 white-space: nowrap;
111 overflow: hidden; }
112 .next-select-trigger-search input {
113 position: absolute;
114 background-color: transparent;
115 width: 100%;
116 height: 100% !important;
117 z-index: 1;
118 left: 0;
119 border: 0;
120 outline: 0;
121 margin: 0;
122 padding: 0;
123 cursor: inherit; }
124 .next-select-trigger-search > span {
125 position: relative;
126 visibility: hidden;
127 white-space: pre;
128 max-width: 100%;
129 /* 在 table 布局中,100% 并没有什么x用 */
130 z-index: -1; }
131 .next-select-single {
132 /* 搜索框激活时,展开后不显示值,只显示搜索框 */
133 /* 搜索框未激活,或者menu未展开,如果有值,则不显示搜索(placeholder) */ }
134 .next-select-single.next-no-search {
135 cursor: pointer; }
136 .next-select-single.next-has-search.next-active .next-select-values > em {
137 display: none; }
138 .next-select-single.next-no-search .next-select-values > em + .next-select-trigger-search, .next-select-single.next-inactive .next-select-values > em + .next-select-trigger-search {
139 width: 1px;
140 opacity: 0;
141 /* stylelint-disable */
142 filter: alpha(opacity=0);
143 /* for IE 9 */
144 /* stylelint-enable */ }
145 .next-select-single .next-select-values {
146 display: inline-flex;
147 align-items: center; }
148 .next-select-single .next-select-values > em {
149 vertical-align: middle;
150 overflow: hidden;
151 text-overflow: ellipsis;
152 white-space: nowrap; }
153 .next-select-multiple .next-select-compact {
154 position: relative;
155 white-space: nowrap; }
156 .next-select-multiple .next-select-compact .next-select-trigger-search {
157 width: auto; }
158 .next-select-multiple .next-select-compact .next-select-tag-compact {
159 position: absolute;
160 top: 0;
161 right: 0;
162 z-index: 1;
163 padding: 0 4px 0 16px;
164 color: #333333;
165 color: var(--input-text-color, #333333);
166 background: linear-gradient(90deg, transparent, #FFFFFF 10px);
167 background: linear-gradient(90deg, transparent, var(--input-bg-color, #FFFFFF) 10px); }
168 .next-select-multiple .next-disabled .next-select-tag-compact {
169 background: linear-gradient(90deg, transparent, #F7F8FA 10px);
170 background: linear-gradient(90deg, transparent, var(--input-disabled-bg-color, #F7F8FA) 10px); }
171 .next-select-multiple, .next-select-tag {
172 /* 如果有值,则搜索框变为1px */ }
173 .next-select-multiple .next-select-values, .next-select-tag .next-select-values {
174 /* Tag 有 3px 的 margin-bottom,所以包裹 Tag 的容器要作一下处理 */
175 margin-bottom: -3px;
176 margin-bottom: calc(0px - var(--select-tag-spacing-tb, 3px));
177 height: auto !important; }
178 .next-select-multiple .next-select-trigger-search, .next-select-tag .next-select-trigger-search {
179 margin-bottom: 3px;
180 margin-bottom: var(--select-tag-spacing-tb, 3px); }
181 .next-select-multiple .next-tag + .next-select-trigger-search, .next-select-tag .next-tag + .next-select-trigger-search {
182 width: auto;
183 min-width: 1px;
184 /* 保留一个光标的宽度 */ }
185 .next-select-multiple .next-input, .next-select-tag .next-input {
186 height: auto;
187 align-items: start; }
188 .next-select-multiple.next-small .next-select-values, .next-select-tag.next-small .next-select-values {
189 min-height: 18px;
190 min-height: calc(var(--form-element-small-height, 20px) - 2px);
191 padding-top: 2px;
192 padding-top: calc(var(--form-element-small-height, 20px)/2 - var(--select-s-lineheight, 14px)/2 - 1px);
193 padding-bottom: 2px;
194 padding-bottom: calc(var(--form-element-small-height, 20px)/2 - var(--select-s-lineheight, 14px)/2 - 1px);
195 line-height: 14px;
196 line-height: var(--select-s-lineheight, 14px); }
197 .next-select-multiple.next-small .next-select-values-compact, .next-select-tag.next-small .next-select-values-compact {
198 height: 20px !important;
199 height: var(--form-element-small-height, 20px) !important; }
200 .next-select-multiple.next-small .next-tag, .next-select-tag.next-small .next-tag {
201 border: 0;
202 padding-top: 0px;
203 padding-top: calc(var(--select-s-lineheight, 14px)/2 - var(--s-4, 16px)/2 + 1px);
204 padding-bottom: 0px;
205 padding-bottom: calc(var(--select-s-lineheight, 14px)/2 - var(--s-4, 16px)/2 + 1px);
206 height: 14px;
207 height: var(--select-s-lineheight, 14px); }
208 .next-select-multiple.next-small .next-tag .next-tag-body, .next-select-multiple.next-small .next-tag .next-tag-close-btn, .next-select-tag.next-small .next-tag .next-tag-body, .next-select-tag.next-small .next-tag .next-tag-close-btn {
209 line-height: 14px;
210 line-height: calc(var(--select-s-lineheight, 14px) - var(--select-s-lineheight, 14px)/2*2 + var(--s-4, 16px)/2*2 - 2px); }
211 .next-select-multiple.next-small .next-tag-body, .next-select-tag.next-small .next-tag-body {
212 line-height: 14px;
213 line-height: var(--select-s-lineheight, 14px); }
214 .next-select-multiple.next-small .next-input-label, .next-select-multiple.next-small .next-input-inner, .next-select-multiple.next-small .next-input-control, .next-select-multiple.next-small .next-select-tag-compact, .next-select-tag.next-small .next-input-label, .next-select-tag.next-small .next-input-inner, .next-select-tag.next-small .next-input-control, .next-select-tag.next-small .next-select-tag-compact {
215 line-height: 18px;
216 line-height: calc(var(--form-element-small-height, 20px) - 2px); }
217 .next-select-multiple.next-medium .next-select-values, .next-select-tag.next-medium .next-select-values {
218 min-height: 26px;
219 min-height: calc(var(--form-element-medium-height, 28px) - 2px);
220 padding-top: 3px;
221 padding-top: calc(var(--form-element-medium-height, 28px)/2 - var(--select-m-lineheight, 20px)/2 - 1px);
222 padding-bottom: 3px;
223 padding-bottom: calc(var(--form-element-medium-height, 28px)/2 - var(--select-m-lineheight, 20px)/2 - 1px);
224 line-height: 20px;
225 line-height: var(--select-m-lineheight, 20px); }
226 .next-select-multiple.next-medium .next-select-values-compact, .next-select-tag.next-medium .next-select-values-compact {
227 height: 28px !important;
228 height: var(--form-element-medium-height, 28px) !important; }
229 .next-select-multiple.next-medium .next-tag, .next-select-tag.next-medium .next-tag {
230 padding-top: 1px;
231 padding-top: calc(var(--select-m-lineheight, 20px)/2 - var(--s-4, 16px)/2 - 1px);
232 padding-bottom: 1px;
233 padding-bottom: calc(var(--select-m-lineheight, 20px)/2 - var(--s-4, 16px)/2 - 1px);
234 height: 20px;
235 height: var(--select-m-lineheight, 20px); }
236 .next-select-multiple.next-medium .next-tag .next-tag-body, .next-select-multiple.next-medium .next-tag .next-tag-close-btn, .next-select-tag.next-medium .next-tag .next-tag-body, .next-select-tag.next-medium .next-tag .next-tag-close-btn {
237 line-height: 18px;
238 line-height: calc(var(--select-m-lineheight, 20px) - var(--select-m-lineheight, 20px)/2*2 + var(--s-4, 16px)/2*2 + 2px); }
239 .next-select-multiple.next-medium .next-input-label, .next-select-multiple.next-medium .next-input-inner, .next-select-multiple.next-medium .next-input-control, .next-select-multiple.next-medium .next-select-tag-compact, .next-select-tag.next-medium .next-input-label, .next-select-tag.next-medium .next-input-inner, .next-select-tag.next-medium .next-input-control, .next-select-tag.next-medium .next-select-tag-compact {
240 line-height: 26px;
241 line-height: calc(var(--form-element-medium-height, 28px) - 2px); }
242 .next-select-multiple.next-large .next-select-values, .next-select-tag.next-large .next-select-values {
243 min-height: 38px;
244 min-height: calc(var(--form-element-large-height, 40px) - 2px);
245 padding-top: 7px;
246 padding-top: calc(var(--form-element-large-height, 40px)/2 - var(--select-l-lineheight, 24px)/2 - 1px);
247 padding-bottom: 7px;
248 padding-bottom: calc(var(--form-element-large-height, 40px)/2 - var(--select-l-lineheight, 24px)/2 - 1px);
249 line-height: 24px;
250 line-height: var(--select-l-lineheight, 24px); }
251 .next-select-multiple.next-large .next-select-values-compact, .next-select-tag.next-large .next-select-values-compact {
252 height: 40px !important;
253 height: var(--form-element-large-height, 40px) !important; }
254 .next-select-multiple.next-large .next-tag, .next-select-tag.next-large .next-tag {
255 padding-top: 3px;
256 padding-top: calc(var(--select-l-lineheight, 24px)/2 - var(--s-4, 16px)/2 - 1px);
257 padding-bottom: 3px;
258 padding-bottom: calc(var(--select-l-lineheight, 24px)/2 - var(--s-4, 16px)/2 - 1px);
259 height: 24px;
260 height: var(--select-l-lineheight, 24px); }
261 .next-select-multiple.next-large .next-tag .next-tag-body, .next-select-multiple.next-large .next-tag .next-tag-close-btn, .next-select-tag.next-large .next-tag .next-tag-body, .next-select-tag.next-large .next-tag .next-tag-close-btn {
262 line-height: 18px;
263 line-height: calc(var(--select-l-lineheight, 24px) - var(--select-l-lineheight, 24px)/2*2 + var(--s-4, 16px)/2*2 + 2px); }
264 .next-select-multiple.next-large .next-input-label, .next-select-multiple.next-large .next-input-inner, .next-select-multiple.next-large .next-input-control, .next-select-multiple.next-large .next-select-tag-compact, .next-select-tag.next-large .next-input-label, .next-select-tag.next-large .next-input-inner, .next-select-tag.next-large .next-input-control, .next-select-tag.next-large .next-select-tag-compact {
265 line-height: 38px;
266 line-height: calc(var(--form-element-large-height, 40px) - 2px); }
267 .next-select-auto-complete {
268 width: 160px; }
269 .next-select-auto-complete .next-input {
270 width: 100%;
271 /* table-cell 下 margin 无效 */ }
272 .next-select-auto-complete .next-input .next-input-hint-wrap {
273 padding-right: 1px; }
274 .next-select-auto-complete .next-input .next-select-arrow {
275 padding-left: 0; }
276 .next-select.next-active .next-select-arrow .next-icon-arrow-down {
277 transform: rotate(180deg); }
278 .next-select .next-select-unfold-icon::before {
279 content: "";
280 content: var(--select-unfold-icon-content, ""); }
281 .next-select-symbol-fold::before {
282 content: "";
283 content: var(--select-fold-icon-content, ""); }
284 .next-select-arrow {
285 cursor: pointer;
286 width: auto !important;
287 text-align: center;
288 transition: all 100ms linear;
289 transition: all var(--motion-duration-immediately, 100ms) var(--motion-linear, linear);
290 /* transform-origin: center 41.8%; // icon 图像中心 */ }
291 .next-select-popup-wrap {
292 animation-duration: 300ms;
293 animation-duration: var(--motion-duration-standard, 300ms);
294 animation-timing-function: ease;
295 animation-timing-function: var(--motion-ease, ease);
296 padding: 0px 0;
297 padding: var(--popup-spacing-tb, 0px) 0; }
298 .next-select-spacing-tb {
299 padding: 0px 0;
300 padding: var(--popup-spacing-tb, 0px) 0; }
301 .next-select-menu-wrapper {
302 max-height: 260px;
303 overflow: auto;
304 border: 1px solid #DCDEE3;
305 border: var(--popup-local-border-width, 1px) var(--popup-local-border-style, solid) var(--popup-local-border-color, #DCDEE3);
306 border-radius: 3px;
307 border-radius: var(--popup-local-corner, 3px);
308 box-shadow: none;
309 box-shadow: var(--popup-local-shadow, none); }
310 .next-select-menu-wrapper .next-select-menu {
311 max-height: none;
312 border: none; }
313 .next-select-menu {
314 max-height: 260px;
315 overflow: auto;
316 /* autoComplete 没有选项时 menu 不显示 */ }
317 .next-select-menu .next-select-menu-empty-content {
318 padding-left: 8px;
319 padding-left: var(--s-2, 8px);
320 padding-right: 8px;
321 padding-right: var(--s-2, 8px);
322 color: #999999;
323 color: var(--select-hint-color, #999999); }
324 .next-select-menu.next-select-auto-complete-menu.next-select-menu-empty {
325 display: none; }
326 .next-select-menu .next-menu-item-text .next-icon {
327 vertical-align: middle; }
328 .next-select-all {
329 display: block;
330 cursor: pointer;
331 padding: 0 8px;
332 padding: 0 var(--s-2, 8px);
333 margin: 0 12px 8px;
334 margin: 0 var(--s-3, 12px) var(--s-2, 8px);
335 border-bottom: 1px solid #DCDEE3;
336 border-bottom: 1px solid var(--color-line1-2, #DCDEE3); }
337 .next-select-all:hover {
338 color: #3E71F7;
339 color: var(--color-link-3, #3E71F7); }
340 .next-select-all .next-menu-icon-selected.next-icon {
341 display: inline-block !important;
342 top: initial;
343 color: #5584FF;
344 color: var(--select-menu-icon-color, #5584FF); }
345 .next-select-highlight {
346 color: #5584FF;
347 color: var(--select-highlight-color, #5584FF);
348 font-size: 12px;
349 font-size: var(--select-highlight-font, 12px); }
350 .next-select-in-ie.next-select-trigger .next-select-values {
351 /* 在 table 布局中,overflow: hidden 会导致负的 margin 失效 */
352 overflow: visible; }
353 .next-select-in-ie.next-select-trigger .next-input-control, .next-select-in-ie.next-select-trigger .next-input-label {
354 width: 1px; }
355 .next-select-in-ie.next-select-trigger .next-input-control > * {
356 display: table-cell;
357 width: 1%; }
358 .next-select-in-ie.next-select-trigger .next-select-arrow {
359 display: table-cell; }
360 .next-select-in-ie.next-select-trigger .next-select-clear {
361 display: none; }
362 .next-select-in-ie.next-select-trigger.next-select-multiple .next-select-inner, .next-select-in-ie.next-select-trigger.next-select-tag .next-select-inner {
363 vertical-align: top; }
364 .next-select-in-ie.next-select-trigger .next-select-inner {
365 display: inline-table; }
366 .next-select-in-ie.next-select-trigger.next-select-single .next-select-values {
367 display: inline-table; }
368 .next-select-in-ie.next-select-trigger.next-select-single .next-input.next-small .next-select-values {
369 line-height: 20px;
370 line-height: var(--form-element-small-height, 20px); }
371 .next-select-in-ie.next-select-trigger.next-select-single .next-input.next-medium .next-select-values {
372 line-height: 28px;
373 line-height: var(--form-element-medium-height, 28px); }
374 .next-select-in-ie.next-select-trigger.next-select-single .next-input.next-large .next-select-values {
375 line-height: 40px;
376 line-height: var(--form-element-large-height, 40px); }
377 .next-select-in-ie.next-select-trigger .next-select-trigger-search > span {
378 max-width: 100px; }
379 .next-select-in-ie.next-select-trigger.next-select-single {
380 /* 搜索框未激活,或者menu未展开,如果有值,则不显示搜索(placeholder) */ }
381 .next-select-in-ie.next-select-trigger.next-select-single.next-select-in-ie-fixwidth .next-select-values {
382 position: relative; }
383 .next-select-in-ie.next-select-trigger.next-select-single.next-select-in-ie-fixwidth .next-select-values > em {
384 position: absolute;
385 display: inline-block;
386 height: 100%;
387 line-height: 1;
388 vertical-align: middle;
389 overflow: hidden;
390 left: 4px;
391 right: 0;
392 top: 30%; }
393 .next-select-in-ie.next-select-trigger.next-select-single.next-no-search .next-select-values > em + .next-select-trigger-search, .next-select-in-ie.next-select-trigger.next-select-single.next-inactive .next-select-values > em + .next-select-trigger-search {
394 /* stylelint-disable */
395 filter: alpha(opacity=0);
396 /* for IE 9 */
397 /* stylelint-enable */
398 font-size: 0; }
399 .next-select-in-ie.next-select-trigger.next-no-search .next-select-trigger-search input {
400 color: inherit; }
401
402@media screen and (-webkit-min-device-pixel-ratio: 0) {
403 .next-select-multiple .next-select-compact .next-select-tag-compact {
404 background: linear-gradient(90deg, rgba(255, 255, 255, 0), #FFFFFF 10px);
405 background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--input-bg-color, #FFFFFF) 10px); }
406 .next-select-multiple .next-disabled .next-select-tag-compact {
407 background: linear-gradient(90deg, rgba(255, 255, 255, 0), #F7F8FA 10px);
408 background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--input-disabled-bg-color, #F7F8FA) 10px); } }
409
410.next-select.next-select-multiple[dir='rtl'] .next-select-compact .next-select-tag-compact {
411 left: 0;
412 right: auto;
413 padding: 0 16px 0 4px;
414 background: linear-gradient(270deg, rgba(255, 255, 255, 0), #FFFFFF 10px);
415 background: linear-gradient(270deg, rgba(255, 255, 255, 0), var(--input-bg-color, #FFFFFF) 10px); }