@mdsfe/mds-ui
Version:
A set of enterprise-class Vue UI components.
256 lines (255 loc) • 5.78 kB
CSS
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable declaration-bang-space-before */
/* stylelint-disable declaration-bang-space-before */
.mds-radio-group {
display: inline-block;
font-size: 0;
}
.mds-radio-wrapper {
font-size: 14px;
color: #354052;
display: inline-block;
position: relative;
white-space: nowrap;
margin-right: 8px;
cursor: pointer;
}
.mds-radio-wrapper-disabled {
cursor: not-allowed;
}
.mds-radio-wrapper-disabled .mds-radio-wrapper {
cursor: not-allowed;
}
.mds-radio {
white-space: nowrap;
outline: none;
display: inline-block;
position: relative;
line-height: 1;
vertical-align: text-bottom;
cursor: pointer;
}
.mds-radio-wrapper:hover .mds-radio .mds-radio-inner,
.mds-radio:hover .mds-radio-inner,
.mds-radio-focused .mds-radio-inner {
border-color: #0364ff;
}
.mds-radio-checked:after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
border: 1px solid #0364ff;
content: '';
animation: mdsRadioEffect 0.36s ease-in-out;
animation-fill-mode: both;
visibility: hidden;
}
.mds-radio:hover:after,
.mds-radio-wrapper:hover .mds-radio:after {
visibility: visible;
}
.mds-radio-inner {
position: relative;
top: 0;
left: 0;
display: block;
width: 16px;
height: 16px;
border-width: 1px;
border-style: solid;
border-radius: 16px;
border-color: #d9d9d9;
background-color: #fff;
transition: all 0.3s;
}
.mds-radio-inner:after {
position: absolute;
width: 6px;
height: 6px;
left: 4px;
top: 4px;
border-radius: 4px;
display: block;
border-top: 0;
border-left: 0;
content: ' ';
background-color: #0364ff;
opacity: 0;
transform: scale(0);
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
.mds-radio-input {
position: absolute;
left: 0;
z-index: 1;
cursor: pointer;
opacity: 0;
top: 0;
bottom: 0;
right: 0;
}
.mds-radio-checked .mds-radio-inner {
border-color: #0364ff;
}
.mds-radio-checked .mds-radio-inner:after {
transform: scale(1);
opacity: 1;
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
.mds-radio-disabled {
cursor: not-allowed;
}
.mds-radio-disabled .mds-radio-inner {
border-color: #D8DCE6 ;
background-color: #FAFAFD;
}
.mds-radio-disabled .mds-radio-inner:after {
background-color: #D8DCE6;
}
.mds-radio-disabled .mds-radio-input {
cursor: not-allowed;
}
.mds-radio-disabled + span {
color: #aaaaaa;
cursor: not-allowed;
}
span.mds-radio + * {
padding-left: 8px;
padding-right: 8px;
}
.mds-radio-button-wrapper {
margin: 0;
height: 32px;
line-height: 30px;
color: #666666;
display: inline-block;
transition: all 0.3s ease;
cursor: pointer;
border: 1px solid #D8DCE6;
border-left: 0;
background: #fff;
padding: 0 16px;
position: relative;
font-size: 14px;
color: #354052;
}
.mds-radio-button-wrapper a {
color: #666666;
}
.mds-radio-button-wrapper > .mds-radio-button {
margin-left: 0;
display: block;
width: 0;
height: 0;
}
.mds-radio-group-large .mds-radio-button-wrapper {
height: 40px;
line-height: 38px;
}
.mds-radio-group-small .mds-radio-button-wrapper {
height: 32px;
line-height: 30px;
padding: 0 12px;
}
.mds-radio-group-small .mds-radio-button-wrapper:first-child {
border-radius: 2px 0 0 2px;
}
.mds-radio-group-small .mds-radio-button-wrapper:last-child {
border-radius: 0 2px 2px 0;
}
.mds-radio-button-wrapper:not(:first-child)::before {
content: "";
display: block;
top: 0;
left: -1px;
width: 1px;
height: 100%;
position: absolute;
background-color: #d9d9d9;
}
.mds-radio-button-wrapper:first-child {
border-radius: 4px 0 0 4px;
border-left: 1px solid #d9d9d9;
}
.mds-radio-button-wrapper:last-child {
border-radius: 0 4px 4px 0;
}
.mds-radio-button-wrapper:first-child:last-child {
border-radius: 4px;
}
.mds-radio-button-wrapper:hover,
.mds-radio-button-wrapper-focused {
color: #0364FF;
position: relative;
background: rgba(23, 112, 255, 0.1);
}
.mds-radio-button-wrapper .mds-radio-inner,
.mds-radio-button-wrapper input[type="checkbox"],
.mds-radio-button-wrapper input[type="radio"] {
opacity: 0;
filter: alpha(opacity=0);
width: 0;
height: 0;
}
.mds-radio-button-wrapper-checked {
background: #fff;
border-color: #0364FF;
color: #0364FF;
box-shadow: -1px 0 0 0 #0364FF;
z-index: 1;
}
.mds-radio-button-wrapper-checked::before {
background-color: #0364FF ;
opacity: 0.1;
}
.mds-radio-button-wrapper-checked:first-child {
border-color: #0364FF;
box-shadow: none ;
}
.mds-radio-button-wrapper-checked:hover {
border-color: #0364FF;
box-shadow: -1px 0 0 0 #0364FF;
color: #0364FF;
}
.mds-radio-button-wrapper-checked:active {
border-color: #0364FF;
box-shadow: -1px 0 0 0 #0364FF;
color: #0364FF;
}
.mds-radio-button-wrapper-disabled {
border-color: #d9d9d9;
background-color: #f7f7f7;
cursor: not-allowed;
color: rgba(0, 0, 0, 0.2);
}
.mds-radio-button-wrapper-disabled:first-child,
.mds-radio-button-wrapper-disabled:hover {
border-color: #d9d9d9;
background-color: #f7f7f7;
color: rgba(0, 0, 0, 0.2);
}
.mds-radio-button-wrapper-disabled:first-child {
border-left-color: #d9d9d9;
}
.mds-radio-button-wrapper-disabled.mds-radio-button-wrapper-checked {
color: #fff;
background-color: #e6e6e6;
border-color: #d9d9d9;
box-shadow: none;
}
@keyframes mdsRadioEffect {
0% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.6);
opacity: 0;
}
}
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable declaration-bang-space-before */
/* stylelint-disable declaration-bang-space-before */