choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
379 lines (378 loc) • 12.5 kB
CSS
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors */
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
.c7n-pro-checkbox {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
width: 100%;
height: 100%;
cursor: inherit;
opacity: 0;
}
.c7n-pro-checkbox-wrapper {
position: relative;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
line-height: 1.5;
white-space: nowrap;
vertical-align: middle;
outline: none;
cursor: pointer;
}
.c7n-pro-checkbox-invalid .c7n-pro-checkbox-inner {
border-color: #d50000;
}
.c7n-pro-checkbox:disabled {
cursor: not-allowed;
pointer-events: none;
}
.c7n-pro-checkbox-disabled {
cursor: not-allowed;
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label {
padding: 0;
overflow: hidden;
color: inherit;
font-weight: 400;
line-height: 0.34rem;
white-space: nowrap;
text-overflow: ellipsis;
vertical-align: middle;
-webkit-transform-origin: inherit;
-ms-transform-origin: inherit;
transform-origin: inherit;
-webkit-transition: inherit;
transition: inherit;
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label-wrapper {
position: absolute;
top: 0;
left: 0.1rem;
max-width: 98%;
height: 0;
margin-left: -0.05rem;
padding: 0 0.05rem;
border-top: 0.02rem solid #fff;
-webkit-transform-origin: 0.1rem -230%;
-ms-transform-origin: 0.1rem -230%;
transform-origin: 0.1rem -230%;
-webkit-transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label::after {
width: 0;
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label.c7n-pro-field-required::after {
display: inline-block;
width: 0.08rem;
margin-left: 0.04rem;
color: #d50000;
font-family: SimSun, sans-serif;
line-height: 1;
vertical-align: middle;
content: '*';
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-focused .c7n-pro-field-label {
color: #3f51b5;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-invalid .c7n-pro-field-label {
color: #d50000;
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label-wrapper,
.c7n-pro-checkbox-float-label .c7n-pro-checkbox:focus + .c7n-pro-field-label-wrapper {
-webkit-transform: scaleX(0.8);
-ms-transform: scaleX(0.8);
transform: scaleX(0.8);
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox:-webkit-autofill + .c7n-pro-field-label-wrapper {
-webkit-transform: scaleX(0.8);
transform: scaleX(0.8);
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label,
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-focused .c7n-pro-field-label {
font-weight: 500;
font-size: 0.15rem;
-webkit-transform: scaleY(0.8);
-ms-transform: scaleY(0.8);
transform: scaleY(0.8);
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox:-webkit-autofill + .c7n-pro-field-label-wrapper .c7n-pro-field-label {
font-weight: 500;
font-size: 0.15rem;
-webkit-transform: scaleY(0.8);
transform: scaleY(0.8);
}
.c7n-pro-checkbox-float-label:not(.c7n-pro-checkbox-empty) .c7n-pro-field-label,
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-focused .c7n-pro-field-label {
padding: 0rem;
line-height: 0.34rem;
background-color: unset;
}
.c7n-pro-checkbox-float-label:not(.c7n-pro-checkbox-multiple) .c7n-pro-checkbox {
height: 0.36rem;
border-radius: 0.05rem;
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox {
min-height: 0.36rem;
border-radius: 0.05rem;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-sm:not(.c7n-pro-checkbox-multiple) .c7n-pro-checkbox {
height: 0.3rem;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-sm .c7n-pro-field-label {
line-height: 0.28rem;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-lg:not(.c7n-pro-checkbox-multiple) .c7n-pro-checkbox {
height: 0.4rem;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-lg .c7n-pro-field-label {
line-height: 0.38rem;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-lg:not(.c7n-pro-checkbox-multiple) textarea.c7n-pro-checkbox,
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-sm:not(.c7n-pro-checkbox-multiple) textarea.c7n-pro-checkbox,
.c7n-pro-checkbox-float-label:not(.c7n-pro-checkbox-multiple) textarea.c7n-pro-checkbox,
.c7n-pro-checkbox-float-label textarea.c7n-pro-checkbox {
height: auto;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-required-colors {
background-color: #fff;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-invalid {
background-color: #fff;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-disabled {
background-color: #fff;
}
.c7n-pro-checkbox-float-label.c7n-pro-checkbox-required .c7n-pro-field-label::after {
width: 0.08rem;
}
.c7n-pro-checkbox-empty:not(.c7n-pro-checkbox-focused) .c7n-pro-field-label {
font-weight: inherit;
font-size: inherit;
-webkit-transform: none;
-ms-transform: none;
transform: none;
pointer-events: none;
}
.c7n-pro-checkbox-empty:not(.c7n-pro-checkbox-focused) .c7n-pro-field-label-wrapper {
border-top-color: transparent;
-webkit-transform: none;
-ms-transform: none;
transform: none;
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox > ul {
margin: 0 0 0 0.03rem;
padding: 0.07rem 0;
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox > ul > li {
height: 0.2rem;
margin-top: 0.01rem;
margin-bottom: 0.01rem;
line-height: 0.2rem;
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox-multiple-block {
padding: 0 0.02rem 0 0.08rem;
border-radius: 0.12rem;
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox-multiple-block .icon {
color: rgba(255, 255, 255, 0.72);
font-size: 0.16rem;
line-height: 0.2rem;
vertical-align: top;
}
.c7n-pro-checkbox-float-label .c7n-pro-checkbox-multiple-block .icon:hover {
color: inherit;
}
.c7n-pro-checkbox-prefix-button.c7n-pro-checkbox-float-label .c7n-pro-field-label-wrapper {
left: 0.24rem;
}
.c7n-pro-checkbox-float-label {
padding-top: 0.07rem;
}
.c7n-pro-checkbox-wrapper,
.c7n-pro-checkbox-wrapper.c7n-pro-field {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
width: auto;
}
.c7n-pro-checkbox-wrapper > .icon-help,
.c7n-pro-checkbox-wrapper.c7n-pro-field > .icon-help {
margin-left: 0.04rem;
color: rgba(0, 0, 0, 0.45);
font-size: 0.16rem;
}
.c7n-pro-checkbox-inner {
position: relative;
display: inline-block;
width: 0.16rem;
height: 0.16rem;
font-size: 0.13rem ;
vertical-align: middle;
background-color: #fff;
border: 0.02rem solid rgba(0, 0, 0, 0.65);
border-radius: 0.02rem;
border-collapse: separate;
-webkit-transition: border-color 90ms cubic-bezier(0, 0, 0.2, 0.1), background-color 90ms cubic-bezier(0, 0, 0.2, 0.1);
transition: border-color 90ms cubic-bezier(0, 0, 0.2, 0.1), background-color 90ms cubic-bezier(0, 0, 0.2, 0.1);
}
.c7n-pro-checkbox-inner::after {
position: absolute;
top: calc((0.16rem - calc((0.16rem / 14) * 10)) / 2 - 3 * (0.16rem / 14));
display: table;
width: calc((0.16rem / 14) * 5);
height: calc((0.16rem / 14) * 10);
border: 0.02rem solid #fff;
border-top: 0;
border-left: 0;
border-spacing: 0;
-webkit-transform: rotate(45deg) scale(0);
-ms-transform: rotate(45deg) scale(0);
transform: rotate(45deg) scale(0);
-webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6);
transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6);
content: ' ';
left: calc((0.16rem - calc((0.16rem / 14) * 5)) / 2 - 1.5 * (0.16rem / 14));
}
.c7n-pro-checkbox-inner + span {
padding-right: 0.08rem;
padding-left: 0.08rem;
vertical-align: middle;
}
.c7n-pro-checkbox:hover:not(:checked) + .c7n-pro-checkbox-inner,
.c7n-pro-checkbox-wrapper:hover .c7n-pro-checkbox:not(:checked) + .c7n-pro-checkbox-inner {
border-color: #3f51b5;
}
.c7n-pro-checkbox:focus + .c7n-pro-checkbox-inner {
border-color: #3f51b5;
-webkit-box-shadow: 0 0 0rem 0.02rem rgba(63, 81, 181, 0.2);
box-shadow: 0 0 0rem 0.02rem rgba(63, 81, 181, 0.2);
}
.c7n-pro-checkbox:checked + .c7n-pro-checkbox-inner,
.c7n-pro-checkbox-indeterminate .c7n-pro-checkbox-inner {
border-color: #3f51b5;
}
.c7n-pro-checkbox:checked + .c7n-pro-checkbox-inner::after,
.c7n-pro-checkbox-indeterminate .c7n-pro-checkbox-inner::after {
-webkit-transform: rotate(45deg) scale(1);
-ms-transform: rotate(45deg) scale(1);
transform: rotate(45deg) scale(1);
opacity: 1;
}
.c7n-pro-checkbox.c7n-pro-checkbox:checked + .c7n-pro-checkbox-inner {
background-color: #3f51b5 ;
}
.c7n-pro-checkbox.c7n-pro-checkbox:hover:checked + .c7n-pro-checkbox-inner,
.c7n-pro-checkbox-indeterminate:hover .c7n-pro-checkbox + .c7n-pro-checkbox-inner,
.c7n-pro-checkbox.c7n-pro-checkbox:focus:checked + .c7n-pro-checkbox-inner {
background-color: #3f51b5;
border-color: #3f51b5;
}
.c7n-pro-checkbox-indeterminate .c7n-pro-checkbox + .c7n-pro-checkbox-inner {
background-color: #3f51b5 ;
}
.c7n-pro-checkbox-indeterminate .c7n-pro-checkbox + .c7n-pro-checkbox-inner::after {
position: absolute;
top: calc((0.16rem - calc((0.16rem / 16) * 1) - 0.02rem * 2) / 2);
left: calc((0.16rem - calc((0.16rem / 16) * 8) - 0.02rem * 2) / 2);
width: calc((0.16rem / 16) * 8);
height: calc((0.16rem / 16) * 1);
border-color: #fff;
-webkit-transform: scale(1) ;
-ms-transform: scale(1) ;
transform: scale(1) ;
content: ' ';
}
.c7n-pro-checkbox.c7n-pro-checkbox:disabled + .c7n-pro-checkbox-inner {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5 ;
background-clip: content-box;
border-color: rgba(0, 0, 0, 0.25) ;
}
.c7n-pro-checkbox.c7n-pro-checkbox:disabled + .c7n-pro-checkbox-inner::after {
border-color: rgba(0, 0, 0, 0.25) ;
}
.c7n-pro-checkbox.c7n-pro-checkbox:disabled:checked + .c7n-pro-checkbox-inner,
.c7n-pro-checkbox-indeterminate .c7n-pro-checkbox:disabled + .c7n-pro-checkbox-inner {
color: rgba(0, 0, 0, 0.25);
background-color: #f5f5f5 ;
border-color: rgba(0, 0, 0, 0.25) ;
}
.c7n-pro-checkbox.c7n-pro-checkbox:disabled:checked + .c7n-pro-checkbox-inner::after,
.c7n-pro-checkbox-indeterminate .c7n-pro-checkbox:disabled + .c7n-pro-checkbox-inner::after {
border-color: rgba(0, 0, 0, 0.25) ;
}
.c7n-pro-checkbox-label {
display: inline-block;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.c7n-pro-checkbox-label + .icon.icon-help {
margin-left: 0;
}
.c7n-pro-checkbox-button {
min-width: unset;
padding: 0 0.15rem;
line-height: 0.3rem;
text-align: center;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox-inner {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: auto;
height: auto;
border-radius: 0.02rem;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox-inner::after {
display: none;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox-inner + span {
position: relative;
z-index: 1;
padding: 0;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox:checked + .c7n-pro-checkbox-inner {
background-color: #3f51b5 ;
border-color: #3f51b5;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox:checked + .c7n-pro-checkbox-inner + span {
color: #ffffff;
}
.c7n-pro-checkbox-button:hover .c7n-pro-checkbox:not(:disabled):not(:checked) + .c7n-pro-checkbox-inner + span {
color: #3f51b5;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox:disabled + .c7n-pro-checkbox-inner + span {
color: rgba(0, 0, 0, 0.25);
}
.c7n-pro-checkbox-button .c7n-pro-checkbox:checked:disabled + .c7n-pro-checkbox-inner {
background-color: rgba(63, 81, 181, 0.6) ;
border-color: rgba(63, 81, 181, 0.6) ;
}
.c7n-pro-checkbox-button .c7n-pro-checkbox:checked:disabled + .c7n-pro-checkbox-inner + span {
color: #ffffff;
}
.c7n-pro-checkbox-button + .c7n-pro-checkbox-button {
margin-left: 0.1rem;
}
.c7n-pro-checkbox-float-label .c7n-pro-field-label-wrapper {
left: 0;
-webkit-transform-origin: 0.1rem -330%;
-ms-transform-origin: 0.1rem -330%;
transform-origin: 0.1rem -330%;
}