2019-08-25 16:58:04 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2020-02-11 14:44:29 +08:00
|
|
|
|
2019-09-25 14:24:53 +08:00
|
|
|
@mixin base-select-size-mixin ($size) {
|
|
|
|
@include m($size + '-size') {
|
2020-01-20 22:58:23 +08:00
|
|
|
@include b(virtual-scroller) {
|
|
|
|
height: 100%;
|
2020-02-21 16:48:45 +08:00
|
|
|
max-height: map-get($--n-height, $size) * 7.6;
|
2020-01-20 22:58:23 +08:00
|
|
|
scrollbar-width: none;
|
|
|
|
-moz-scrollbar-width: none;
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
@include b(scrollbar-container) {
|
2020-02-21 16:48:45 +08:00
|
|
|
max-height: map-get($--n-height, $size) * 7.6;
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
2019-11-14 11:57:37 +08:00
|
|
|
@include b(base-select-option) {
|
2020-02-21 16:48:45 +08:00
|
|
|
height: map-get($--n-height, $size);
|
|
|
|
line-height: map-get($--n-height, $size);
|
|
|
|
font-size: map-get($--n-font-size, $size);
|
2019-11-14 11:57:37 +08:00
|
|
|
}
|
2020-01-21 18:21:19 +08:00
|
|
|
@include b(base-select-group-header) {
|
2020-02-21 16:48:45 +08:00
|
|
|
height: map-get($--n-height, $size);
|
|
|
|
line-height: map-get($--n-height, $size);
|
|
|
|
font-size: map-get($--n-font-size, $size) - 2px;
|
2020-01-21 18:21:19 +08:00
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@include themes-mixin {
|
|
|
|
@include b(base-select-menu) {
|
|
|
|
@include once {
|
|
|
|
@include base-select-size-mixin("small");
|
|
|
|
@include base-select-size-mixin("medium");
|
|
|
|
@include base-select-size-mixin("large");
|
2019-12-02 20:57:09 +08:00
|
|
|
@include base-select-size-mixin("huge");
|
2019-09-25 14:24:53 +08:00
|
|
|
outline: none;
|
|
|
|
margin-top: 4px;
|
|
|
|
margin-bottom: 4px;
|
|
|
|
z-index: 0;
|
2019-08-25 16:58:04 +08:00
|
|
|
position: relative;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-radius: $--n-base-select-menu-border-radius;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-01-30 16:00:38 +08:00
|
|
|
overflow: hidden;
|
2019-11-14 15:19:57 +08:00
|
|
|
@include b(base-select-menu-option-wrapper) {
|
2019-09-25 14:24:53 +08:00
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2020-01-21 23:44:15 +08:00
|
|
|
@include e(action) {
|
|
|
|
padding: 8px 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
background-color: $--base-select-menu-background-color;
|
2019-10-17 22:16:30 +08:00
|
|
|
box-shadow: $--base-select-menu-box-shadow;
|
2020-01-21 18:21:19 +08:00
|
|
|
@include b(base-select-group-header) {
|
2020-02-29 17:39:27 +08:00
|
|
|
@include once {
|
|
|
|
cursor: default;
|
|
|
|
padding: 0 14px;
|
|
|
|
}
|
2020-02-21 16:48:45 +08:00
|
|
|
color: map-get($--base-select-menu-group-header-text-color, 'default');
|
2020-01-21 18:21:19 +08:00
|
|
|
}
|
2019-11-14 11:57:37 +08:00
|
|
|
@include b(base-select-option) {
|
2020-02-29 17:39:27 +08:00
|
|
|
@include once {
|
|
|
|
cursor: pointer;
|
|
|
|
position: relative;
|
|
|
|
padding: 0 14px;
|
|
|
|
white-space: nowrap;
|
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2020-03-06 19:54:45 +08:00
|
|
|
box-sizing: border-box;
|
2020-02-29 17:39:27 +08:00
|
|
|
@include m(grouped) {
|
|
|
|
padding: 0 21px;
|
|
|
|
}
|
2020-01-21 18:21:19 +08:00
|
|
|
}
|
2020-02-29 17:39:27 +08:00
|
|
|
color: map-get($--base-select-menu-option-color, "default");
|
2019-10-22 18:46:28 +08:00
|
|
|
@include m(selected) {
|
2020-02-21 16:48:45 +08:00
|
|
|
color: map-get($--base-select-menu-option-color, "selected");
|
2019-10-22 18:46:28 +08:00
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
@include m(disabled) {
|
2020-02-21 16:48:45 +08:00
|
|
|
color: map-get($--base-select-menu-option-color, "disabled");
|
2020-02-29 17:39:27 +08:00
|
|
|
@include once {
|
|
|
|
&::after {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
@include m(selected) {
|
2020-02-21 16:48:45 +08:00
|
|
|
color: map-get($--base-select-menu-option-color, "disabled-selected");
|
2019-09-25 14:24:53 +08:00
|
|
|
&::after {
|
2020-02-21 16:48:45 +08:00
|
|
|
border-right: 1px solid map-get($--base-select-menu-option-color, "disabled-selected");
|
|
|
|
border-bottom: 1px solid map-get($--base-select-menu-option-color, "disabled-selected");
|
2020-02-29 17:39:27 +08:00
|
|
|
@include once {
|
|
|
|
display: block;
|
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
}
|
|
|
|
}
|
2020-02-29 17:39:27 +08:00
|
|
|
@include once {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
}
|
|
|
|
}
|
2020-01-21 23:44:15 +08:00
|
|
|
@include e(action) {
|
2020-02-29 17:39:27 +08:00
|
|
|
@include once {
|
|
|
|
transition:
|
2020-03-01 20:27:22 +08:00
|
|
|
color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
border-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-02-29 17:39:27 +08:00
|
|
|
}
|
2020-02-21 16:48:45 +08:00
|
|
|
border-top: 1px solid $--base-select-menu-action-divider-color;
|
|
|
|
color: $--base-select-menu-action-text-color;
|
2020-01-21 23:44:15 +08:00
|
|
|
}
|
2020-03-04 13:37:55 +08:00
|
|
|
@include m(no-tracking-rect) {
|
|
|
|
@include b(base-select-option) {
|
|
|
|
@include not-m(disabled) {
|
|
|
|
&:hover {
|
|
|
|
color: map-get($--base-select-menu-option-color, "selected");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
@include m(multiple) {
|
2019-11-14 11:57:37 +08:00
|
|
|
@include b(base-select-option) {
|
2020-02-21 16:48:45 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
padding-right: 28px;
|
|
|
|
@include m(selected) {
|
|
|
|
background: none;
|
|
|
|
&::after {
|
|
|
|
opacity: 1;
|
|
|
|
transform: rotate(45deg) scale(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-25 14:24:53 +08:00
|
|
|
&::after {
|
2019-09-27 16:02:20 +08:00
|
|
|
@include once {
|
|
|
|
content: '';
|
|
|
|
height: 6px;
|
|
|
|
width: 3px;
|
|
|
|
position: absolute;
|
|
|
|
right: 14px;
|
|
|
|
transform: rotate(45deg) scale(.5);
|
|
|
|
top: calc(50% - 4px);
|
|
|
|
opacity: 0;
|
2020-02-21 16:48:45 +08:00
|
|
|
transition:
|
|
|
|
transform .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
opacity .3s $--n-ease-in-out-cubic-bezier;
|
2019-09-27 16:02:20 +08:00
|
|
|
}
|
2019-12-04 18:43:55 +08:00
|
|
|
border-right: 1px solid $--base-select-menu-option-check-mark-color;
|
|
|
|
border-bottom: 1px solid $--base-select-menu-option-check-mark-color;
|
2019-09-25 14:24:53 +08:00
|
|
|
}
|
|
|
|
&:active {
|
2020-02-21 16:48:45 +08:00
|
|
|
color: map-get($--base-select-menu-option-color, "active");
|
2019-09-25 14:24:53 +08:00
|
|
|
}
|
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|