2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 16:17:45 +08:00
|
|
|
@import '../../style/mixins/index';
|
|
|
|
@import '../../input/style/mixin';
|
2016-04-27 20:44:36 +08:00
|
|
|
|
2018-12-07 16:17:45 +08:00
|
|
|
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
|
2015-12-29 22:34:23 +08:00
|
|
|
|
|
|
|
.@{cascader-prefix-cls} {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2017-01-17 12:10:17 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
&-input.@{ant-prefix}-input {
|
2019-05-24 18:49:36 +08:00
|
|
|
// Keep it static for https://github.com/ant-design/ant-design/issues/16738
|
|
|
|
position: static;
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
2019-07-11 14:09:55 +08:00
|
|
|
// https://github.com/ant-design/ant-design/issues/17582
|
|
|
|
padding-right: 24px;
|
2017-02-28 11:28:49 +08:00
|
|
|
// Add important to fix https://github.com/ant-design/ant-design/issues/5078
|
|
|
|
// because input.less will compile after cascader.less
|
2017-08-04 17:58:32 +08:00
|
|
|
background-color: transparent !important;
|
2015-12-29 22:34:23 +08:00
|
|
|
cursor: pointer;
|
2015-12-29 11:46:13 +08:00
|
|
|
}
|
2017-01-17 12:10:17 +08:00
|
|
|
|
2018-05-21 18:07:56 +08:00
|
|
|
&-picker-show-search &-input.@{ant-prefix}-input {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2015-12-29 21:18:27 +08:00
|
|
|
&-picker {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2015-12-29 21:18:27 +08:00
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
2019-12-01 21:42:02 +08:00
|
|
|
background-color: @cascader-bg;
|
2016-07-11 11:36:02 +08:00
|
|
|
border-radius: @border-radius-base;
|
2017-01-17 12:10:17 +08:00
|
|
|
outline: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: pointer;
|
2018-12-07 16:17:45 +08:00
|
|
|
transition: color 0.3s;
|
2015-12-29 22:34:23 +08:00
|
|
|
|
2016-09-30 13:37:36 +08:00
|
|
|
&-with-value &-label {
|
|
|
|
color: transparent;
|
|
|
|
}
|
|
|
|
|
2016-02-25 12:07:44 +08:00
|
|
|
&-disabled {
|
2017-01-19 14:25:44 +08:00
|
|
|
color: @disabled-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @input-disabled-bg;
|
|
|
|
cursor: not-allowed;
|
2016-09-01 11:08:41 +08:00
|
|
|
.@{cascader-prefix-cls}-input {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2016-02-25 12:07:44 +08:00
|
|
|
}
|
|
|
|
|
2017-01-17 12:10:17 +08:00
|
|
|
&:focus .@{cascader-prefix-cls}-input {
|
|
|
|
.active;
|
|
|
|
}
|
|
|
|
|
2020-02-06 10:02:02 +08:00
|
|
|
&-borderless .@{cascader-prefix-cls}-input {
|
|
|
|
border-color: transparent !important;
|
|
|
|
box-shadow: none !important;
|
|
|
|
}
|
|
|
|
|
2018-07-03 15:46:12 +08:00
|
|
|
&-show-search&-focused {
|
|
|
|
color: @disabled-color;
|
|
|
|
}
|
|
|
|
|
2016-05-18 15:34:30 +08:00
|
|
|
&-label {
|
|
|
|
position: absolute;
|
2019-02-15 10:48:07 +08:00
|
|
|
top: 50%;
|
2016-07-27 13:37:20 +08:00
|
|
|
left: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
2016-05-18 15:34:30 +08:00
|
|
|
height: 20px;
|
|
|
|
margin-top: -10px;
|
2019-07-11 14:09:55 +08:00
|
|
|
padding: 0 20px 0 @control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
overflow: hidden;
|
|
|
|
line-height: 20px;
|
2016-05-18 15:34:30 +08:00
|
|
|
white-space: nowrap;
|
2016-07-27 13:37:20 +08:00
|
|
|
text-overflow: ellipsis;
|
2016-05-18 15:34:30 +08:00
|
|
|
}
|
|
|
|
|
2015-12-29 21:18:27 +08:00
|
|
|
&-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;
|
2016-08-02 17:19:54 +08:00
|
|
|
z-index: 2;
|
2015-12-29 21:18:27 +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;
|
2015-12-29 21:18:27 +08:00
|
|
|
line-height: 12px;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @component-background;
|
2015-12-29 21:18:27 +08:00
|
|
|
cursor: pointer;
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0;
|
2015-12-29 21:18:27 +08:00
|
|
|
transition: color 0.3s ease, opacity 0.15s ease;
|
|
|
|
&:hover {
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2015-12-29 21:18:27 +08:00
|
|
|
}
|
|
|
|
}
|
2015-12-29 22:34:23 +08:00
|
|
|
|
2015-12-29 21:18:27 +08:00
|
|
|
&:hover &-clear {
|
|
|
|
opacity: 1;
|
2015-12-29 22:34:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// arrow
|
|
|
|
&-arrow {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
2017-09-27 22:32:49 +08:00
|
|
|
right: @control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
z-index: 1;
|
2015-12-29 22:34:23 +08:00
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
margin-top: -6px;
|
2017-11-06 21:28:51 +08:00
|
|
|
color: @disabled-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: 12px;
|
|
|
|
line-height: 12px;
|
2018-12-07 16:17:45 +08:00
|
|
|
transition: transform 0.2s;
|
2015-12-29 22:34:23 +08:00
|
|
|
&&-expand {
|
2018-07-23 12:07:36 +08:00
|
|
|
transform: rotate(180deg);
|
2015-12-29 22:34:23 +08:00
|
|
|
}
|
2015-12-29 21:18:27 +08:00
|
|
|
}
|
|
|
|
}
|
2017-09-27 22:32:49 +08:00
|
|
|
|
2019-05-24 18:49:36 +08:00
|
|
|
// https://github.com/ant-design/ant-design/pull/12407#issuecomment-424657810
|
|
|
|
&-picker-label:hover + &-input {
|
|
|
|
.hover;
|
|
|
|
}
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
&-picker-small &-picker-clear,
|
|
|
|
&-picker-small &-picker-arrow {
|
|
|
|
right: @control-padding-horizontal-sm;
|
|
|
|
}
|
|
|
|
|
2015-12-29 11:46:13 +08:00
|
|
|
&-menus {
|
|
|
|
position: absolute;
|
2016-04-13 16:16:26 +08:00
|
|
|
z-index: @zindex-dropdown;
|
2019-12-10 09:02:53 +08:00
|
|
|
font-size: @cascader-dropdown-font-size;
|
2019-02-15 10:48:07 +08:00
|
|
|
white-space: nowrap;
|
2019-12-01 21:42:02 +08:00
|
|
|
background: @cascader-menu-bg;
|
2015-12-29 11:46:13 +08:00
|
|
|
border-radius: @border-radius-base;
|
|
|
|
box-shadow: @box-shadow-base;
|
2017-09-22 18:33:29 +08:00
|
|
|
|
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
margin: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
list-style: none;
|
2017-09-22 18:33:29 +08:00
|
|
|
}
|
|
|
|
|
2016-01-27 15:26:39 +08:00
|
|
|
&-empty,
|
2015-12-29 11:46:13 +08:00
|
|
|
&-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
|
|
|
|
animation-name: antSlideUpIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topLeft {
|
|
|
|
animation-name: antSlideDownIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
|
|
|
|
animation-name: antSlideUpOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
|
|
|
|
animation-name: antSlideDownOut;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-menu {
|
2016-01-19 18:01:21 +08:00
|
|
|
display: inline-block;
|
2016-01-07 20:58:13 +08:00
|
|
|
min-width: 111px;
|
2015-12-29 11:46:13 +08:00
|
|
|
height: 180px;
|
|
|
|
margin: 0;
|
2019-12-10 09:02:53 +08:00
|
|
|
padding: @cascader-dropdown-edge-child-vertical-padding 0;
|
2015-12-31 11:49:17 +08:00
|
|
|
overflow: auto;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: top;
|
|
|
|
list-style: none;
|
2019-12-04 11:58:48 +08:00
|
|
|
border-right: @border-width-base @border-style-base @cascader-menu-border-color-split;
|
2018-08-24 21:07:29 +08:00
|
|
|
-ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
|
|
|
|
|
2016-04-13 16:32:25 +08:00
|
|
|
&:first-child {
|
|
|
|
border-radius: @border-radius-base 0 0 @border-radius-base;
|
|
|
|
}
|
2015-12-29 11:46:13 +08:00
|
|
|
&:last-child {
|
|
|
|
margin-right: -1px;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-right-color: transparent;
|
2016-04-13 16:32:25 +08:00
|
|
|
border-radius: 0 @border-radius-base @border-radius-base 0;
|
|
|
|
}
|
|
|
|
&:only-child {
|
|
|
|
border-radius: @border-radius-base;
|
2015-12-29 11:46:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
&-menu-item {
|
2019-12-10 09:02:53 +08:00
|
|
|
padding: @cascader-dropdown-vertical-padding @control-padding-horizontal;
|
|
|
|
line-height: @cascader-dropdown-line-height;
|
2015-12-29 11:46:13 +08:00
|
|
|
white-space: nowrap;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: pointer;
|
2017-05-02 16:07:16 +08:00
|
|
|
transition: all 0.3s;
|
2015-12-29 11:46:13 +08:00
|
|
|
&:hover {
|
2017-05-03 22:57:14 +08:00
|
|
|
background: @item-hover-bg;
|
2015-12-29 11:46:13 +08:00
|
|
|
}
|
2016-01-25 15:31:08 +08:00
|
|
|
&-disabled {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @disabled-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: not-allowed;
|
2016-01-25 15:31:08 +08:00
|
|
|
&:hover {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
2016-04-13 17:00:29 +08:00
|
|
|
&-active:not(&-disabled) {
|
|
|
|
&,
|
2015-12-29 11:46:13 +08:00
|
|
|
&:hover {
|
2019-05-17 14:09:56 +08:00
|
|
|
font-weight: @select-item-selected-font-weight;
|
2019-11-18 22:06:49 +08:00
|
|
|
background-color: @cascader-item-selected-bg;
|
2015-12-29 11:46:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
&-expand {
|
|
|
|
position: relative;
|
2017-09-10 13:50:21 +08:00
|
|
|
padding-right: 24px;
|
2015-12-29 11:46:13 +08:00
|
|
|
}
|
2018-08-13 11:44:25 +08:00
|
|
|
|
2018-08-23 22:15:25 +08:00
|
|
|
&-expand &-expand-icon,
|
2019-07-09 19:10:36 +08:00
|
|
|
&-loading-icon {
|
2018-08-23 22:15:25 +08:00
|
|
|
.iconfont-size-under-12px(10px);
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2018-08-13 11:44:25 +08:00
|
|
|
position: absolute;
|
|
|
|
right: @control-padding-horizontal;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @text-color-secondary;
|
2018-08-13 11:44:25 +08:00
|
|
|
}
|
|
|
|
|
2016-09-01 11:08:41 +08:00
|
|
|
& &-keyword {
|
2016-11-09 21:30:02 +08:00
|
|
|
color: @highlight-color;
|
2016-09-01 11:08:41 +08:00
|
|
|
}
|
2015-12-29 11:46:13 +08:00
|
|
|
}
|
|
|
|
}
|