2016-01-08 18:44:35 +05:30
|
|
|
@import '~components/ui/colors.scss';
|
|
|
|
@import '~components/ui/fonts.scss';
|
|
|
|
|
2016-01-09 19:21:55 +05:30
|
|
|
@mixin form-transition() {
|
|
|
|
// Анимация фона должна быть быстрее анимации рамки, т.к. визуально фон заполняется медленнее
|
|
|
|
transition: border-color .25s,
|
|
|
|
background-color .20s;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Input
|
|
|
|
*/
|
2016-01-09 19:45:03 +05:30
|
|
|
@mixin input-theme($themeName, $color) {
|
|
|
|
.#{$themeName}TextField {
|
|
|
|
composes: textField;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
border-color: $color;
|
|
|
|
|
|
|
|
~ .formFieldIcon {
|
|
|
|
background: $color;
|
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-08 18:44:35 +05:30
|
|
|
.formRow {
|
|
|
|
position: relative;
|
|
|
|
height: 50px;
|
|
|
|
max-width: 100%;
|
|
|
|
margin: 10px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.formIconRow {
|
|
|
|
composes: formRow;
|
|
|
|
|
|
|
|
.textField {
|
|
|
|
padding-left: 60px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.textField {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
height: 50px;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
border: 2px solid lighter($black);
|
|
|
|
background: $black;
|
|
|
|
|
2016-01-09 15:21:29 +05:30
|
|
|
font-size: 18px;
|
2016-01-08 18:44:35 +05:30
|
|
|
color: #aaa;
|
2016-01-09 15:21:29 +05:30
|
|
|
font-family: $font-family-title;
|
2016-01-08 18:44:35 +05:30
|
|
|
padding: 0 10px;
|
|
|
|
|
|
|
|
transition: border-color .25s;
|
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
opacity: 1;
|
|
|
|
color: #444;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
2016-02-13 20:58:47 +05:30
|
|
|
&,
|
2016-01-08 18:44:35 +05:30
|
|
|
~ .formFieldIcon {
|
|
|
|
border-color: #aaa;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
color: #fff;
|
2016-01-09 15:21:29 +05:30
|
|
|
outline: none;
|
2016-01-08 18:44:35 +05:30
|
|
|
|
|
|
|
~ .formFieldIcon {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.formFieldIcon {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: absolute;
|
2016-01-09 19:21:55 +05:30
|
|
|
left: 0;
|
|
|
|
top: 0;
|
2016-01-08 18:44:35 +05:30
|
|
|
height: 50px;
|
|
|
|
width: 50px;
|
|
|
|
line-height: 46px;
|
|
|
|
text-align: center;
|
|
|
|
border: 2px solid lighter($black);
|
|
|
|
color: #444;
|
2016-02-13 20:58:47 +05:30
|
|
|
cursor: default;
|
2016-01-08 18:44:35 +05:30
|
|
|
|
2016-01-09 19:21:55 +05:30
|
|
|
@include form-transition();
|
|
|
|
}
|
|
|
|
|
2016-01-09 19:45:03 +05:30
|
|
|
@include input-theme('green', $green);
|
|
|
|
@include input-theme('blue', $blue);
|
2016-02-13 20:58:47 +05:30
|
|
|
@include input-theme('red', $red);
|
2016-02-26 04:12:20 +05:30
|
|
|
@include input-theme('darkBlue', $dark_blue);
|
2016-02-28 02:56:13 +05:30
|
|
|
@include input-theme('lightViolet', $light_violet);
|
2016-01-09 19:45:03 +05:30
|
|
|
|
2016-01-09 19:21:55 +05:30
|
|
|
|
|
|
|
/**
|
|
|
|
* Checkbox
|
|
|
|
*/
|
2016-01-09 19:45:03 +05:30
|
|
|
@mixin checkbox-theme($themeName, $color) {
|
|
|
|
.#{$themeName}CheckboxRow {
|
|
|
|
composes: checkboxRow;
|
|
|
|
|
|
|
|
.checkboxContainer {
|
|
|
|
&:hover {
|
|
|
|
.checkbox {
|
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkboxInput {
|
|
|
|
&:checked {
|
|
|
|
+ .checkbox {
|
|
|
|
background: $color;
|
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-09 19:21:55 +05:30
|
|
|
.checkboxRow {
|
|
|
|
height: 22px;
|
|
|
|
margin-top: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkboxContainer {
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
padding-left: 27px;
|
|
|
|
|
|
|
|
font-family: $font-family-title;
|
|
|
|
font-size: 16px;
|
|
|
|
line-height: 24px;
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkboxPosition {
|
|
|
|
position: absolute;
|
|
|
|
box-sizing: border-box;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
width: 22px;
|
|
|
|
height: 22px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkboxInput {
|
|
|
|
composes: checkboxPosition;
|
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
&:checked {
|
|
|
|
+ .checkbox {
|
|
|
|
&:before {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.checkbox {
|
|
|
|
composes: checkboxPosition;
|
|
|
|
composes: checkmark from './icons.scss';
|
|
|
|
|
2016-01-10 05:34:44 +05:30
|
|
|
border: 2px #dcd8cd solid;
|
2016-01-09 19:21:55 +05:30
|
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
line-height: 18px;
|
|
|
|
|
|
|
|
@include form-transition();
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity 0.3s;
|
|
|
|
}
|
2016-01-08 18:44:35 +05:30
|
|
|
}
|
2016-01-09 19:45:03 +05:30
|
|
|
|
|
|
|
@include checkbox-theme('green', $green);
|
|
|
|
@include checkbox-theme('blue', $blue);
|
2016-02-13 20:58:47 +05:30
|
|
|
@include checkbox-theme('red', $red);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Form validation
|
|
|
|
*/
|
|
|
|
|
|
|
|
.formTouched .textField:invalid {
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
|
|
&,
|
|
|
|
~ .formFieldIcon {
|
|
|
|
border-color: #3e2727;
|
|
|
|
}
|
|
|
|
|
|
|
|
~ .formFieldIcon {
|
|
|
|
color: #3e2727;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
&,
|
|
|
|
~ .formFieldIcon {
|
|
|
|
border-color: $red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
border-color: $red;
|
|
|
|
|
|
|
|
~ .formFieldIcon {
|
|
|
|
background: $red;
|
|
|
|
border-color: $red;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.formTouched .checkboxInput:invalid {
|
|
|
|
~ .checkbox {
|
|
|
|
border-color: $red;
|
|
|
|
}
|
|
|
|
}
|
2016-04-02 16:28:54 +05:30
|
|
|
|
|
|
|
.isFormLoading {
|
|
|
|
// TODO: надо бы разнести from и input на отдельные модули,
|
|
|
|
// так как в текущем контексте isLoading немного не логичен,
|
|
|
|
// пришлось юзать isFormLoading
|
|
|
|
* {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
button {
|
|
|
|
background-image: url('images/loader_button.gif');
|
|
|
|
background-position: center center;
|
|
|
|
}
|
|
|
|
}
|