2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
|
|
|
@import '../../input/style/mixin';
|
2015-12-02 14:59:48 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
@select-prefix-cls: ~'@{ant-prefix}-select';
|
2015-08-10 15:39:50 +08:00
|
|
|
|
2016-02-26 17:12:56 +08:00
|
|
|
.selection__clear() {
|
|
|
|
position: absolute;
|
2019-02-15 10:48:07 +08:00
|
|
|
top: 50%;
|
2017-09-27 22:32:49 +08:00
|
|
|
right: @control-padding-horizontal - 1px;
|
2016-02-26 17:12:56 +08:00
|
|
|
z-index: 1;
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
2016-02-26 17:12:56 +08:00
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
margin-top: -6px;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @disabled-color;
|
|
|
|
font-size: @font-size-sm;
|
|
|
|
font-style: normal;
|
2016-02-26 17:12:56 +08:00
|
|
|
line-height: 12px;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: center;
|
|
|
|
text-transform: none;
|
|
|
|
background: @component-background;
|
2016-02-26 17:12:56 +08:00
|
|
|
cursor: pointer;
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0;
|
2016-02-26 17:12:56 +08:00
|
|
|
transition: color 0.3s ease, opacity 0.15s ease;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-rendering: auto;
|
|
|
|
&::before {
|
2016-02-26 17:12:56 +08:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
&:hover {
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2016-02-26 17:12:56 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls} {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2015-06-09 21:16:59 +08:00
|
|
|
position: relative;
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
2018-07-20 11:03:02 +08:00
|
|
|
outline: 0;
|
2017-09-22 18:33:29 +08:00
|
|
|
|
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
2015-06-09 21:16:59 +08:00
|
|
|
|
|
|
|
> ul > li > a {
|
|
|
|
padding: 0;
|
2016-11-29 11:56:10 +08:00
|
|
|
background-color: @component-background;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// arrow
|
|
|
|
&-arrow {
|
2015-07-09 17:47:21 +08:00
|
|
|
.iconfont-mixin();
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2015-06-09 21:16:59 +08:00
|
|
|
position: absolute;
|
2015-07-23 17:18:09 +08:00
|
|
|
top: 50%;
|
2017-09-27 22:32:49 +08:00
|
|
|
right: @control-padding-horizontal - 1px;
|
2018-02-07 20:29:40 +08:00
|
|
|
margin-top: -@font-size-sm / 2;
|
2017-10-26 19:39:04 +08:00
|
|
|
color: @disabled-color;
|
2018-02-07 20:29:40 +08:00
|
|
|
font-size: @font-size-sm;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: 1;
|
|
|
|
transform-origin: 50% 50%;
|
2015-07-09 17:47:21 +08:00
|
|
|
|
2018-08-25 15:51:07 +08:00
|
|
|
& &-icon svg {
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: transform 0.3s;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
&-selection {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: block;
|
2015-06-11 19:23:35 +08:00
|
|
|
box-sizing: border-box;
|
2016-11-29 11:56:10 +08:00
|
|
|
background-color: @component-background;
|
2019-01-15 18:03:17 +08:00
|
|
|
border: @border-width-base @border-style-base @select-border-color;
|
2017-12-22 18:11:29 +08:00
|
|
|
// strange align fix for chrome but works
|
|
|
|
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
|
|
|
|
border-top-width: @border-width-base + 0.02px;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-radius: @border-radius-base;
|
|
|
|
outline: none;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s @ease-in-out;
|
2019-02-15 10:48:07 +08:00
|
|
|
user-select: none;
|
2015-06-15 11:01:15 +08:00
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
&:hover {
|
2015-08-31 12:20:04 +08:00
|
|
|
.hover;
|
2015-06-11 19:23:35 +08:00
|
|
|
}
|
2016-02-26 17:12:56 +08:00
|
|
|
|
2016-04-28 16:28:08 +08:00
|
|
|
.@{select-prefix-cls}-focused &,
|
2016-04-08 15:30:49 +08:00
|
|
|
&:focus,
|
2015-06-11 19:23:35 +08:00
|
|
|
&:active {
|
2015-08-31 12:20:04 +08:00
|
|
|
.active;
|
2015-06-11 19:23:35 +08:00
|
|
|
}
|
2016-02-19 16:16:49 +08:00
|
|
|
|
|
|
|
&__clear {
|
2016-02-26 17:12:56 +08:00
|
|
|
.selection__clear();
|
2016-02-19 16:16:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover &__clear {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2016-10-19 14:27:38 +08:00
|
|
|
|
|
|
|
&-selected-value {
|
2016-10-20 11:59:38 +08:00
|
|
|
float: left;
|
2016-10-19 14:27:38 +08:00
|
|
|
max-width: 100%;
|
2018-05-06 14:54:27 +08:00
|
|
|
padding-right: 20px;
|
2019-02-15 10:48:07 +08:00
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2016-10-19 14:27:38 +08:00
|
|
|
}
|
2015-06-11 19:23:35 +08:00
|
|
|
}
|
2018-05-06 14:54:27 +08:00
|
|
|
|
|
|
|
&-no-arrow &-selection-selected-value {
|
|
|
|
padding-right: 0;
|
|
|
|
}
|
2015-06-11 19:23:35 +08:00
|
|
|
|
2015-06-15 19:29:32 +08:00
|
|
|
&-disabled {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2015-06-15 19:29:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-disabled &-selection {
|
2017-04-29 04:04:41 +08:00
|
|
|
background: @input-disabled-bg;
|
2016-02-05 13:55:14 +08:00
|
|
|
cursor: not-allowed;
|
2015-11-26 19:32:55 +08:00
|
|
|
&:hover,
|
2016-04-08 15:30:49 +08:00
|
|
|
&:focus,
|
2015-11-26 19:32:55 +08:00
|
|
|
&:active {
|
2019-01-15 18:03:17 +08:00
|
|
|
border-color: @select-border-color;
|
2016-04-08 15:30:49 +08:00
|
|
|
box-shadow: none;
|
2015-06-15 19:29:32 +08:00
|
|
|
}
|
2016-04-22 15:41:52 +08:00
|
|
|
|
|
|
|
&__clear {
|
|
|
|
display: none;
|
2016-05-26 16:00:55 +08:00
|
|
|
visibility: hidden;
|
|
|
|
pointer-events: none;
|
2016-04-22 15:41:52 +08:00
|
|
|
}
|
2015-06-15 19:29:32 +08:00
|
|
|
}
|
|
|
|
|
2016-02-05 13:55:14 +08:00
|
|
|
&-disabled &-selection--multiple &-selection__choice {
|
|
|
|
padding-right: 10px;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: fade(@black, 33%);
|
|
|
|
background: @background-color-base;
|
2016-02-05 13:55:14 +08:00
|
|
|
&__remove {
|
|
|
|
display: none;
|
|
|
|
}
|
2016-01-05 11:45:13 +08:00
|
|
|
}
|
|
|
|
|
2015-06-11 19:23:35 +08:00
|
|
|
&-selection--single {
|
2016-04-27 17:57:35 +08:00
|
|
|
position: relative;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: @input-height-base;
|
2015-06-11 19:23:35 +08:00
|
|
|
cursor: pointer;
|
2016-10-19 20:32:14 +08:00
|
|
|
}
|
2015-06-09 21:16:59 +08:00
|
|
|
|
2016-10-19 20:32:14 +08:00
|
|
|
&-selection__rendered {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
2016-10-19 20:32:14 +08:00
|
|
|
display: block;
|
2017-09-27 22:32:49 +08:00
|
|
|
margin-right: @control-padding-horizontal - 1px;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-left: @control-padding-horizontal - 1px;
|
2017-01-24 15:20:06 +08:00
|
|
|
line-height: @input-height-base - 2px;
|
2016-10-19 20:32:14 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/3481#issuecomment-254721026
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2016-10-20 14:18:07 +08:00
|
|
|
display: inline-block;
|
2017-12-22 18:30:11 +08:00
|
|
|
width: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
visibility: hidden;
|
|
|
|
content: '.';
|
2019-04-15 22:44:51 +08:00
|
|
|
pointer-events: none;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
2016-04-27 20:44:36 +08:00
|
|
|
}
|
2015-06-09 21:16:59 +08:00
|
|
|
|
2015-08-10 15:39:50 +08:00
|
|
|
&-lg {
|
2017-12-28 15:41:10 +08:00
|
|
|
font-size: @font-size-lg;
|
2016-08-17 13:47:23 +08:00
|
|
|
.@{select-prefix-cls}-selection--single {
|
2016-12-15 11:17:09 +08:00
|
|
|
height: @input-height-lg;
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
2016-10-19 20:32:14 +08:00
|
|
|
.@{select-prefix-cls}-selection__rendered {
|
2017-01-24 15:20:06 +08:00
|
|
|
line-height: @input-height-lg - 2px;
|
2016-10-19 20:32:14 +08:00
|
|
|
}
|
2016-08-17 13:47:23 +08:00
|
|
|
.@{select-prefix-cls}-selection--multiple {
|
2016-12-15 11:17:09 +08:00
|
|
|
min-height: @input-height-lg;
|
2016-08-17 13:47:23 +08:00
|
|
|
.@{select-prefix-cls}-selection__rendered {
|
2015-08-10 15:39:50 +08:00
|
|
|
li {
|
2017-01-24 15:20:06 +08:00
|
|
|
height: @input-height-lg - 8px;
|
|
|
|
line-height: @input-height-lg - 8px;
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
|
|
|
}
|
2019-02-28 12:26:43 +08:00
|
|
|
.@{select-prefix-cls}-selection__clear,
|
|
|
|
.@{select-prefix-cls}-arrow {
|
2017-03-27 17:37:39 +08:00
|
|
|
top: @input-height-lg / 2;
|
|
|
|
}
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-10 15:39:50 +08:00
|
|
|
&-sm {
|
2016-08-17 13:47:23 +08:00
|
|
|
.@{select-prefix-cls}-selection--single {
|
2016-12-15 11:17:09 +08:00
|
|
|
height: @input-height-sm;
|
2016-10-19 20:32:14 +08:00
|
|
|
}
|
|
|
|
.@{select-prefix-cls}-selection__rendered {
|
2017-09-27 22:32:49 +08:00
|
|
|
margin: 0 @control-padding-horizontal-sm - 1px;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @input-height-sm - 2px;
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
2016-08-17 13:47:23 +08:00
|
|
|
.@{select-prefix-cls}-selection--multiple {
|
2016-12-15 11:17:09 +08:00
|
|
|
min-height: @input-height-sm;
|
2016-08-17 13:47:23 +08:00
|
|
|
.@{select-prefix-cls}-selection__rendered {
|
2015-08-10 15:39:50 +08:00
|
|
|
li {
|
2017-01-24 15:20:06 +08:00
|
|
|
height: @input-height-sm - 8px;
|
2017-09-27 22:32:49 +08:00
|
|
|
line-height: @input-height-sm - 10px;
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
|
|
|
}
|
2019-02-28 12:26:43 +08:00
|
|
|
.@{select-prefix-cls}-selection__clear,
|
|
|
|
.@{select-prefix-cls}-arrow {
|
2017-03-27 17:37:39 +08:00
|
|
|
top: @input-height-sm / 2;
|
|
|
|
}
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
2017-09-27 22:32:49 +08:00
|
|
|
.@{select-prefix-cls}-selection__clear,
|
|
|
|
.@{select-prefix-cls}-arrow {
|
|
|
|
right: @control-padding-horizontal-sm;
|
|
|
|
}
|
2015-08-08 19:11:10 +08:00
|
|
|
}
|
|
|
|
|
2015-07-14 20:16:05 +08:00
|
|
|
&-disabled &-selection__choice__remove {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2015-07-14 20:16:05 +08:00
|
|
|
cursor: default;
|
|
|
|
&:hover {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2015-07-14 20:16:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-09-17 19:31:52 +08:00
|
|
|
&-search__field__wrap {
|
2015-08-18 00:41:55 +08:00
|
|
|
position: relative;
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
2015-08-18 00:41:55 +08:00
|
|
|
}
|
|
|
|
|
2016-05-12 12:10:26 +08:00
|
|
|
&-selection__placeholder,
|
2018-12-07 20:02:01 +08:00
|
|
|
&-search__field__placeholder {
|
|
|
|
// for TreeSelect compatibility
|
2015-08-18 00:41:55 +08:00
|
|
|
position: absolute;
|
2016-02-25 11:49:40 +08:00
|
|
|
top: 50%;
|
2016-07-24 15:15:13 +08:00
|
|
|
right: 9px;
|
2019-02-15 10:48:07 +08:00
|
|
|
left: 0;
|
2016-07-24 15:15:13 +08:00
|
|
|
max-width: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: 20px;
|
2016-02-25 11:49:40 +08:00
|
|
|
margin-top: -10px;
|
2016-07-24 15:15:13 +08:00
|
|
|
overflow: hidden;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @input-placeholder-color;
|
|
|
|
line-height: 20px;
|
2016-07-24 15:15:13 +08:00
|
|
|
white-space: nowrap;
|
2017-05-24 16:48:45 +08:00
|
|
|
text-align: left;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-overflow: ellipsis;
|
2015-08-18 00:41:55 +08:00
|
|
|
}
|
|
|
|
|
2016-11-14 20:15:51 +08:00
|
|
|
&-search__field__placeholder {
|
2017-09-27 22:32:49 +08:00
|
|
|
left: @control-padding-horizontal;
|
2016-11-14 20:15:51 +08:00
|
|
|
}
|
|
|
|
|
2017-09-23 12:11:17 +08:00
|
|
|
&-search__field__mirror {
|
|
|
|
position: absolute;
|
2018-09-04 15:45:39 +08:00
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2017-09-23 12:11:17 +08:00
|
|
|
white-space: pre;
|
2018-09-04 15:45:39 +08:00
|
|
|
opacity: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
pointer-events: none;
|
2017-09-23 12:11:17 +08:00
|
|
|
}
|
|
|
|
|
2015-07-14 20:16:05 +08:00
|
|
|
&-search--inline {
|
2016-10-13 15:54:25 +08:00
|
|
|
position: absolute;
|
2017-06-06 20:35:51 +08:00
|
|
|
width: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: 100%;
|
2015-07-14 20:16:05 +08:00
|
|
|
|
2015-09-17 19:31:52 +08:00
|
|
|
.@{select-prefix-cls}-search__field__wrap {
|
|
|
|
width: 100%;
|
2016-08-17 13:57:42 +08:00
|
|
|
height: 100%;
|
2015-09-17 19:31:52 +08:00
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-search__field {
|
2016-10-19 14:27:38 +08:00
|
|
|
width: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: 100%;
|
|
|
|
font-size: 100%;
|
|
|
|
line-height: 1;
|
2015-07-14 20:16:05 +08:00
|
|
|
background: transparent;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-width: 0;
|
2016-02-02 12:27:22 +08:00
|
|
|
border-radius: @border-radius-base;
|
2019-02-15 10:48:07 +08:00
|
|
|
outline: 0;
|
2015-07-14 20:16:05 +08:00
|
|
|
}
|
2016-05-27 15:00:22 +08:00
|
|
|
|
2015-07-14 20:16:05 +08:00
|
|
|
> i {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-09 21:16:59 +08:00
|
|
|
&-selection--multiple {
|
2016-12-15 11:17:09 +08:00
|
|
|
min-height: @input-height-base;
|
2016-10-19 20:32:14 +08:00
|
|
|
padding-bottom: 3px;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: text;
|
2016-10-19 20:32:14 +08:00
|
|
|
.clearfix;
|
2015-06-09 21:16:59 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-search--inline {
|
2017-11-29 21:00:16 +08:00
|
|
|
position: static;
|
2019-02-15 10:48:07 +08:00
|
|
|
float: left;
|
2015-07-15 19:59:54 +08:00
|
|
|
width: auto;
|
2017-06-27 11:01:11 +08:00
|
|
|
max-width: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: 0;
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-search__field {
|
2015-07-15 19:59:54 +08:00
|
|
|
width: 0.75em;
|
2019-02-15 10:48:07 +08:00
|
|
|
max-width: 100%;
|
2015-07-15 19:59:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-selection__rendered {
|
2016-10-19 20:32:14 +08:00
|
|
|
height: auto;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-bottom: -3px;
|
|
|
|
margin-left: 5px;
|
2016-04-27 20:44:36 +08:00
|
|
|
}
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
.@{select-prefix-cls}-selection__placeholder {
|
|
|
|
margin-left: 6px;
|
|
|
|
}
|
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
> ul > li,
|
2018-12-07 20:02:01 +08:00
|
|
|
.@{select-prefix-cls}-selection__rendered > ul > li {
|
2019-02-15 10:48:07 +08:00
|
|
|
height: @input-height-base - 8px;
|
2018-12-07 20:02:01 +08:00
|
|
|
// for tree-select
|
2016-10-19 20:32:14 +08:00
|
|
|
margin-top: 3px;
|
2017-09-27 22:32:49 +08:00
|
|
|
line-height: @input-height-base - 8px - 2px;
|
2015-06-15 19:29:32 +08:00
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-selection__choice {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
|
|
|
float: left;
|
|
|
|
max-width: 99%;
|
|
|
|
margin-right: 4px;
|
|
|
|
padding: 0 20px 0 10px;
|
|
|
|
overflow: hidden;
|
2017-05-03 22:33:28 +08:00
|
|
|
color: @tag-default-color;
|
|
|
|
background-color: @tag-default-bg;
|
2017-09-27 22:32:49 +08:00
|
|
|
border: 1px solid @border-color-split;
|
|
|
|
border-radius: @border-radius-sm;
|
2015-06-09 21:16:59 +08:00
|
|
|
cursor: default;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: padding 0.3s @ease-in-out;
|
2016-06-14 23:09:35 +08:00
|
|
|
&__disabled {
|
|
|
|
padding: 0 10px;
|
|
|
|
}
|
2015-09-10 12:07:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{select-prefix-cls}-selection__choice__content {
|
|
|
|
display: inline-block;
|
2019-02-15 10:48:07 +08:00
|
|
|
max-width: 100%;
|
2015-09-10 12:07:58 +08:00
|
|
|
overflow: hidden;
|
2019-02-15 10:48:07 +08:00
|
|
|
white-space: nowrap;
|
2015-09-10 12:07:58 +08:00
|
|
|
text-overflow: ellipsis;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: margin 0.3s @ease-in-out;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-selection__choice__remove {
|
2015-07-08 22:07:15 +08:00
|
|
|
.iconfont-mixin();
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
position: absolute;
|
|
|
|
right: 4px;
|
|
|
|
display: inline-block;
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-weight: bold;
|
|
|
|
font-size: @font-size-sm;
|
2016-02-25 11:49:40 +08:00
|
|
|
line-height: inherit;
|
2015-06-09 21:16:59 +08:00
|
|
|
cursor: pointer;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2017-09-27 22:32:49 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
2015-06-09 21:16:59 +08:00
|
|
|
&:hover {
|
2018-12-04 13:11:31 +08:00
|
|
|
color: @icon-color-hover;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
}
|
2017-03-27 17:37:39 +08:00
|
|
|
|
2019-02-28 12:26:43 +08:00
|
|
|
.@{select-prefix-cls}-selection__clear,
|
|
|
|
.@{select-prefix-cls}-arrow {
|
2017-03-27 17:37:39 +08:00
|
|
|
top: @input-height-base / 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-28 23:38:05 +08:00
|
|
|
&-allow-clear &-selection--single &-selection-selected-value {
|
|
|
|
padding-right: 16px;
|
|
|
|
}
|
|
|
|
|
2019-02-28 12:26:43 +08:00
|
|
|
&-allow-clear &-selection--multiple &-selection__rendered,
|
|
|
|
&-show-arrow &-selection--multiple &-selection__rendered {
|
2017-03-27 17:37:39 +08:00
|
|
|
margin-right: 20px; // In case that clear button will overlap content
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-open {
|
2018-08-09 12:07:27 +08:00
|
|
|
.@{select-prefix-cls}-arrow {
|
2018-08-25 15:51:07 +08:00
|
|
|
&-icon svg {
|
2018-08-09 12:07:27 +08:00
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
2015-07-21 10:59:47 +08:00
|
|
|
}
|
2015-08-23 15:42:38 +08:00
|
|
|
.@{select-prefix-cls}-selection {
|
|
|
|
.active();
|
2015-07-20 21:32:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-combobox {
|
|
|
|
.@{select-prefix-cls}-arrow {
|
2015-08-20 17:27:40 +08:00
|
|
|
display: none;
|
|
|
|
}
|
2015-08-23 15:42:38 +08:00
|
|
|
.@{select-prefix-cls}-search--inline {
|
|
|
|
float: none;
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2015-08-23 15:42:38 +08:00
|
|
|
}
|
|
|
|
.@{select-prefix-cls}-search__field__wrap {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
.@{select-prefix-cls}-search__field {
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2016-05-13 23:16:59 +08:00
|
|
|
box-shadow: none;
|
2019-02-15 10:48:07 +08:00
|
|
|
transition: all 0.3s @ease-in-out, height 0s;
|
2015-08-23 15:42:38 +08:00
|
|
|
}
|
|
|
|
}
|
2019-02-28 12:26:43 +08:00
|
|
|
&-combobox&-allow-clear &-selection:hover &-selection__rendered,
|
|
|
|
&-combobox&-show-arrow &-selection:hover &-selection__rendered {
|
2017-03-27 17:37:39 +08:00
|
|
|
margin-right: 20px; // In case that clear button will overlap content
|
|
|
|
}
|
2015-08-23 15:42:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{select-prefix-cls}-dropdown {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
position: absolute;
|
|
|
|
top: -9999px;
|
|
|
|
left: -9999px;
|
|
|
|
z-index: @zindex-dropdown;
|
|
|
|
box-sizing: border-box;
|
|
|
|
font-size: @font-size-base;
|
2018-09-09 00:11:29 +08:00
|
|
|
// Fix select render lag of long text in chrome
|
|
|
|
// https://github.com/ant-design/ant-design/issues/11456
|
|
|
|
// https://github.com/ant-design/ant-design/issues/11843
|
|
|
|
font-variant: initial;
|
2019-02-15 10:48:07 +08:00
|
|
|
background-color: @component-background;
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
outline: none;
|
|
|
|
box-shadow: @box-shadow-base;
|
|
|
|
|
2015-11-11 12:00:54 +08:00
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
|
2015-10-22 18:27:17 +08:00
|
|
|
animation-name: antSlideUpIn;
|
|
|
|
}
|
|
|
|
|
2015-11-11 12:00:54 +08:00
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topLeft {
|
2015-10-22 18:27:17 +08:00
|
|
|
animation-name: antSlideDownIn;
|
|
|
|
}
|
|
|
|
|
2015-11-11 12:00:54 +08:00
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
|
2015-10-22 18:27:17 +08:00
|
|
|
animation-name: antSlideUpOut;
|
|
|
|
}
|
|
|
|
|
2015-11-11 12:00:54 +08:00
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
|
2015-10-22 18:27:17 +08:00
|
|
|
animation-name: antSlideDownOut;
|
|
|
|
}
|
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-menu {
|
2019-02-15 10:48:07 +08:00
|
|
|
max-height: 250px;
|
2015-08-23 15:42:38 +08:00
|
|
|
margin-bottom: 0;
|
|
|
|
padding-left: 0; // Override default ul/ol
|
2018-02-07 11:43:21 +08:00
|
|
|
overflow: auto;
|
2019-02-15 10:48:07 +08:00
|
|
|
list-style: none;
|
|
|
|
outline: none;
|
2015-07-14 20:16:05 +08:00
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-item-group-list {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
> .@{select-prefix-cls}-dropdown-menu-item {
|
2017-10-29 14:21:00 +08:00
|
|
|
padding-left: 20px;
|
2015-07-14 20:16:05 +08:00
|
|
|
}
|
2015-08-23 15:42:38 +08:00
|
|
|
}
|
2015-07-14 20:16:05 +08:00
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-item-group-title {
|
2017-10-29 14:21:00 +08:00
|
|
|
height: 32px;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: 0 @control-padding-horizontal;
|
|
|
|
color: @text-color-secondary;
|
2017-10-29 14:21:00 +08:00
|
|
|
font-size: @font-size-sm;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: 32px;
|
2015-08-23 15:42:38 +08:00
|
|
|
}
|
2015-08-01 17:51:55 +08:00
|
|
|
|
2018-07-23 18:50:07 +08:00
|
|
|
&-item-group-list &-item:first-child:not(:last-child),
|
|
|
|
&-item-group:not(:last-child) &-item-group-list &-item:last-child {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-item {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
2017-10-11 16:56:52 +08:00
|
|
|
padding: 5px @control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
overflow: hidden;
|
2016-11-08 20:50:59 +08:00
|
|
|
color: @text-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-weight: normal;
|
|
|
|
line-height: 22px;
|
2015-08-23 15:42:38 +08:00
|
|
|
white-space: nowrap;
|
2017-10-08 15:22:24 +08:00
|
|
|
text-overflow: ellipsis;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: pointer;
|
2015-12-08 22:08:21 +08:00
|
|
|
transition: background 0.3s ease;
|
2015-08-01 17:51:55 +08:00
|
|
|
|
2019-05-08 15:53:32 +08:00
|
|
|
&:hover:not(&-disabled) {
|
2017-05-03 22:57:14 +08:00
|
|
|
background-color: @item-hover-bg;
|
|
|
|
}
|
|
|
|
|
2018-02-27 18:27:31 +08:00
|
|
|
&:first-child {
|
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
2018-02-27 17:21:33 +08:00
|
|
|
}
|
|
|
|
|
2019-05-08 15:53:32 +08:00
|
|
|
&-selected {
|
|
|
|
color: @text-color;
|
|
|
|
font-weight: @select-item-selected-font-weight;
|
|
|
|
background-color: @background-color-light;
|
|
|
|
}
|
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-disabled {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2015-08-23 15:42:38 +08:00
|
|
|
cursor: not-allowed;
|
2015-07-14 20:16:05 +08:00
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&:hover {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2015-07-14 20:16:05 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2015-08-23 15:42:38 +08:00
|
|
|
}
|
2015-07-14 20:16:05 +08:00
|
|
|
|
2019-05-08 15:53:32 +08:00
|
|
|
&-active:not(&-disabled) {
|
2017-08-23 18:16:52 +08:00
|
|
|
background-color: @item-active-bg;
|
|
|
|
}
|
|
|
|
|
2015-08-23 15:42:38 +08:00
|
|
|
&-divider {
|
|
|
|
height: 1px;
|
|
|
|
margin: 1px 0;
|
|
|
|
overflow: hidden;
|
|
|
|
line-height: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
background-color: @border-color-split;
|
2015-07-14 20:16:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-13 17:00:29 +08:00
|
|
|
&&--multiple {
|
|
|
|
.@{select-prefix-cls}-dropdown-menu-item {
|
2018-10-25 00:06:59 +08:00
|
|
|
padding-right: @control-padding-horizontal + 20;
|
2018-09-06 21:26:17 +08:00
|
|
|
& .@{select-prefix-cls}-selected-icon {
|
2016-04-13 17:00:29 +08:00
|
|
|
position: absolute;
|
2016-10-21 20:21:40 +08:00
|
|
|
top: 50%;
|
2017-10-11 16:56:52 +08:00
|
|
|
right: @control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: transparent;
|
2016-04-13 17:00:29 +08:00
|
|
|
font-weight: bold;
|
2019-02-23 16:35:04 +08:00
|
|
|
font-size: 12px;
|
2016-04-13 17:00:29 +08:00
|
|
|
text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
transform: translateY(-50%);
|
2019-02-27 19:57:48 +08:00
|
|
|
transition: all 0.2s;
|
2016-04-13 17:00:29 +08:00
|
|
|
}
|
|
|
|
|
2018-09-06 21:26:17 +08:00
|
|
|
&:hover .@{select-prefix-cls}-selected-icon {
|
2018-12-04 13:11:31 +08:00
|
|
|
color: fade(@black, 87%);
|
2016-04-13 17:00:29 +08:00
|
|
|
}
|
|
|
|
|
2018-09-06 21:26:17 +08:00
|
|
|
&-disabled .@{select-prefix-cls}-selected-icon {
|
2016-06-14 23:09:35 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2018-09-06 21:26:17 +08:00
|
|
|
&-selected .@{select-prefix-cls}-selected-icon,
|
|
|
|
&-selected:hover .@{select-prefix-cls}-selected-icon {
|
2016-06-14 23:09:35 +08:00
|
|
|
display: inline-block;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @primary-color;
|
2016-04-13 17:00:29 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-22 11:35:40 +08:00
|
|
|
// Patch for popup adjust
|
|
|
|
// https://github.com/ant-design/ant-design/issues/14422
|
|
|
|
&--empty&--multiple &-menu-item {
|
|
|
|
padding-right: @control-padding-horizontal;
|
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-container-open,
|
|
|
|
&-open {
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{select-prefix-cls}-dropdown {
|
2015-07-14 20:16:05 +08:00
|
|
|
display: block;
|
2015-06-09 21:16:59 +08:00
|
|
|
}
|
|
|
|
}
|
2015-06-14 15:52:47 +08:00
|
|
|
}
|