2020-03-05 12:17:50 +08:00
|
|
|
@import '../../style/themes/index';
|
|
|
|
@import '../../style/mixins/index';
|
|
|
|
@import '../../input/style/mixin';
|
|
|
|
|
|
|
|
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
|
|
|
|
|
|
|
|
.@{cascader-prefix-cls} {
|
|
|
|
.reset-component;
|
|
|
|
|
|
|
|
&-input.@{ant-prefix}-input {
|
|
|
|
// Keep it static for https://github.com/ant-design/ant-design/issues/16738
|
|
|
|
position: static;
|
|
|
|
width: 100%;
|
|
|
|
// https://github.com/ant-design/ant-design/issues/17582
|
|
|
|
padding-right: 24px;
|
|
|
|
// Add important to fix https://github.com/ant-design/ant-design/issues/5078
|
|
|
|
// because input.less will compile after cascader.less
|
|
|
|
background-color: transparent !important;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-picker-show-search &-input.@{ant-prefix}-input {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-picker {
|
|
|
|
.reset-component;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
2020-03-08 15:12:21 +08:00
|
|
|
background-color: @cascader-bg;
|
2020-03-05 12:17:50 +08:00
|
|
|
border-radius: @border-radius-base;
|
|
|
|
outline: 0;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: color 0.3s;
|
|
|
|
|
|
|
|
&-with-value &-label {
|
|
|
|
color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-disabled {
|
|
|
|
color: @disabled-color;
|
|
|
|
background: @input-disabled-bg;
|
|
|
|
cursor: not-allowed;
|
|
|
|
.@{cascader-prefix-cls}-input {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus .@{cascader-prefix-cls}-input {
|
|
|
|
.active;
|
|
|
|
}
|
|
|
|
|
2020-03-08 15:12:21 +08:00
|
|
|
&-borderless .@{cascader-prefix-cls}-input {
|
|
|
|
border-color: transparent !important;
|
|
|
|
box-shadow: none !important;
|
|
|
|
}
|
|
|
|
|
2020-03-05 12:17:50 +08:00
|
|
|
&-show-search&-focused {
|
|
|
|
color: @disabled-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-label {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 20px;
|
|
|
|
margin-top: -10px;
|
|
|
|
padding: 0 20px 0 @control-padding-horizontal;
|
|
|
|
overflow: hidden;
|
|
|
|
line-height: 20px;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-clear {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
right: @control-padding-horizontal;
|
|
|
|
z-index: 2;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
margin-top: -6px;
|
|
|
|
color: @disabled-color;
|
|
|
|
font-size: @font-size-sm;
|
|
|
|
line-height: 12px;
|
|
|
|
background: @component-background;
|
|
|
|
cursor: pointer;
|
|
|
|
opacity: 0;
|
|
|
|
transition: color 0.3s ease, opacity 0.15s ease;
|
|
|
|
&:hover {
|
|
|
|
color: @text-color-secondary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover &-clear {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// arrow
|
|
|
|
&-arrow {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
right: @control-padding-horizontal;
|
|
|
|
z-index: 1;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
margin-top: -6px;
|
|
|
|
color: @disabled-color;
|
|
|
|
font-size: 12px;
|
|
|
|
line-height: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/pull/12407#issuecomment-424657810
|
|
|
|
&-picker-label:hover + &-input {
|
2020-08-10 11:28:52 +08:00
|
|
|
&:not(.@{cascader-prefix-cls}-picker-disabled &) {
|
|
|
|
.hover;
|
|
|
|
}
|
2020-03-05 12:17:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-picker-small &-picker-clear,
|
|
|
|
&-picker-small &-picker-arrow {
|
|
|
|
right: @control-padding-horizontal-sm;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-menus {
|
|
|
|
position: absolute;
|
|
|
|
z-index: @zindex-dropdown;
|
2020-03-08 15:12:21 +08:00
|
|
|
font-size: @cascader-dropdown-font-size;
|
2020-03-05 12:17:50 +08:00
|
|
|
white-space: nowrap;
|
2020-03-08 15:12:21 +08:00
|
|
|
background: @cascader-menu-bg;
|
2020-03-05 12:17:50 +08:00
|
|
|
border-radius: @border-radius-base;
|
|
|
|
box-shadow: @box-shadow-base;
|
|
|
|
|
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-empty,
|
|
|
|
&-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 {
|
|
|
|
display: inline-block;
|
|
|
|
min-width: 111px;
|
|
|
|
height: 180px;
|
|
|
|
margin: 0;
|
2020-03-08 15:12:21 +08:00
|
|
|
padding: @cascader-dropdown-edge-child-vertical-padding 0;
|
2020-03-05 12:17:50 +08:00
|
|
|
overflow: auto;
|
|
|
|
vertical-align: top;
|
|
|
|
list-style: none;
|
2020-03-08 15:12:21 +08:00
|
|
|
border-right: @border-width-base @border-style-base @cascader-menu-border-color-split;
|
2020-03-05 12:17:50 +08:00
|
|
|
-ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
border-radius: @border-radius-base 0 0 @border-radius-base;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
margin-right: -1px;
|
|
|
|
border-right-color: transparent;
|
|
|
|
border-radius: 0 @border-radius-base @border-radius-base 0;
|
|
|
|
}
|
|
|
|
&:only-child {
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-menu-item {
|
2020-03-08 15:12:21 +08:00
|
|
|
padding: @cascader-dropdown-vertical-padding @control-padding-horizontal;
|
2020-08-10 11:28:52 +08:00
|
|
|
overflow: hidden;
|
2020-03-08 15:12:21 +08:00
|
|
|
line-height: @cascader-dropdown-line-height;
|
2020-03-05 12:17:50 +08:00
|
|
|
white-space: nowrap;
|
2020-08-10 11:28:52 +08:00
|
|
|
text-overflow: ellipsis;
|
2020-03-05 12:17:50 +08:00
|
|
|
cursor: pointer;
|
|
|
|
transition: all 0.3s;
|
|
|
|
&:hover {
|
|
|
|
background: @item-hover-bg;
|
|
|
|
}
|
|
|
|
&-disabled {
|
|
|
|
color: @disabled-color;
|
|
|
|
cursor: not-allowed;
|
|
|
|
&:hover {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
2020-05-25 12:38:07 +08:00
|
|
|
.@{cascader-prefix-cls}-menu-empty & {
|
|
|
|
color: @disabled-color;
|
|
|
|
cursor: default;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2020-03-05 12:17:50 +08:00
|
|
|
&-active:not(&-disabled) {
|
|
|
|
&,
|
|
|
|
&:hover {
|
|
|
|
font-weight: @select-item-selected-font-weight;
|
2020-03-08 15:12:21 +08:00
|
|
|
background-color: @cascader-item-selected-bg;
|
2020-03-05 12:17:50 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
&-expand {
|
|
|
|
position: relative;
|
|
|
|
padding-right: 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-expand &-expand-icon,
|
|
|
|
&-loading-icon {
|
|
|
|
.iconfont-size-under-12px(10px);
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
right: @control-padding-horizontal;
|
|
|
|
color: @text-color-secondary;
|
2020-05-31 16:00:40 +08:00
|
|
|
|
|
|
|
.@{cascader-prefix-cls}-menu-item-disabled& {
|
|
|
|
color: @disabled-color;
|
|
|
|
}
|
2020-03-05 12:17:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
& &-keyword {
|
|
|
|
color: @highlight-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-23 13:51:37 +08:00
|
|
|
|
|
|
|
@import './rtl';
|