2019-08-01 14:47:53 +08:00
|
|
|
/* stylelint-disable */
|
|
|
|
@import './mixins/mixins.scss';
|
2019-09-17 19:21:07 +08:00
|
|
|
@import './themes/vars.scss';
|
2019-08-01 14:47:53 +08:00
|
|
|
|
2019-08-25 16:58:04 +08:00
|
|
|
|
|
|
|
[n-suggested-transform-origin="bottom left"] {
|
|
|
|
.n-cascader-select-menu--transition-leave {
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-select-menu--transition-leave-active {
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave {
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave-active {
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-23 16:51:29 +08:00
|
|
|
[n-suggested-transform-origin="bottom right"] {
|
|
|
|
.n-cascader-select-menu--transition-leave {
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-select-menu--transition-leave-active {
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave {
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave-active {
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-25 16:58:04 +08:00
|
|
|
[n-suggested-transform-origin="top left"] {
|
|
|
|
.n-cascader-select-menu--transition-leave {
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-select-menu--transition-leave-active {
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave {
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave-active {
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-23 16:51:29 +08:00
|
|
|
[n-suggested-transform-origin="top right"] {
|
|
|
|
.n-cascader-select-menu--transition-leave {
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-select-menu--transition-leave-active {
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave {
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
.n-cascader-cascader-menu--transition-leave-active {
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
|
2019-10-23 16:51:29 +08:00
|
|
|
@include themes-mixin {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include b(cascader) {
|
|
|
|
@include once {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(cascader-detached-content-container) {
|
|
|
|
@include once {
|
|
|
|
transform: translateZ(0);
|
|
|
|
}
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
@include b(cascader-menu) {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
@include fade-in-scale-up-transition(cascader-menu, inherit, .2s);
|
|
|
|
transform-origin: inherit;
|
|
|
|
position: relative;
|
|
|
|
margin-top: 4px;
|
|
|
|
margin-bottom: 4px;
|
|
|
|
@include b(cascader-select-menu) {
|
|
|
|
@include fade-in-scale-up-transition(cascader-select-menu, inherit, .2s);
|
|
|
|
margin: 0;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
@include b(cascader-cascader-menu) {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
border-radius: 6px;
|
|
|
|
@include fade-in-scale-up-transition(cascader-cascader-menu, inherit, .2s);
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
box-shadow: $--cascader-menu-box-shadow;
|
|
|
|
@include b(cascader-submenu) {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
2019-10-23 16:51:29 +08:00
|
|
|
position: relative;
|
2019-12-04 18:43:55 +08:00
|
|
|
overflow: hidden;
|
|
|
|
min-width: 182px;
|
|
|
|
height: 204px;
|
|
|
|
@include b(scrollbar-content) {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
&:first-child {
|
|
|
|
border-top-left-radius: 6px;
|
|
|
|
border-bottom-left-radius: 6px;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
border-top-right-radius: 6px;
|
|
|
|
border-bottom-right-radius: 6px;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
&:not(:first-child) {
|
|
|
|
border-left: 1px solid $--cascader-menu-border-color;
|
|
|
|
}
|
|
|
|
background-color: $--cascader-menu-background-color;
|
2019-08-01 15:15:25 +08:00
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
@include b(cascader-option) {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
box-sizing: border-box;
|
|
|
|
min-width: 182px;
|
|
|
|
background-color: transparent;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: background-color .2s $--n-ease-in-out-cubic-bezier, color 0.2s $--n-ease-in-out-cubic-bezier;
|
2019-12-04 18:43:55 +08:00
|
|
|
height: 34px;
|
|
|
|
line-height: 34px;
|
|
|
|
display: flex;
|
|
|
|
padding: 0px 24px 0 33px;
|
|
|
|
white-space: nowrap;
|
|
|
|
position: relative;
|
|
|
|
font-size: 14px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
color: map-get($--cascader-option-text-color, 'default');
|
|
|
|
@include not-m(not-leaf) {
|
|
|
|
&::after {
|
|
|
|
@include once {
|
|
|
|
content: '';
|
|
|
|
height: 6px;
|
|
|
|
width: 3px;
|
|
|
|
position: absolute;
|
|
|
|
right: 14px;
|
|
|
|
transform: rotate(45deg) scale(.5);
|
|
|
|
top: calc(50% - 4px);
|
|
|
|
opacity: 0;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: transform .3s $--n-ease-in-out-cubic-bezier, opacity .3s $--n-ease-in-out-cubic-bezier;
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
2019-12-04 18:43:55 +08:00
|
|
|
border-right: 1px solid $--cascader-item-check-mark-color;
|
|
|
|
border-bottom: 1px solid $--cascader-item-check-mark-color;
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
@include m(single-type) {
|
|
|
|
padding: 0px 24px 0 18px;
|
|
|
|
}
|
|
|
|
@include e(checkbox) {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
left: 10px;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
@include e(radio) {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
left: 10px;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
@include e(loading) {
|
|
|
|
@include fade-in-transition;
|
|
|
|
position: absolute;
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
right: 10px;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
display: block;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
@include m(selected) {
|
|
|
|
color: map-get($--cascader-option-text-color, 'active');
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
&::after {
|
|
|
|
transform: rotate(45deg) scale(1);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(active) {
|
|
|
|
color: map-get($--cascader-option-text-color, 'active');
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
@include m(disabled) {
|
|
|
|
color: map-get($--cascader-option-text-color, 'disabled');
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
@include m(tracked) {
|
|
|
|
background-color: $--cascader-menu-lightbar-background-color;
|
|
|
|
}
|
|
|
|
@include m(not-leaf) {
|
|
|
|
&::after {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
width: 5px;
|
|
|
|
height: 5px;
|
|
|
|
transform: rotate(45deg) translateY(-50%);
|
|
|
|
right: 18px;
|
|
|
|
top: 50%;
|
|
|
|
opacity: 1;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: opacity .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-04 18:43:55 +08:00
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
border-top: 2px solid $--cascader-option-arrow-background-color;
|
|
|
|
border-right: 2px solid $--cascader-option-arrow-background-color;
|
|
|
|
}
|
|
|
|
}
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
@include m(loading) {
|
|
|
|
@include m(not-leaf) {
|
|
|
|
&::after {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
2019-08-01 12:01:04 +08:00
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
@include b(base-menu-mask) {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
@include fade-in-transition(base-menu-mask);
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
text-align: center;
|
|
|
|
padding: 14px;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
2019-10-23 16:51:29 +08:00
|
|
|
color: $--cascader-menu-mask-text-color;
|
|
|
|
background-color: $--cascader-menu-mask-background-color;
|
|
|
|
}
|
|
|
|
@include b(cascader-light-bar-container) {
|
2019-12-04 18:43:55 +08:00
|
|
|
@include once {
|
|
|
|
@include fade-in-transition(cascader-light-bar);
|
|
|
|
overflow: hidden;
|
2019-10-23 16:51:29 +08:00
|
|
|
position: absolute;
|
2019-12-04 18:43:55 +08:00
|
|
|
top: 0;
|
|
|
|
right: 0;
|
2019-10-23 16:51:29 +08:00
|
|
|
left: 0;
|
2019-12-04 18:43:55 +08:00
|
|
|
bottom: 0;
|
|
|
|
}
|
|
|
|
@include b(cascader-light-bar) {
|
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
left: 0;
|
|
|
|
height: 34px;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: top .15s $--n-ease-in-out-cubic-bezier;
|
2019-12-04 18:43:55 +08:00
|
|
|
}
|
|
|
|
background-color: $--cascader-menu-lightbar-background-color;
|
2019-10-23 16:51:29 +08:00
|
|
|
}
|
|
|
|
}
|
2019-08-01 12:01:04 +08:00
|
|
|
}
|
2019-08-24 01:31:36 +08:00
|
|
|
}
|