chowa
Version:
UI component library based on React
294 lines (255 loc) • 7.22 kB
CSS
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.cw-zoom-appear {
animation-timing-function: ease-in-out;
animation-duration: 0.2s; }
@keyframes cw-zoom-vertical {
0% {
transform: scaleY(0);
opacity: 0; }
100% {
transform: scaleY(1);
opacity: 1; } }
.cw-zoom-top-enter {
transform-origin: bottom;
animation-name: cw-zoom-vertical; }
.cw-zoom-top-leave {
transform-origin: bottom;
animation-name: cw-zoom-vertical;
animation-direction: reverse; }
.cw-zoom-bottom-enter {
transform-origin: top;
animation-name: cw-zoom-vertical; }
.cw-zoom-bottom-leave {
transform-origin: top;
animation-name: cw-zoom-vertical;
animation-direction: reverse; }
.cw-zoom-appear {
animation-timing-function: ease-in-out;
animation-duration: 0.2s; }
@keyframes cw-zoom-horizontal {
0% {
transform: scaleX(0);
opacity: 0; }
100% {
transform: scaleX(1);
opacity: 1; } }
.cw-zoom-left-enter {
transform-origin: right;
animation-name: cw-zoom-horizontal; }
.cw-zoom-left-leave {
transform-origin: right;
animation-name: cw-zoom-horizontal;
animation-direction: reverse; }
.cw-zoom-right-enter {
transform-origin: left;
animation-name: cw-zoom-horizontal; }
.cw-zoom-right-leave {
transform-origin: left;
animation-name: cw-zoom-horizontal;
animation-direction: reverse; }
.cw-dropdown-btn {
border-color: transparent;
color: #616a6e;
background-color: #fff;
margin: 0;
height: 32px;
line-height: 30px;
font-size: 14px;
padding: 0 15px;
margin: 0;
outline: none;
border-width: 1px;
border-style: solid;
transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
display: inline-block;
border-radius: 3px;
text-align: center;
white-space: nowrap;
box-sizing: border-box;
cursor: pointer; }
.cw-dropdown-btn:not(.cw-dropdown-btn-disabled).cw-dropdown-btn-open, .cw-dropdown-btn:not(.cw-dropdown-btn-disabled):hover {
color: #7774e7; }
.cw-dropdown-btn + .cw-dropdown-btn {
margin-left: 16px; }
.cw-dropdown-btn-icon {
margin: 0 0 0 6px;
padding: 0;
box-sizing: border-box;
display: inline-block;
transition: all 0.2s linear;
height: 100%; }
.cw-dropdown-btn-icon-active {
transform: rotate(-180deg); }
.cw-dropdown-btn-bordered {
border-color: #e6ecf5; }
.cw-dropdown-btn-bordered:not(.cw-dropdown-btn-disabled).cw-dropdown-btn-open, .cw-dropdown-btn-bordered:not(.cw-dropdown-btn-disabled):hover {
border-color: #7774e7; }
.cw-dropdown-btn-bordered.cw-dropdown-btn-disabled {
background-color: #e9ecef; }
.cw-dropdown-btn-disabled {
cursor: not-allowed;
color: #888da8; }
.cw-dropdown-btn-large {
height: 38px;
line-height: 36px;
font-size: 16px;
padding: 0 18px; }
.cw-dropdown-btn-small {
height: 26px;
line-height: 24px;
font-size: 12px;
padding: 0 15px; }
.cw-dropdown-menu {
margin: 0;
padding: 8px 0;
list-style: none;
max-height: 250px;
min-width: 140px; }
.cw-dropdown-menu .cw-divider {
margin: 5px 0; }
.cw-dropdown-menu-item {
color: #616a6e;
margin: 0;
transition: all 0.2s ease-in;
cursor: pointer;
padding: 6px 12px;
font-size: 14px;
line-height: 1.5; }
.cw-dropdown-menu-item a {
color: #616a6e;
display: block; }
.cw-dropdown-menu-item:not(.cw-dropdown-menu-disabled):not(.cw-dropdown-menu-active):hover {
background-color: #f7f6fe; }
.cw-dropdown-submenu {
position: relative;
margin: 0;
padding: 0;
box-sizing: border-box;
cursor: pointer; }
.cw-dropdown-submenu:not(.cw-dropdown-menu-disabled) .cw-dropdown-menu-title:hover {
background-color: #f7f6fe; }
.cw-dropdown-submenu.cw-dropdown-submenu-disabled .cw-dropdown-submenu-title {
cursor: not-allowed;
opacity: 0.6; }
.cw-dropdown-menu-title {
display: flex;
align-items: center;
justify-content: space-between;
transition: all 0.2s ease-in;
color: #616a6e;
margin: 0;
padding: 6px 12px;
font-size: 14px;
box-sizing: border-box;
line-height: 1.5; }
.cw-dropdown-menu-title span {
flex: auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.cw-dropdown-menu-title .cw-icon {
flex: none;
margin-left: 10px; }
.cw-dropdown-submenu-content {
min-width: 100%;
position: absolute;
top: 0;
left: 100%;
margin: 0 0 0 2px;
padding: 0;
box-sizing: border-box;
white-space: nowrap; }
.cw-dropdown-menu-active:not(.cw-dropdown-menu-disabled) {
background-color: #f8f8f8;
cursor: default; }
.cw-dropdown-menu-disabled {
background-color: #e9ecef;
cursor: not-allowed;
color: #888da8; }
.cw-dropdown {
margin: 0;
padding: 0;
box-sizing: border-box; }
.cw-dropdown-content {
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
border-radius: 3px; }
.cw-dropdown-arrow {
width: 8px;
height: 8px;
background: #fff;
transform: rotate(45deg);
display: inline-block;
position: absolute; }
.cw-dropdown-top,
.cw-dropdown-top-left,
.cw-dropdown-top-right {
padding-bottom: 5px;
transform-origin: bottom; }
.cw-dropdown-top .cw-dropdown-arrow,
.cw-dropdown-top-left .cw-dropdown-arrow,
.cw-dropdown-top-right .cw-dropdown-arrow {
box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.15);
bottom: 1px;
margin-left: -5px; }
.cw-dropdown-bottom,
.cw-dropdown-bottom-left,
.cw-dropdown-bottom-right {
padding-top: 5px;
transform-origin: top; }
.cw-dropdown-bottom .cw-dropdown-arrow,
.cw-dropdown-bottom-left .cw-dropdown-arrow,
.cw-dropdown-bottom-right .cw-dropdown-arrow {
box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);
top: 1px;
margin-left: -4px; }
.cw-dropdown-bottom .cw-dropdown-arrow,
.cw-dropdown-top .cw-dropdown-arrow {
left: 50%; }
.cw-dropdown-left,
.cw-dropdown-left-bottom,
.cw-dropdown-left-top {
padding-right: 5px;
transform-origin: right; }
.cw-dropdown-left .cw-dropdown-arrow,
.cw-dropdown-left-bottom .cw-dropdown-arrow,
.cw-dropdown-left-top .cw-dropdown-arrow {
box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.15);
right: 1px;
margin-top: -4px; }
.cw-dropdown-right,
.cw-dropdown-right-bottom,
.cw-dropdown-right-top {
padding-left: 5px;
transform-origin: left; }
.cw-dropdown-right .cw-dropdown-arrow,
.cw-dropdown-right-bottom .cw-dropdown-arrow,
.cw-dropdown-right-top .cw-dropdown-arrow {
box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.15);
left: 1px;
margin-top: -4px; }
.cw-dropdown-left .cw-dropdown-arrow,
.cw-dropdown-right .cw-dropdown-arrow {
top: 50%; }
.cw-dropdown-bottom-left .cw-dropdown-arrow,
.cw-dropdown-top-left .cw-dropdown-arrow {
left: 15%; }
.cw-dropdown-bottom-right .cw-dropdown-arrow,
.cw-dropdown-top-right .cw-dropdown-arrow {
left: 85%; }
.cw-dropdown-left-top .cw-dropdown-arrow,
.cw-dropdown-right-top .cw-dropdown-arrow {
top: 25%; }
.cw-dropdown-left-bottom .cw-dropdown-arrow,
.cw-dropdown-right-bottom .cw-dropdown-arrow {
top: 85%; }