1 | @charset "UTF-8";
|
2 | @import "../core/index-noreset.scss";
|
3 | @import "../input/scss/variable.scss";
|
4 | @import "../input/scss/mixin.scss";
|
5 | @import "scss/mixin";
|
6 | @import "scss/variable";
|
7 |
|
8 | #{$select-prefix} {
|
9 | @include box-sizing;
|
10 | display: inline-block;
|
11 | font-size: 0;
|
12 | vertical-align: middle;
|
13 |
|
14 |
|
15 | &-trigger {
|
16 | min-width: 100px;
|
17 | outline: 0;
|
18 | transition: all .3s ease;
|
19 |
|
20 | .#{$css-prefix}input-label {
|
21 | flex: 0 0 auto;
|
22 | width: auto;
|
23 | }
|
24 |
|
25 | #{$select-prefix}-values {
|
26 | display: block;
|
27 | width: 100%;
|
28 | flex: 1 1 0;
|
29 | overflow: hidden;
|
30 |
|
31 | > em {
|
32 | font-style: inherit;
|
33 | }
|
34 |
|
35 | input {
|
36 | padding-left: 0;
|
37 | padding-right: 0;
|
38 | }
|
39 | }
|
40 |
|
41 | .#{$css-prefix}input-control {
|
42 | flex: 0 0 auto;
|
43 | width: auto;
|
44 | > * {
|
45 | display: inline-block;
|
46 | width: auto;
|
47 | }
|
48 | > .#{$css-prefix}select-arrow {
|
49 | padding-right: 0;
|
50 | }
|
51 | }
|
52 |
|
53 | .#{$css-prefix}input.#{$css-prefix}disabled {
|
54 | em {
|
55 | color: $color-text1-1;
|
56 | }
|
57 | #{$select-prefix}-arrow {
|
58 | cursor: not-allowed;
|
59 | }
|
60 | }
|
61 |
|
62 | .#{$css-prefix}select-clear {
|
63 | display: none;
|
64 | }
|
65 |
|
66 | &.#{$css-prefix}has-clear:hover {
|
67 | .#{$css-prefix}select-clear {
|
68 | display: inline-block;
|
69 | }
|
70 | .#{$css-prefix}select-arrow {
|
71 | display: none;
|
72 | }
|
73 | }
|
74 | }
|
75 |
|
76 | #{$select-prefix}-inner {
|
77 | display: inline-flex;
|
78 | align-items: center;
|
79 | width: 100%;
|
80 | min-width: 100px;
|
81 |
|
82 | outline: 0;
|
83 | color: $select-color;
|
84 |
|
85 | #{$tag-prefix} {
|
86 | line-height: 1;
|
87 | margin-right: $select-tag-spacing-lr;
|
88 | margin-bottom: $select-tag-spacing-tb;
|
89 | padding-left: $select-tag-padding-lr;
|
90 | padding-right: $select-tag-padding-lr;
|
91 | }
|
92 | }
|
93 |
|
94 | &-trigger-search {
|
95 | position: relative;
|
96 | display: inline-block;
|
97 | vertical-align: top;
|
98 | overflow: hidden;
|
99 | width: 100%;
|
100 | max-width: 100%;
|
101 |
|
102 | > input, > span {
|
103 | display: block;
|
104 | font-size: inherit;
|
105 | font-family: inherit;
|
106 | letter-spacing: inherit;
|
107 | white-space: nowrap;
|
108 | overflow: hidden;
|
109 | }
|
110 |
|
111 | input {
|
112 | position: absolute;
|
113 | background-color: $color-transparent;
|
114 | width: 100%;
|
115 | height: 100% !important;
|
116 | z-index: 1;
|
117 | left: 0;
|
118 | border: 0;
|
119 | outline: 0;
|
120 | margin: 0;
|
121 | padding: 0;
|
122 | cursor: inherit;
|
123 | }
|
124 |
|
125 | > span {
|
126 | position: relative;
|
127 | visibility: hidden;
|
128 | white-space: pre;
|
129 | max-width: 100%;
|
130 | z-index: -1;
|
131 | }
|
132 | }
|
133 |
|
134 | &-single {
|
135 | &.#{$css-prefix}no-search {
|
136 | cursor: pointer;
|
137 | }
|
138 |
|
139 |
|
140 | &.#{$css-prefix}has-search.#{$css-prefix}active {
|
141 | #{$select-prefix}-values > em {
|
142 | display: none;
|
143 | }
|
144 | }
|
145 |
|
146 |
|
147 | &.#{$css-prefix}no-search,
|
148 | &.#{$css-prefix}inactive {
|
149 | #{$select-prefix}-values > em + #{$select-prefix}-trigger-search {
|
150 | width: 1px;
|
151 | opacity: 0;
|
152 | filter: alpha(opacity=0);
|
153 | }
|
154 |
|
155 | #{$select-prefix}-trigger-search input {
|
156 | color: $color-transparent;
|
157 | }
|
158 | }
|
159 |
|
160 | #{$select-prefix}-values {
|
161 | display: inline-flex;
|
162 | align-items: center;
|
163 |
|
164 | > em {
|
165 | vertical-align: middle;
|
166 | overflow: hidden;
|
167 | text-overflow: ellipsis;
|
168 | white-space: nowrap;
|
169 | }
|
170 | }
|
171 | }
|
172 |
|
173 | &-multiple, &-tag {
|
174 | #{$select-prefix}-values {
|
175 |
|
176 | margin-bottom: -$select-tag-spacing-tb;
|
177 | height: auto !important;
|
178 | }
|
179 |
|
180 | #{$select-prefix}-trigger-search {
|
181 | margin-bottom: $select-tag-spacing-tb;
|
182 | }
|
183 |
|
184 |
|
185 | #{$tag-prefix} + #{$select-prefix}-trigger-search {
|
186 | width: auto;
|
187 | min-width: 1px;
|
188 | }
|
189 | .#{$css-prefix}input {
|
190 | height: auto;
|
191 | align-items: start;
|
192 | }
|
193 |
|
194 | &.#{$css-prefix}small {
|
195 | #{$select-prefix}-values {
|
196 | @include select-size($form-element-small-height, $select-s-lineheight);
|
197 | }
|
198 | #{$tag-prefix} {
|
199 | border: 0;
|
200 | @include select-tag-size($select-s-lineheight, -1);
|
201 |
|
202 | &-body {
|
203 | line-height: $select-s-lineheight;
|
204 | }
|
205 | }
|
206 | .#{$css-prefix}input-label, .#{$css-prefix}input-control {
|
207 | line-height: $form-element-small-height - 2;
|
208 | }
|
209 | }
|
210 |
|
211 | &.#{$css-prefix}medium {
|
212 | #{$select-prefix}-values {
|
213 | @include select-size($form-element-medium-height, $select-m-lineheight);
|
214 | }
|
215 | #{$tag-prefix} {
|
216 | @include select-tag-size($select-m-lineheight);
|
217 | }
|
218 | .#{$css-prefix}input-label, .#{$css-prefix}input-control {
|
219 | line-height: $form-element-medium-height - 2;
|
220 | }
|
221 | }
|
222 |
|
223 | &.#{$css-prefix}large {
|
224 | #{$select-prefix}-values {
|
225 | @include select-size($form-element-large-height, $select-l-lineheight);
|
226 | }
|
227 | #{$tag-prefix} {
|
228 | @include select-tag-size($select-l-lineheight);
|
229 | }
|
230 | .#{$css-prefix}input-label, .#{$css-prefix}input-control {
|
231 | line-height: $form-element-large-height - 2;
|
232 | }
|
233 | }
|
234 | }
|
235 |
|
236 | &.#{$css-prefix}no-search {
|
237 |
|
238 |
|
239 | #{$select-prefix}-trigger-search input {
|
240 | color: $color-transparent;
|
241 | }
|
242 | }
|
243 |
|
244 | &-auto-complete {
|
245 | width: 160px;
|
246 |
|
247 | .#{$css-prefix}input {
|
248 | width: 100%;
|
249 | .#{$css-prefix}input-hint-wrap {
|
250 | padding-right: 1px;
|
251 | }
|
252 |
|
253 | #{$select-prefix}-arrow {
|
254 | padding-left: 0;
|
255 | }
|
256 | }
|
257 | }
|
258 |
|
259 | &.#{$css-prefix}active {
|
260 | #{$select-prefix}-arrow {
|
261 | transform: rotate(180deg);
|
262 | }
|
263 | }
|
264 |
|
265 | &-arrow {
|
266 | cursor: pointer;
|
267 | width: auto !important;
|
268 | text-align: center;
|
269 | transition: all .3s ease;
|
270 |
|
271 | }
|
272 |
|
273 | &-menu-wrapper {
|
274 | max-height: 260px;
|
275 | overflow: auto;
|
276 | border: $popup-local-border-width $popup-local-border-style $popup-local-border-color;
|
277 | border-radius: $popup-local-corner;
|
278 | box-shadow: $popup-local-shadow;
|
279 | #{$select-prefix}-menu {
|
280 | max-height: none;
|
281 | border: none;
|
282 | }
|
283 | }
|
284 |
|
285 |
|
286 | &-menu {
|
287 | max-height: 260px;
|
288 | overflow: auto;
|
289 |
|
290 | #{$select-prefix}-menu-empty-content {
|
291 | padding-left: $s-2;
|
292 | padding-right: $s-2;
|
293 | color: $select-hint-color;
|
294 | }
|
295 |
|
296 |
|
297 | &#{$select-prefix}-auto-complete-menu#{$select-prefix}-menu-empty {
|
298 | display: none;
|
299 | }
|
300 |
|
301 | .#{$css-prefix}menu-item-text .#{$css-prefix}icon {
|
302 | vertical-align: middle;
|
303 | }
|
304 | }
|
305 |
|
306 |
|
307 | &-all {
|
308 | display: block;
|
309 | cursor: pointer;
|
310 | padding: 0 $s-2;
|
311 | margin: 0 $s-3 $s-2;
|
312 | border-bottom: 1px solid $color-line1-2;
|
313 |
|
314 | &:hover {
|
315 | color: $color-link-3;
|
316 | }
|
317 |
|
318 | .#{$css-prefix}menu-icon-selected.#{$css-prefix}icon {
|
319 |
|
320 | display: inline-block !important;
|
321 | top: initial;
|
322 | color: $select-menu-icon-color;
|
323 | }
|
324 | }
|
325 |
|
326 | &-highlight {
|
327 | color: $select-highlight-color;
|
328 | font-size: $select-highlight-font;
|
329 | }
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 | &-in-ie#{$select-prefix}-trigger {
|
337 | #{$select-prefix}-values {
|
338 |
|
339 | overflow: visible;
|
340 | }
|
341 |
|
342 | .#{$css-prefix}input-control, .#{$css-prefix}input-label {
|
343 | width: 1px;
|
344 | }
|
345 | .#{$css-prefix}input-control > * {
|
346 | display: table-cell;
|
347 | width: 1%;
|
348 | }
|
349 | #{$select-prefix}-arrow {
|
350 | display: table-cell;
|
351 | }
|
352 | #{$select-prefix}-clear {
|
353 | display: none;
|
354 | }
|
355 |
|
356 | &#{$select-prefix}-multiple,
|
357 | &#{$select-prefix}-tag {
|
358 | #{$select-prefix}-inner {
|
359 | vertical-align: top;
|
360 | }
|
361 | }
|
362 |
|
363 | #{$select-prefix}-inner {
|
364 | display: inline-table;
|
365 | }
|
366 |
|
367 | &#{$select-prefix}-single {
|
368 | #{$select-prefix}-values {
|
369 | display: inline-table;
|
370 | }
|
371 | .#{$css-prefix}input.#{$css-prefix}small #{$select-prefix}-values {
|
372 | line-height: $form-element-small-height;
|
373 | }
|
374 | .#{$css-prefix}input.#{$css-prefix}medium #{$select-prefix}-values {
|
375 | line-height: $form-element-medium-height;
|
376 | }
|
377 | .#{$css-prefix}input.#{$css-prefix}large #{$select-prefix}-values {
|
378 | line-height: $form-element-large-height;
|
379 | }
|
380 | }
|
381 |
|
382 | #{$select-prefix}-trigger-search {
|
383 | > span {
|
384 | max-width: 100px;
|
385 | }
|
386 | }
|
387 |
|
388 | &#{$select-prefix}-single {
|
389 | &#{$select-prefix}-in-ie-fixwidth #{$select-prefix}-values {
|
390 | position: relative;
|
391 | > em {
|
392 | position: absolute;
|
393 | display: inline-block;
|
394 | height: 100%;
|
395 | line-height: 1;
|
396 | vertical-align: middle;
|
397 | overflow: hidden;
|
398 | left: 4px;
|
399 | right: 0;
|
400 | top: 30%;
|
401 | }
|
402 | }
|
403 |
|
404 | &.#{$css-prefix}no-search,
|
405 | &.#{$css-prefix}inactive {
|
406 | #{$select-prefix}-values > em + #{$select-prefix}-trigger-search {
|
407 | filter: alpha(opacity=0);
|
408 | font-size: 0;
|
409 | }
|
410 |
|
411 | #{$select-prefix}-trigger-search input {
|
412 | color: inherit;
|
413 | }
|
414 | }
|
415 | }
|
416 |
|
417 | &.#{$css-prefix}no-search {
|
418 | #{$select-prefix}-trigger-search input {
|
419 | color: inherit;
|
420 | }
|
421 | }
|
422 | }
|
423 | }
|