acud
Version:
acg react 组件库
520 lines (519 loc) • 13.8 kB
CSS
/* color */
/* 默认颜色 */
/* 通用-icon */
/* 标签 */
/* 默认颜色 */
/* 其他颜色 */
/* 通用 */
/* 水平 */
/* 垂直 */
/* 序号水平 */
/* 序号垂直 */
@keyframes acudCheckboxEffect {
0% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.6);
opacity: 0;
}
}
.acud-checkbox {
margin: 0;
padding: 0;
display: flex;
position: relative;
line-height: 1;
top: 0;
white-space: nowrap;
outline: none;
cursor: pointer;
}
.acud-checkbox-wrapper:hover .acud-checkbox-inner,
.acud-checkbox:hover .acud-checkbox-inner {
border-color: #2468F2;
}
.acud-checkbox:active .acud-checkbox-inner {
border-color: #144BCC;
}
.acud-checkbox:hover::after,
.acud-checkbox-wrapper:hover .acud-checkbox::after {
visibility: visible;
}
.acud-checkbox-inner {
position: relative;
display: inline-flex;
width: 16px;
height: 16px;
direction: ltr;
background-color: #FFFFFF;
border: 1px solid #E8E9EB;
border-radius: 0px;
border-collapse: separate;
border-radius: 2px;
}
.acud-checkbox-input {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
width: 16px;
height: 16px;
cursor: pointer;
opacity: 0;
}
.acud-checkbox-checked .acud-checkbox-inner {
background-color: #2468F2;
border-color: #2468F2;
}
.acud-checkbox-checked .acud-checkbox-inner .checkbox-check-icon {
color: #FFFFFF;
width: 14px;
height: 14px;
}
.acud-checkbox-checked:hover .acud-checkbox-inner {
background-color: #528EFF;
border-color: #528EFF;
}
.acud-checkbox-checked:hover .acud-checkbox-inner .checkbox-check-icon {
color: #FFFFFF;
width: 14px;
height: 14px;
}
.acud-checkbox-checked:active .acud-checkbox-inner {
background-color: #144BCC;
border-color: #144BCC;
}
.acud-checkbox-checked:active .acud-checkbox-inner .checkbox-check-icon {
color: #FFFFFF;
width: 14px;
height: 14px;
}
.acud-checkbox.acud-checkbox-checked + span {
color: #151B26;
}
.acud-checkbox.acud-checkbox-checked + span:hover {
color: #151B26;
}
.acud-checkbox.acud-checkbox-disabled {
cursor: not-allowed;
}
.acud-checkbox.acud-checkbox-disabled.acud-checkbox-checked .acud-checkbox-inner {
background-color: #7DADFF;
border-color: #7DADFF;
}
.acud-checkbox.acud-checkbox-disabled.acud-checkbox-checked .acud-checkbox-inner .checkbox-check-icon {
color: #FFFFFF;
}
.acud-checkbox.acud-checkbox-disabled.acud-checkbox-checked .acud-checkbox-inner::after {
border-color: #7DADFF;
animation-name: none;
}
.acud-checkbox.acud-checkbox-disabled .acud-checkbox-input {
cursor: not-allowed;
}
.acud-checkbox.acud-checkbox-disabled .acud-checkbox-inner {
background-color: #F7F7F9;
border-color: #E8E9EB;
}
.acud-checkbox.acud-checkbox-disabled .acud-checkbox-inner .checkbox-check-icon {
color: #B8BABF;
}
.acud-checkbox.acud-checkbox-disabled + span {
color: #B8BABF;
cursor: not-allowed;
}
.acud-checkbox.acud-checkbox-disabled + span:hover {
color: #B8BABF;
}
.acud-checkbox.acud-checkbox-disabled:hover::after,
.acud-checkbox-wrapper:hover .acud-checkbox.acud-checkbox-disabled::after {
visibility: hidden;
}
.acud-checkbox-wrapper {
margin: 0;
padding: 0;
display: flex;
align-items: center;
line-height: unset;
cursor: pointer;
}
.acud-checkbox-wrapper::after {
display: inline-block;
width: 0;
overflow: hidden;
content: "\a0";
}
.acud-checkbox-wrapper.acud-checkbox-wrapper-disabled {
cursor: not-allowed;
}
.acud-checkbox-wrapper + .acud-checkbox-wrapper {
margin-left: 8px;
}
.acud-checkbox + span {
padding-right: 8px;
padding-left: 8px;
color: #151B26;
}
.acud-checkbox + span:hover {
color: #151B26;
}
.acud-checkbox-group {
margin: 0;
padding: 0;
display: inline-flex;
vertical-align: middle;
}
.acud-checkbox-group-item {
margin-right: 16px;
}
.acud-checkbox-group-item:last-child {
margin-right: 0;
}
.acud-checkbox-group-item + .acud-checkbox-group-item {
margin-left: 0;
}
.acud-checkbox-indeterminate .acud-checkbox-inner {
background-color: #FFFFFF;
border-color: #2468F2;
}
.acud-checkbox-indeterminate .acud-checkbox-inner::after {
position: absolute;
display: table;
top: 50%;
left: 50%;
width: 8px;
height: 8px;
background-color: #2468F2;
border: 0;
transform: translate(-50%, -50%) scale(1);
opacity: 1;
content: ' ';
}
.acud-checkbox-indeterminate.acud-checkbox-disabled .acud-checkbox-inner {
background-color: #FFFFFF;
border-color: #7DADFF;
}
.acud-checkbox-indeterminate.acud-checkbox-disabled .acud-checkbox-inner::after {
background-color: #7DADFF;
}
.acud-checkbox-indeterminate:active .acud-checkbox-inner {
background-color: #FFFFFF;
border-color: #144BCC;
}
.acud-checkbox-indeterminate:hover .acud-checkbox-inner {
background-color: #FFFFFF;
border-color: #7DADFF;
}
.acud-checkbox-indeterminate:hover .acud-checkbox-inner::after {
background-color: #7DADFF;
}
.acud-checkbox-button {
min-width: 80px;
text-align: center;
height: 32px;
line-height: 30px;
padding-left: 12px;
padding-right: 12px;
font-size: 12px;
border: 1px solid;
border-radius: 4px;
cursor: pointer;
position: relative;
display: inline-block;
color: #151B26;
background-color: #FFFFFF;
border-color: #E8E9EB;
}
.acud-checkbox-button .acud-checkbox-button-checked-flag {
border-top-left-radius: 2px;
}
.acud-checkbox-button:hover {
color: #2468F2;
}
.acud-checkbox-button:focus,
.acud-checkbox-button:active {
color: #144BCC;
}
.acud-checkbox-button[disabled],
.acud-checkbox-button[aria-disabled="true"],
.acud-checkbox-button[disabled]:hover,
.acud-checkbox-button[aria-disabled="true"]:hover,
.acud-checkbox-button[disabled]:focus,
.acud-checkbox-button[aria-disabled="true"]:focus,
.acud-checkbox-button[disabled]:active,
.acud-checkbox-button[aria-disabled="true"]:active {
color: #B8BABF;
}
.acud-checkbox-button:hover {
background-color: #FFFFFF;
}
.acud-checkbox-button:focus,
.acud-checkbox-button:active {
background-color: #FFFFFF;
}
.acud-checkbox-button[disabled],
.acud-checkbox-button[aria-disabled="true"],
.acud-checkbox-button[disabled]:hover,
.acud-checkbox-button[aria-disabled="true"]:hover,
.acud-checkbox-button[disabled]:focus,
.acud-checkbox-button[aria-disabled="true"]:focus,
.acud-checkbox-button[disabled]:active,
.acud-checkbox-button[aria-disabled="true"]:active {
background-color: #F7F7F9;
}
.acud-checkbox-button:hover {
border-color: #2468F2;
}
.acud-checkbox-button:focus,
.acud-checkbox-button:active {
border-color: #144BCC;
}
.acud-checkbox-button[disabled],
.acud-checkbox-button[aria-disabled="true"],
.acud-checkbox-button[disabled]:hover,
.acud-checkbox-button[aria-disabled="true"]:hover,
.acud-checkbox-button[disabled]:focus,
.acud-checkbox-button[aria-disabled="true"]:focus,
.acud-checkbox-button[disabled]:active,
.acud-checkbox-button[aria-disabled="true"]:active {
border-color: #E8E9EB;
}
.acud-checkbox-button-checked {
color: #2468F2;
background-color: #FFFFFF;
border-color: #2468F2;
background-color: #EEF3FE;
}
.acud-checkbox-button-checked:hover {
color: #528EFF;
}
.acud-checkbox-button-checked:focus,
.acud-checkbox-button-checked:active {
color: #144BCC;
}
.acud-checkbox-button-checked[disabled],
.acud-checkbox-button-checked[aria-disabled="true"],
.acud-checkbox-button-checked[disabled]:hover,
.acud-checkbox-button-checked[aria-disabled="true"]:hover,
.acud-checkbox-button-checked[disabled]:focus,
.acud-checkbox-button-checked[aria-disabled="true"]:focus,
.acud-checkbox-button-checked[disabled]:active,
.acud-checkbox-button-checked[aria-disabled="true"]:active {
color: #84868C;
}
.acud-checkbox-button-checked:hover {
background-color: #FFFFFF;
}
.acud-checkbox-button-checked:focus,
.acud-checkbox-button-checked:active {
background-color: #FFFFFF;
}
.acud-checkbox-button-checked[disabled],
.acud-checkbox-button-checked[aria-disabled="true"],
.acud-checkbox-button-checked[disabled]:hover,
.acud-checkbox-button-checked[aria-disabled="true"]:hover,
.acud-checkbox-button-checked[disabled]:focus,
.acud-checkbox-button-checked[aria-disabled="true"]:focus,
.acud-checkbox-button-checked[disabled]:active,
.acud-checkbox-button-checked[aria-disabled="true"]:active {
background-color: #F7F7F9;
}
.acud-checkbox-button-checked:hover {
border-color: #528EFF;
}
.acud-checkbox-button-checked:focus,
.acud-checkbox-button-checked:active {
border-color: #144BCC;
}
.acud-checkbox-button-checked[disabled],
.acud-checkbox-button-checked[aria-disabled="true"],
.acud-checkbox-button-checked[disabled]:hover,
.acud-checkbox-button-checked[aria-disabled="true"]:hover,
.acud-checkbox-button-checked[disabled]:focus,
.acud-checkbox-button-checked[aria-disabled="true"]:focus,
.acud-checkbox-button-checked[disabled]:active,
.acud-checkbox-button-checked[aria-disabled="true"]:active {
border-color: #E8E9EB;
}
.acud-checkbox-button-checked .acud-checkbox-button-checked-flag {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
border-top: 7px solid #2468F2;
border-left: 7px solid #2468F2;
border-right: 7px solid transparent;
border-bottom: 7px solid transparent;
}
.acud-checkbox-button-checked:hover {
border-color: #528EFF;
background-color: #EEF3FE;
}
.acud-checkbox-button-checked:hover .acud-checkbox-button-checked-flag {
border-top: 7px solid #528EFF;
border-left: 7px solid #528EFF;
}
.acud-checkbox-button-checked:active {
background-color: #EEF3FE;
border-color: #144BCC;
}
.acud-checkbox-button-checked:active .acud-checkbox-button-checked-flag {
border-top: 7px solid #144BCC;
border-left: 7px solid #144BCC;
}
.acud-checkbox-button-checked .acud-checkbox-button-checked-icon {
position: absolute;
top: 0;
left: 0;
line-height: 14px;
font-size: 12px;
color: #FFFFFF;
transform: translate(-1px, -2px) scale(0.6);
}
.acud-checkbox-button-checked.acud-checkbox-button-disabled {
background-color: #FFFFFF;
border-color: #7DADFF;
color: #7DADFF;
}
.acud-checkbox-button-checked.acud-checkbox-button-disabled .acud-checkbox-button-checked-flag {
border-top: 7px solid #7DADFF;
border-left: 7px solid #7DADFF;
}
.acud-checkbox-button-checked.acud-checkbox-button-disabled:hover {
background-color: #FFFFFF;
border-color: #7DADFF;
color: #7DADFF;
}
.acud-checkbox-button-checked.acud-checkbox-button-disabled:hover .acud-checkbox-button-checked-flag {
border-top: 7px solid #7DADFF;
border-left: 7px solid #7DADFF;
}
.acud-checkbox-button-disabled {
cursor: not-allowed;
}
.acud-checkbox-button-disabled .acud-checkbox-button-checked-flag {
border-top: 7px solid #E8E9EB;
border-left: 7px solid #E8E9EB;
}
.acud-checkbox-button-disabled:hover .acud-checkbox-button-checked-flag {
border-top: 7px solid #E8E9EB;
border-left: 7px solid #E8E9EB;
}
.acud-checkbox-button-disabled .acud-checkbox-button-checked-icon {
color: #FFFFFF;
}
.acud-checkbox-button-group-item {
border-radius: 0;
border-width: 1px 0;
}
.acud-checkbox-button-group-item .acud-checkbox-button-checked-flag {
border-top-left-radius: 0;
}
.acud-checkbox-button-group-item::before {
box-sizing: content-box;
content: "";
display: block;
height: 32px;
left: -1px;
position: absolute;
top: -1px;
width: 1px;
background-color: #E8E9EB;
z-index: 0;
}
.acud-checkbox-button-group-item::after {
box-sizing: content-box;
content: "";
display: block;
height: 32px;
right: 0;
position: absolute;
top: -1px;
width: 1px;
background-color: #E8E9EB;
z-index: 0;
}
.acud-checkbox-button-group-item:first-child {
border-left-width: 1px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.acud-checkbox-button-group-item:first-child.acud-checkbox-button-group-item:first-child::before {
display: none;
}
.acud-checkbox-button-group-item:first-child .acud-checkbox-button-checked-flag {
border-top-left-radius: 2px;
}
.acud-checkbox-button-group-item:last-child {
border-right-width: 1px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.acud-checkbox-button-group-item:last-child.acud-checkbox-button-group-item:last-child::after {
display: none;
}
.acud-checkbox-button-group-item:hover::before {
background-color: #2468F2;
z-index: 4;
}
.acud-checkbox-button-group-item:hover::after {
background-color: #2468F2;
z-index: 4;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked::before {
background-color: #2468F2;
z-index: 3;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked::after {
background-color: #2468F2;
z-index: 3;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked:hover::before {
background-color: #528EFF;
z-index: 5;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked:hover::after {
background-color: #528EFF;
z-index: 5;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked:active::before {
background-color: #144BCC;
z-index: 5;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked:active::after {
background-color: #144BCC;
z-index: 5;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked.acud-checkbox-button-disabled::before {
background-color: #7DADFF;
z-index: 2;
}
.acud-checkbox-button-group-item.acud-checkbox-button-checked.acud-checkbox-button-disabled::after {
background-color: #7DADFF;
z-index: 2;
}
.acud-checkbox-button-group-item.acud-checkbox-button-disabled::before {
background-color: #E8E9EB;
z-index: 1;
}
.acud-checkbox-button-group-item.acud-checkbox-button-disabled::after {
background-color: #E8E9EB;
z-index: 1;
}
@media (-webkit-device-pixel-ratio: 1.5) {
.acud-checkbox-button-group-item::before {
width: 0.5px;
top: -0.5px;
left: -0.5px;
}
.acud-checkbox-button-group-item::after {
width: 0.5px;
top: -0.5px;
right: 0;
}
}