2019-06-13 19:17:41 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2019-06-25 17:07:54 +08:00
|
|
|
@import './theme/default.scss';
|
2019-06-13 19:17:41 +08:00
|
|
|
|
|
|
|
@include b(checkbox) {
|
|
|
|
& {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-06-20 12:46:29 +08:00
|
|
|
.n-checkbox__label {
|
|
|
|
font-size: 13px;
|
2019-06-25 17:07:54 +08:00
|
|
|
color: #fff;
|
2019-06-20 12:46:29 +08:00
|
|
|
margin-left: 6px;
|
2019-06-13 19:17:41 +08:00
|
|
|
}
|
2019-06-28 15:08:31 +08:00
|
|
|
.n-checkbox__checkbox {
|
|
|
|
height: 14px;
|
|
|
|
width: 14px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
box-shadow: inset 0 0 0 1px $checkbox-border-color;
|
|
|
|
background-color: transparent;
|
|
|
|
border-radius: 4px;
|
|
|
|
position: relative;
|
|
|
|
transition: box-shadow .3s $default-cubic-bezier, background-color .3s $default-cubic-bezier;
|
|
|
|
&:hover {
|
|
|
|
box-shadow: inset 0 0 0 1px $checkbox-border-color--active;
|
|
|
|
}
|
|
|
|
&::after {
|
|
|
|
box-sizing: content-box;
|
|
|
|
content: "";
|
|
|
|
border: 1.5px solid #5C647B;
|
|
|
|
border-left: 0;
|
|
|
|
border-top: 0;
|
|
|
|
height: 8px;
|
|
|
|
left: 5px;
|
|
|
|
position: absolute;
|
|
|
|
top: 1px;
|
|
|
|
opacity: 0;
|
|
|
|
transform: rotate(45deg) scale(.5);
|
|
|
|
width: 3px;
|
|
|
|
transform-origin: center;
|
|
|
|
transition: transform .3s $default-cubic-bezier, opacity .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
}
|
2019-06-27 15:17:16 +08:00
|
|
|
&.n-checkbox--checked {
|
|
|
|
.n-checkbox__checkbox {
|
|
|
|
background-color: $checkbox-background--active;
|
2019-07-16 17:18:50 +08:00
|
|
|
box-shadow: inset 0 0 0 1px $checkbox-border-color--active;
|
2019-06-27 15:17:16 +08:00
|
|
|
&::after {
|
|
|
|
opacity: 1;
|
|
|
|
transform: rotate(45deg) scale(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&.n-checkbox--disabled {
|
|
|
|
.n-checkbox__checkbox {
|
|
|
|
cursor: not-allowed;
|
|
|
|
background-color: rgba(255,255,255,.4);
|
|
|
|
&:hover {
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
&::after {
|
|
|
|
border: 1.5px solid rgba(255,255,255,.4);
|
|
|
|
border-left: 0;
|
|
|
|
border-top: 0;
|
|
|
|
}
|
2019-06-13 19:17:41 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|