|
52 | 52 | -webkit-appearance: none;
|
53 | 53 | -moz-appearance: none;
|
54 | 54 | appearance: none;
|
55 |
| - } |
56 |
| - .v-select .dropdown-toggle { |
57 | 55 | display: block;
|
58 | 56 | padding: 0;
|
59 | 57 | background: none;
|
60 | 58 | border: 1px solid rgba(60, 60, 60, .26);
|
61 | 59 | border-radius: 4px;
|
62 | 60 | white-space: normal;
|
| 61 | + transition: border-radius .25s; |
63 | 62 | }
|
64 | 63 | .v-select .dropdown-toggle:after {
|
65 | 64 | visibility: hidden;
|
|
77 | 76 | cursor: pointer;
|
78 | 77 | }
|
79 | 78 | .v-select.open .dropdown-toggle {
|
80 |
| - border-bottom-color: transparent; |
81 | 79 | border-bottom-left-radius: 0;
|
82 | 80 | border-bottom-right-radius: 0;
|
83 | 81 | }
|
|
87 | 85 | top: 100%;
|
88 | 86 | left: 0;
|
89 | 87 | z-index: 1000;
|
90 |
| - /*float: left;*/ |
91 | 88 | min-width: 160px;
|
92 | 89 | padding: 5px 0;
|
93 | 90 | margin: 0;
|
94 | 91 | width: 100%;
|
95 | 92 | overflow-y: scroll;
|
96 |
| - border: 1px solid #ccc; |
97 |
| - border: 1px solid rgba(0, 0, 0, .15); |
| 93 | + border: 1px solid rgba(0, 0, 0, .26); |
98 | 94 | border-top: none;
|
99 |
| - border-radius: 4px; |
100 |
| - border-top-left-radius: 0; |
101 |
| - border-top-right-radius: 0; |
102 |
| - /*font-size: 14px;*/ |
| 95 | + border-radius: 0 0 4px 4px; |
103 | 96 | text-align: left;
|
104 | 97 | list-style: none;
|
105 |
| - background-color: #fff; |
106 |
| - background-clip: padding-box; |
107 |
| - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); |
108 |
| - box-shadow: 0 6px 12px rgba(0, 0, 0, .175); |
109 |
| - } |
110 |
| - .v-select .dropdown-menu .divider { |
111 |
| - height: 1px; |
112 |
| - margin: 7px 0; |
113 |
| - overflow: hidden; |
114 |
| - background-color: #e5e5e5; |
115 | 98 | }
|
116 | 99 | .v-select .no-options {
|
117 | 100 | text-align: center;
|
118 |
| - padding-bottom: 2px; |
119 | 101 | }
|
120 | 102 | /* Selected Tags */
|
121 | 103 | .v-select .selected-tag {
|
|
125 | 107 | border-radius: 4px;
|
126 | 108 | height: 26px;
|
127 | 109 | margin: 4px 1px 0px 3px;
|
128 |
| - padding: 0 0.25em; |
| 110 | + padding: 1px 0.25em; |
129 | 111 | float: left;
|
130 | 112 | line-height: 24px;
|
131 | 113 | }
|
|
146 | 128 | opacity: .2;
|
147 | 129 | }
|
148 | 130 | /* Search Input */
|
149 |
| - .v-select input[type="search"]::-ms-clear, |
150 | 131 | .v-select input[type="search"]::-webkit-search-decoration,
|
151 | 132 | .v-select input[type="search"]::-webkit-search-cancel-button,
|
152 | 133 | .v-select input[type="search"]::-webkit-search-results-button,
|
153 | 134 | .v-select input[type="search"]::-webkit-search-results-decoration {
|
154 | 135 | display: none;
|
155 | 136 | }
|
| 137 | + .v-select input[type="search"]::-ms-clear { |
| 138 | + display: none; |
| 139 | + } |
156 | 140 | .v-select input[type="search"],
|
157 | 141 | .v-select input[type="search"]:focus {
|
158 | 142 | appearance: none;
|
159 | 143 | -webkit-appearance: none;
|
| 144 | + -moz-appearance: none; |
160 | 145 | line-height: 1.42857143;
|
161 |
| - /*color: #555;*/ |
162 |
| - border-radius: 4px; |
| 146 | + font-size:1em; |
163 | 147 | height: 34px;
|
164 |
| - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; |
165 | 148 | display: inline-block;
|
166 | 149 | border: none;
|
167 | 150 | outline: none;
|
|
180 | 163 | max-width: 1px;
|
181 | 164 | }
|
182 | 165 | /* List Items */
|
| 166 | + .v-select li { |
| 167 | + line-height: 1.42857143; /* Normalize line height */ |
| 168 | + } |
183 | 169 | .v-select li > a {
|
184 | 170 | display: block;
|
185 | 171 | padding: 3px 20px;
|
186 | 172 | clear: both;
|
187 |
| - line-height: 1.42857143; /* Normalize line height */ |
188 | 173 | color: #333; /* Overrides most CSS frameworks */
|
189 | 174 | white-space: nowrap;
|
190 | 175 | }
|
|
250 | 235 | transform: rotate(360deg);
|
251 | 236 | }
|
252 | 237 | }
|
| 238 | + /* Dropdown Default Transition */ |
| 239 | + .fade-enter-active, |
| 240 | + .fade-leave-active { |
| 241 | + transition: opacity .15s cubic-bezier(1.0, 0.5, 0.8, 1.0); |
| 242 | + } |
| 243 | + .fade-enter, |
| 244 | + .fade-leave-to { |
| 245 | + opacity: 0; |
| 246 | + } |
253 | 247 | </style>
|
254 | 248 |
|
255 | 249 | <template>
|
256 | 250 | <div class="dropdown v-select" :class="dropdownClasses">
|
257 |
| - <div ref="toggle" @mousedown.prevent="toggleDropdown" class="dropdown-toggle" type="button"> |
| 251 | + <div ref="toggle" @mousedown.prevent="toggleDropdown" class="dropdown-toggle"> |
258 | 252 |
|
259 | 253 | <span class="selected-tag" v-for="option in valueAsArray" v-bind:key="option.index">
|
260 | 254 | {{ getOptionLabel(option) }}
|
|
265 | 259 |
|
266 | 260 | <input
|
267 | 261 | ref="search"
|
268 |
| - :debounce="debounce" |
269 | 262 | v-model="search"
|
270 | 263 | @keydown.delete="maybeDeleteValue"
|
271 | 264 | @keyup.esc="onEscape"
|
|
288 | 281 | </slot>
|
289 | 282 | </div>
|
290 | 283 |
|
291 |
| - <ul ref="dropdownMenu" v-if="dropdownOpen" :transition="transition" class="dropdown-menu" :style="{ 'max-height': maxHeight }"> |
292 |
| - <li v-for="(option, index) in filteredOptions" v-bind:key="index" :class="{ active: isOptionSelected(option), highlight: index === typeAheadPointer }" @mouseover="typeAheadPointer = index"> |
293 |
| - <a @mousedown.prevent="select(option)"> |
294 |
| - {{ getOptionLabel(option) }} |
295 |
| - </a> |
296 |
| - </li> |
297 |
| - <transition name="fade"> |
298 |
| - <li v-if="!filteredOptions.length" class="divider"></li> |
299 |
| - </transition> |
300 |
| - <transition name="fade"> |
| 284 | + <transition :name="transition"> |
| 285 | + <ul ref="dropdownMenu" v-if="dropdownOpen" class="dropdown-menu" :style="{ 'max-height': maxHeight }"> |
| 286 | + <li v-for="(option, index) in filteredOptions" v-bind:key="index" :class="{ active: isOptionSelected(option), highlight: index === typeAheadPointer }" @mouseover="typeAheadPointer = index"> |
| 287 | + <a @mousedown.prevent="select(option)"> |
| 288 | + {{ getOptionLabel(option) }} |
| 289 | + </a> |
| 290 | + </li> |
301 | 291 | <li v-if="!filteredOptions.length" class="no-options">
|
302 | 292 | <slot name="no-options">Sorry, no matching options.</slot>
|
303 | 293 | </li>
|
304 |
| - </transition> |
305 |
| - </ul> |
| 294 | + </ul> |
| 295 | + </transition> |
306 | 296 | </div>
|
307 | 297 | </template>
|
308 | 298 |
|
|
383 | 373 | */
|
384 | 374 | transition: {
|
385 | 375 | type: String,
|
386 |
| - default: 'expand' |
| 376 | + default: 'fade' |
387 | 377 | },
|
388 | 378 |
|
389 | 379 | /**
|
|
0 commit comments