1 | @charset "UTF-8";
|
2 | @import '../core/index-noreset.scss';
|
3 | @import 'scss/mixin';
|
4 | @import 'scss/variable';
|
5 |
|
6 | #{$input-prefix} {
|
7 | @include box-sizing;
|
8 | vertical-align: middle;
|
9 |
|
10 | input {
|
11 | height: 100%;
|
12 |
|
13 | &[type="reset"],
|
14 | &[type="submit"] {
|
15 | -webkit-appearance: button;
|
16 | cursor: pointer;
|
17 | }
|
18 |
|
19 | &::-moz-focus-inner {
|
20 | border: 0;
|
21 | padding: 0;
|
22 | }
|
23 |
|
24 |
|
25 | &:-webkit-autofill {
|
26 | -webkit-box-shadow: 0 0 0 1000px $input-bg-color inset;
|
27 | border-radius: $form-element-large-corner;
|
28 | }
|
29 |
|
30 | &[type="password"] {
|
31 | &::-ms-reveal {
|
32 | display: none;
|
33 | }
|
34 | }
|
35 | }
|
36 |
|
37 | textarea {
|
38 | resize: none;
|
39 | }
|
40 |
|
41 | input,
|
42 | textarea {
|
43 | width: 100%;
|
44 | border: none;
|
45 | outline: none;
|
46 | padding: 0;
|
47 | margin: 0;
|
48 | font-weight: normal;
|
49 | vertical-align: middle;
|
50 | background-color: transparent;
|
51 | color: $input-text-color;
|
52 |
|
53 | &::-ms-clear {
|
54 | display: none;
|
55 | }
|
56 | }
|
57 |
|
58 | display: inline-table;
|
59 | border-collapse: separate;
|
60 | font-size: 0;
|
61 | line-height: 1;
|
62 | width: 200px;
|
63 | border-spacing: 0;
|
64 | transition: all $motion-duration-immediately $motion-linear;
|
65 |
|
66 | border: $input-border-width solid $input-border-color;
|
67 | background-color: $input-bg-color;
|
68 |
|
69 | &.#{$css-prefix}small {
|
70 | @include input-size($form-element-small-height, $input-s-padding, $form-element-small-font-size, $input-s-label-padding-left, $input-s-icon-padding-right);
|
71 | @include input-icon-size($form-element-small-icon-size);
|
72 | @include input-border-radius($form-element-small-corner);
|
73 | }
|
74 |
|
75 | &.#{$css-prefix}medium {
|
76 | @include input-size($form-element-medium-height, $input-m-padding, $form-element-medium-font-size, $input-m-label-padding-left, $input-m-icon-padding-right);
|
77 | @include input-icon-size($form-element-medium-icon-size);
|
78 | @include input-border-radius($form-element-medium-corner);
|
79 | }
|
80 |
|
81 | &.#{$css-prefix}large {
|
82 | @include input-size($form-element-large-height, $input-l-padding, $form-element-large-font-size, $input-l-label-padding-left, $input-l-icon-padding-right);
|
83 | @include input-icon-size($form-element-large-icon-size);
|
84 | @include input-border-radius($form-element-large-corner);
|
85 | }
|
86 |
|
87 | &#{$input-prefix}-textarea {
|
88 | height: auto;
|
89 |
|
90 | textarea {
|
91 | color: $input-text-color;
|
92 | padding: $input-multiple-padding-tb $input-multiple-padding-lr;
|
93 | font-size: $input-multiple-font-size;
|
94 | border-radius: $input-multiple-corner;
|
95 | }
|
96 |
|
97 | &.#{$css-prefix}small textarea {
|
98 | font-size: $form-element-medium-font-size;
|
99 | }
|
100 | &.#{$css-prefix}large textarea {
|
101 | font-size: $form-element-large-font-size;
|
102 | }
|
103 |
|
104 | #{$input-prefix}-control {
|
105 | display: block;
|
106 | width: auto;
|
107 | border-radius: $input-multiple-corner;
|
108 | }
|
109 |
|
110 | #{$input-prefix}-len {
|
111 | padding: 0 $input-l-icon-padding-right 4px;
|
112 | display: block;
|
113 | text-align: right;
|
114 | width: auto;
|
115 | }
|
116 | border-radius: $input-multiple-corner;
|
117 | font-size: 0;
|
118 | }
|
119 |
|
120 | &-hint-wrap {
|
121 | color: $input-hint-color;
|
122 | position: relative;
|
123 |
|
124 | #{$input-prefix}-clear {
|
125 | opacity: 0;
|
126 | z-index: 1;
|
127 | position: absolute;
|
128 | }
|
129 | #{$input-prefix}-hint {
|
130 | opacity: 1;
|
131 | }
|
132 | }
|
133 |
|
134 | #{$input-prefix}-clear-icon, .#{$css-prefix}icon-eye, .#{$css-prefix}icon-eye-close {
|
135 | &:hover {
|
136 | cursor: pointer;
|
137 | color: $input-hint-hover-color;
|
138 | }
|
139 | }
|
140 |
|
141 | @mixin clear-icon-visible {
|
142 | opacity: 1;
|
143 |
|
144 | + #{$input-prefix}-hint {
|
145 | opacity: 0;
|
146 | }
|
147 | }
|
148 |
|
149 | #{$input-prefix}-hover-show {
|
150 | opacity: 0;
|
151 | }
|
152 |
|
153 | &:hover, &.#{$css-prefix}focus {
|
154 | border-color: $input-hover-border-color;
|
155 | background-color: $input-hover-bg-color;
|
156 |
|
157 | #{$input-prefix}-clear {
|
158 | @include clear-icon-visible;
|
159 | }
|
160 |
|
161 | #{$input-prefix}-hover-show {
|
162 | opacity: 1;
|
163 | }
|
164 | }
|
165 |
|
166 | #{$input-prefix}-clear:focus {
|
167 | @include clear-icon-visible;
|
168 | }
|
169 |
|
170 | &.#{$css-prefix}focus {
|
171 | border-color: $input-focus-border-color;
|
172 | background-color: $input-focus-bg-color;
|
173 | box-shadow: 0 0 0 $input-focus-shadow-spread $color-calculate-input-focus-shadow;
|
174 | }
|
175 |
|
176 | &.#{$css-prefix}warning {
|
177 | border-color: $input-feedback-warning-border-color;
|
178 | background-color: $input-feedback-warning-bg-color;
|
179 |
|
180 | &.#{$css-prefix}focus,
|
181 | &:hover {
|
182 | border-color: $input-feedback-warning-border-color;
|
183 | }
|
184 |
|
185 | &.#{$css-prefix}focus {
|
186 | box-shadow: 0 0 0 $input-focus-shadow-spread $color-calculate-input-feedback-warning-shadow;
|
187 | }
|
188 | }
|
189 |
|
190 | &.#{$css-prefix}error {
|
191 | border-color: $input-feedback-error-border-color;
|
192 | background-color: $input-feedback-error-bg-color;
|
193 |
|
194 | input, textarea {
|
195 | color: $input-feedback-error-color;
|
196 | }
|
197 |
|
198 | &.#{$css-prefix}focus,
|
199 | &:hover {
|
200 | border-color: $input-feedback-error-border-color;
|
201 | }
|
202 |
|
203 | &.#{$css-prefix}focus {
|
204 | box-shadow: 0 0 0 $input-focus-shadow-spread $color-calculate-input-feedback-error-shadow;
|
205 | }
|
206 | }
|
207 |
|
208 | &.#{$css-prefix}hidden {
|
209 | display: none;
|
210 | }
|
211 |
|
212 | &.#{$css-prefix}noborder {
|
213 | border: none;
|
214 | box-shadow: none;
|
215 | }
|
216 |
|
217 | &-control {
|
218 | #{$input-prefix}-len {
|
219 | font-size: $input-maxlen-font-size;
|
220 | line-height: $input-maxlen-font-size;
|
221 | color: $input-maxlen-color;
|
222 | display: table-cell;
|
223 | width: 1px;
|
224 | vertical-align: bottom;
|
225 |
|
226 | &.#{$css-prefix}error {
|
227 | color: $input-maxlen-error-color;
|
228 | }
|
229 |
|
230 | &.#{$css-prefix}warning {
|
231 | color: $input-maxlen-warning-color;
|
232 | }
|
233 | }
|
234 |
|
235 | > * {
|
236 | display: table-cell;
|
237 | width: 1%;
|
238 | top: 0;
|
239 | }
|
240 |
|
241 | > *:not(:last-child) {
|
242 | padding-right: $s-1;
|
243 | }
|
244 |
|
245 | .#{$css-prefix}icon {
|
246 | transition: all $motion-duration-immediately $motion-linear;
|
247 | color: $input-hint-color;
|
248 | }
|
249 |
|
250 | #{$input-prefix}-warning-icon {
|
251 | color: $input-feedback-warning-color;
|
252 | &::before {
|
253 | content: $input-feedback-warning-icon;
|
254 | }
|
255 | }
|
256 | #{$input-prefix}-success-icon {
|
257 | color: $input-feedback-success-color;
|
258 | &::before {
|
259 | content: $input-feedback-success-icon;
|
260 | }
|
261 | }
|
262 | #{$input-prefix}-loading-icon {
|
263 | color: $input-feedback-loading-color;
|
264 | &::before {
|
265 | content: $input-feedback-loading-icon;
|
266 | animation: loadingCircle 1s infinite linear;
|
267 | }
|
268 | }
|
269 | #{$input-prefix}-clear-icon {
|
270 | &::before {
|
271 | content: $input-feedback-clear-icon;
|
272 | }
|
273 | }
|
274 | }
|
275 |
|
276 | &-label, &-inner-text {
|
277 | color: $input-label-color;
|
278 | }
|
279 |
|
280 | input,
|
281 | textarea {
|
282 | @include input-placeholder($input-placeholder-color);
|
283 | }
|
284 |
|
285 | &.#{$css-prefix}disabled {
|
286 | @include input-disabled();
|
287 |
|
288 | input, textarea {
|
289 | -webkit-text-fill-color: $input-disabled-color;
|
290 | color: $input-disabled-color;
|
291 | @include input-placeholder($input-disabled-color);
|
292 | }
|
293 |
|
294 | #{$input-prefix}-label, #{$input-prefix}-inner-text {
|
295 | color: $input-disabled-color;
|
296 | }
|
297 | #{$input-prefix}-len {
|
298 | color: $input-disabled-color;
|
299 | }
|
300 |
|
301 | #{$input-prefix}-hint-wrap {
|
302 | #{$input-prefix}-clear {
|
303 | opacity: 0;
|
304 | }
|
305 | #{$input-prefix}-hint {
|
306 | opacity: 1;
|
307 | }
|
308 |
|
309 | color: $input-disabled-color;
|
310 |
|
311 | #{$input-prefix}-clear-icon:hover {
|
312 | cursor: not-allowed;
|
313 | color: $input-disabled-color;
|
314 | }
|
315 | }
|
316 |
|
317 | .#{$css-prefix}icon {
|
318 | color: $input-disabled-color;
|
319 | }
|
320 | }
|
321 |
|
322 | &-inner, &-control, &-label {
|
323 | display: table-cell;
|
324 | width: 1px;
|
325 | vertical-align: middle;
|
326 | line-height: 1;
|
327 | background-color: transparent;
|
328 | white-space: nowrap;
|
329 | }
|
330 |
|
331 | &-group {
|
332 | @include box-sizing;
|
333 |
|
334 | display: inline-table;
|
335 | border-collapse: separate;
|
336 | border-spacing: 0;
|
337 | line-height: 0;
|
338 | width: 100%;
|
339 |
|
340 | &-auto-width {
|
341 | width: 100%;
|
342 | border-radius: 0 !important;
|
343 | }
|
344 |
|
345 | > #{$input-prefix} {
|
346 | border-radius: 0;
|
347 | &.#{$css-prefix}focus {
|
348 | position: relative;
|
349 | z-index: 1;
|
350 | }
|
351 | }
|
352 |
|
353 | > #{$input-prefix}:first-child {
|
354 | &.#{$css-prefix}small {
|
355 | border-top-left-radius: $form-element-small-corner !important;
|
356 | border-bottom-left-radius: $form-element-small-corner !important;
|
357 | }
|
358 |
|
359 | &.#{$css-prefix}medium {
|
360 | border-top-left-radius: $form-element-medium-corner !important;
|
361 | border-bottom-left-radius: $form-element-medium-corner !important;
|
362 | }
|
363 |
|
364 | &.#{$css-prefix}large {
|
365 | border-top-left-radius: $form-element-large-corner !important;
|
366 | border-bottom-left-radius: $form-element-large-corner !important;
|
367 | }
|
368 | }
|
369 | > #{$input-prefix}:last-child {
|
370 | &.#{$css-prefix}small {
|
371 | border-top-right-radius: $form-element-small-corner !important;
|
372 | border-bottom-right-radius: $form-element-small-corner !important;
|
373 | }
|
374 |
|
375 | &.#{$css-prefix}medium {
|
376 | border-top-right-radius: $form-element-medium-corner !important;
|
377 | border-bottom-right-radius: $form-element-medium-corner !important;
|
378 | }
|
379 |
|
380 | &.#{$css-prefix}large {
|
381 | border-top-right-radius: $form-element-large-corner !important;
|
382 | border-bottom-right-radius: $form-element-large-corner !important;
|
383 | }
|
384 | }
|
385 | }
|
386 | &-group-addon {
|
387 | width: 1px;
|
388 | display: table-cell;
|
389 | vertical-align: middle;
|
390 | white-space: nowrap;
|
391 |
|
392 |
|
393 | &:first-child {
|
394 | border-bottom-right-radius: 0 !important;
|
395 | border-top-right-radius: 0 !important;
|
396 |
|
397 | > * {
|
398 | margin-right: calc(0px - #{$input-border-width});
|
399 | border-bottom-right-radius: 0 !important;
|
400 | border-top-right-radius: 0 !important;
|
401 | &.#{$css-prefix}focus {
|
402 | position: relative;
|
403 | z-index: 1;
|
404 | }
|
405 | > #{$input-prefix} {
|
406 | border-bottom-right-radius: 0 !important;
|
407 | border-top-right-radius: 0 !important;
|
408 | }
|
409 | > #{$input-prefix}.#{$css-prefix}focus {
|
410 | position: relative;
|
411 | z-index: 1;
|
412 | }
|
413 | }
|
414 | }
|
415 | &:last-child {
|
416 | border-bottom-left-radius: 0 !important;
|
417 | border-top-left-radius: 0 !important;
|
418 |
|
419 | > * {
|
420 | margin-left: calc(0px - #{$input-border-width});
|
421 | border-bottom-left-radius: 0 !important;
|
422 | border-top-left-radius: 0 !important;
|
423 | > #{$input-prefix} {
|
424 | border-bottom-left-radius: 0 !important;
|
425 | border-top-left-radius: 0 !important;
|
426 | }
|
427 | }
|
428 | }
|
429 | }
|
430 | &-group-text {
|
431 | color: $input-addon-text-color;
|
432 | background-color: $input-addon-bg-color;
|
433 | text-align: center;
|
434 | border: $input-border-width solid $input-border-color;
|
435 | padding: 0 $input-addon-padding;
|
436 |
|
437 | &:first-child {
|
438 | border-right-width: 0;
|
439 | }
|
440 | &:last-child {
|
441 | border-left-width: 0;
|
442 | }
|
443 |
|
444 | &.#{$css-prefix}disabled {
|
445 | @include input-disabled();
|
446 | }
|
447 |
|
448 | &.#{$css-prefix}small {
|
449 | @include input-addon-size($form-element-small-font-size);
|
450 | border-radius: $form-element-small-corner;
|
451 | }
|
452 |
|
453 | &.#{$css-prefix}medium {
|
454 | @include input-addon-size($form-element-medium-font-size);
|
455 | border-radius: $form-element-medium-corner;
|
456 | }
|
457 |
|
458 | &.#{$css-prefix}large {
|
459 | @include input-addon-size($form-element-large-font-size);
|
460 | border-radius: $form-element-large-corner;
|
461 | }
|
462 | }
|
463 | }
|
464 |
|
465 | @import './rtl.scss';
|