2020-03-07 11:45:13 +00:00
|
|
|
@import '../../style/themes/index';
|
2019-01-02 13:01:56 +00:00
|
|
|
@import '../../style/mixins/index';
|
2021-09-06 13:26:43 +00:00
|
|
|
@import './status';
|
2018-01-29 10:57:20 +00:00
|
|
|
|
2019-01-02 13:01:56 +00:00
|
|
|
@dropdown-prefix-cls: ~'@{ant-prefix}-dropdown';
|
2018-01-29 10:57:20 +00:00
|
|
|
|
|
|
|
.@{dropdown-prefix-cls} {
|
2020-12-27 06:50:32 +00:00
|
|
|
.reset-component();
|
2020-03-07 11:45:13 +00:00
|
|
|
|
2018-01-29 10:57:20 +00:00
|
|
|
position: absolute;
|
|
|
|
top: -9999px;
|
2019-03-30 08:06:06 +00:00
|
|
|
left: -9999px;
|
2018-01-29 10:57:20 +00:00
|
|
|
z-index: @zindex-dropdown;
|
|
|
|
display: block;
|
|
|
|
|
2019-03-30 08:06:06 +00:00
|
|
|
&::before {
|
2019-01-02 13:01:56 +00:00
|
|
|
position: absolute;
|
2021-01-14 09:33:17 +00:00
|
|
|
top: -@popover-distance + @popover-arrow-width;
|
2019-01-02 13:01:56 +00:00
|
|
|
right: 0;
|
2021-01-14 09:33:17 +00:00
|
|
|
bottom: -@popover-distance + @popover-arrow-width;
|
2019-03-30 08:06:06 +00:00
|
|
|
left: -7px;
|
|
|
|
z-index: -9999;
|
2019-01-02 13:01:56 +00:00
|
|
|
opacity: 0.0001;
|
2019-03-30 08:06:06 +00:00
|
|
|
content: ' ';
|
2019-01-02 13:01:56 +00:00
|
|
|
}
|
|
|
|
|
2018-01-29 10:57:20 +00:00
|
|
|
&-wrap {
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.@{ant-prefix}-btn > .@{iconfont-css-prefix}-down {
|
2021-09-25 08:51:32 +00:00
|
|
|
font-size: 10px;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
|
2019-03-30 08:06:06 +00:00
|
|
|
.@{iconfont-css-prefix}-down::before {
|
2021-09-25 08:51:32 +00:00
|
|
|
transition: transform @animation-duration-base;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-wrap-open {
|
2019-03-30 08:06:06 +00:00
|
|
|
.@{iconfont-css-prefix}-down::before {
|
2018-01-29 10:57:20 +00:00
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-hidden,
|
2021-09-25 08:51:32 +00:00
|
|
|
&-menu-hidden,
|
|
|
|
&-menu-submenu-hidden {
|
2018-01-29 10:57:20 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
// Offset the popover to account for the dropdown arrow
|
|
|
|
&-show-arrow&-placement-topCenter,
|
|
|
|
&-show-arrow&-placement-topLeft,
|
|
|
|
&-show-arrow&-placement-topRight {
|
|
|
|
padding-bottom: @popover-distance;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-show-arrow&-placement-bottomCenter,
|
|
|
|
&-show-arrow&-placement-bottomLeft,
|
|
|
|
&-show-arrow&-placement-bottomRight {
|
|
|
|
padding-top: @popover-distance;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Arrows
|
|
|
|
// .popover-arrow is outer, .popover-arrow:after is inner
|
|
|
|
|
|
|
|
&-arrow {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1; // lift it up so the menu wouldn't cask shadow on it
|
|
|
|
display: block;
|
|
|
|
width: sqrt(@popover-arrow-width * @popover-arrow-width * 2);
|
|
|
|
height: sqrt(@popover-arrow-width * @popover-arrow-width * 2);
|
|
|
|
background: transparent;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: (sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2);
|
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placement-topCenter > &-arrow,
|
|
|
|
&-placement-topLeft > &-arrow,
|
|
|
|
&-placement-topRight > &-arrow {
|
|
|
|
bottom: @popover-distance - @popover-arrow-width + 2.2px;
|
2022-03-12 01:56:32 +00:00
|
|
|
border-color: transparent @popover-bg @popover-bg transparent;
|
2021-09-25 08:51:32 +00:00
|
|
|
box-shadow: 3px 3px 7px fade(@black, 7%);
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-placement-topCenter > &-arrow {
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%) rotate(45deg);
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-placement-topLeft > &-arrow {
|
|
|
|
left: 16px;
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-placement-topRight > &-arrow {
|
|
|
|
right: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placement-bottomCenter > &-arrow,
|
|
|
|
&-placement-bottomLeft > &-arrow,
|
|
|
|
&-placement-bottomRight > &-arrow {
|
|
|
|
top: @popover-distance - @popover-arrow-width + 2px;
|
2022-03-12 01:56:32 +00:00
|
|
|
border-color: @popover-bg transparent transparent @popover-bg;
|
2021-09-25 08:51:32 +00:00
|
|
|
box-shadow: -2px -2px 5px fade(@black, 6%);
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-placement-bottomCenter > &-arrow {
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%) rotate(45deg);
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-placement-bottomLeft > &-arrow {
|
|
|
|
left: 16px;
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-placement-bottomRight > &-arrow {
|
|
|
|
right: 16px;
|
|
|
|
}
|
|
|
|
|
2018-01-29 10:57:20 +00:00
|
|
|
&-menu {
|
|
|
|
position: relative;
|
|
|
|
margin: 0;
|
2020-03-07 11:45:13 +00:00
|
|
|
padding: @dropdown-edge-child-vertical-padding 0;
|
2018-01-29 10:57:20 +00:00
|
|
|
text-align: left;
|
2019-03-30 08:06:06 +00:00
|
|
|
list-style-type: none;
|
2021-01-14 09:33:17 +00:00
|
|
|
background-color: @dropdown-menu-bg;
|
2019-03-30 08:06:06 +00:00
|
|
|
background-clip: padding-box;
|
2018-01-29 10:57:20 +00:00
|
|
|
border-radius: @border-radius-base;
|
2019-03-30 08:06:06 +00:00
|
|
|
outline: none;
|
2018-01-29 10:57:20 +00:00
|
|
|
box-shadow: @box-shadow-base;
|
|
|
|
|
|
|
|
&-item-group-title {
|
|
|
|
padding: 5px @control-padding-horizontal;
|
2019-03-30 08:06:06 +00:00
|
|
|
color: @text-color-secondary;
|
2021-09-25 08:51:32 +00:00
|
|
|
transition: all @animation-duration-slow;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu-popup {
|
|
|
|
position: absolute;
|
2018-02-22 07:09:03 +00:00
|
|
|
z-index: @zindex-dropdown;
|
2021-07-11 06:13:07 +00:00
|
|
|
background: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
transform-origin: 0 0;
|
2018-11-14 13:33:56 +00:00
|
|
|
|
2020-03-07 11:45:13 +00:00
|
|
|
ul,
|
|
|
|
li {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
|
|
|
margin-right: 0.3em;
|
|
|
|
margin-left: 0.3em;
|
|
|
|
}
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
// ======================= Item Content =======================
|
|
|
|
&-item {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-item-icon {
|
|
|
|
min-width: 12px;
|
|
|
|
margin-right: 8px;
|
|
|
|
font-size: @font-size-sm;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-title-content {
|
|
|
|
flex: auto;
|
|
|
|
|
|
|
|
> a {
|
|
|
|
color: inherit;
|
|
|
|
transition: all @animation-duration-slow;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
content: '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// =========================== Item ===========================
|
2018-01-29 10:57:20 +00:00
|
|
|
&-item,
|
|
|
|
&-submenu-title {
|
|
|
|
clear: both;
|
2019-03-30 08:06:06 +00:00
|
|
|
margin: 0;
|
2020-03-07 11:45:13 +00:00
|
|
|
padding: @dropdown-vertical-padding @control-padding-horizontal;
|
2018-01-29 10:57:20 +00:00
|
|
|
color: @text-color;
|
2019-03-30 08:06:06 +00:00
|
|
|
font-weight: normal;
|
2020-03-07 11:45:13 +00:00
|
|
|
font-size: @dropdown-font-size;
|
|
|
|
line-height: @dropdown-line-height;
|
2018-01-29 10:57:20 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
cursor: pointer;
|
2021-09-25 08:51:32 +00:00
|
|
|
transition: all @animation-duration-slow;
|
2020-03-07 11:45:13 +00:00
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
& when (@dropdown-edge-child-vertical-padding = 0) {
|
|
|
|
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
& when (@dropdown-edge-child-vertical-padding = 0) {
|
|
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&-selected {
|
2020-03-07 11:45:13 +00:00
|
|
|
color: @dropdown-selected-color;
|
2018-01-29 10:57:20 +00:00
|
|
|
background-color: @item-active-bg;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: @item-hover-bg;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-disabled {
|
|
|
|
color: @disabled-color;
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: @disabled-color;
|
2021-09-25 08:51:32 +00:00
|
|
|
background-color: @dropdown-menu-submenu-disabled-bg;
|
2018-01-29 10:57:20 +00:00
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2021-09-25 08:51:32 +00:00
|
|
|
|
|
|
|
a {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-divider {
|
|
|
|
height: 1px;
|
2019-03-30 08:06:06 +00:00
|
|
|
margin: 4px 0;
|
2018-01-29 10:57:20 +00:00
|
|
|
overflow: hidden;
|
|
|
|
line-height: 0;
|
2019-03-30 08:06:06 +00:00
|
|
|
background-color: @border-color-split;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
2020-03-07 11:45:13 +00:00
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-expand-icon {
|
2018-01-29 10:57:20 +00:00
|
|
|
position: absolute;
|
|
|
|
right: @padding-xs;
|
2021-09-25 08:51:32 +00:00
|
|
|
|
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-arrow-icon {
|
|
|
|
margin-right: 0 !important;
|
2018-01-29 10:57:20 +00:00
|
|
|
color: @text-color-secondary;
|
2021-09-25 08:51:32 +00:00
|
|
|
font-size: 10px;
|
2019-03-30 08:06:06 +00:00
|
|
|
font-style: normal;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-07 11:45:13 +00:00
|
|
|
&-item-group-list {
|
|
|
|
margin: 0 8px;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
2018-01-29 10:57:20 +00:00
|
|
|
&-submenu-title {
|
2021-09-25 08:51:32 +00:00
|
|
|
padding-right: @control-padding-horizontal + @font-size-sm;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu-vertical {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu-vertical > & {
|
2019-03-30 08:06:06 +00:00
|
|
|
position: absolute;
|
2018-01-29 10:57:20 +00:00
|
|
|
top: 0;
|
|
|
|
left: 100%;
|
|
|
|
min-width: 100%;
|
|
|
|
margin-left: 4px;
|
|
|
|
transform-origin: 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-submenu&-submenu-disabled .@{dropdown-prefix-cls}-menu-submenu-title {
|
|
|
|
&,
|
2018-11-14 13:33:56 +00:00
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-arrow-icon {
|
2018-01-29 10:57:20 +00:00
|
|
|
color: @disabled-color;
|
2021-01-14 09:33:17 +00:00
|
|
|
background-color: @dropdown-menu-submenu-disabled-bg;
|
2019-03-30 08:06:06 +00:00
|
|
|
cursor: not-allowed;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
}
|
2020-03-07 11:45:13 +00:00
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/19264
|
|
|
|
&-submenu-selected &-submenu-title {
|
|
|
|
color: @primary-color;
|
|
|
|
}
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottomLeft,
|
|
|
|
&.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottomLeft,
|
|
|
|
&.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottomCenter,
|
|
|
|
&.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottomCenter,
|
|
|
|
&.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottomRight,
|
|
|
|
&.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottomRight {
|
2018-01-29 10:57:20 +00:00
|
|
|
animation-name: antSlideUpIn;
|
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topLeft,
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topLeft,
|
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topCenter,
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topCenter,
|
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topRight,
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topRight {
|
2018-01-29 10:57:20 +00:00
|
|
|
animation-name: antSlideDownIn;
|
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottomLeft,
|
|
|
|
&.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottomCenter,
|
|
|
|
&.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottomRight {
|
2018-01-29 10:57:20 +00:00
|
|
|
animation-name: antSlideUpOut;
|
|
|
|
}
|
|
|
|
|
2021-09-25 08:51:32 +00:00
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topLeft,
|
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topCenter,
|
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topRight {
|
2018-01-29 10:57:20 +00:00
|
|
|
animation-name: antSlideDownOut;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{dropdown-prefix-cls}-trigger,
|
2021-09-25 08:51:32 +00:00
|
|
|
.@{dropdown-prefix-cls}-link,
|
|
|
|
.@{dropdown-prefix-cls}-button {
|
2019-01-02 13:01:56 +00:00
|
|
|
> .@{iconfont-css-prefix}.@{iconfont-css-prefix}-down {
|
2021-09-25 08:51:32 +00:00
|
|
|
font-size: 10px;
|
|
|
|
vertical-align: baseline;
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{dropdown-prefix-cls}-button {
|
|
|
|
white-space: nowrap;
|
|
|
|
|
2022-03-12 01:56:32 +00:00
|
|
|
&.@{ant-prefix}-btn-group > .@{ant-prefix}-btn {
|
|
|
|
&-loading,
|
|
|
|
&-loading + .@{ant-prefix}-btn {
|
|
|
|
cursor: default;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-loading + .@{ant-prefix}-btn::before {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child:not(:first-child):not(.@{ant-prefix}-btn-icon-only) {
|
|
|
|
padding-right: @padding-xs;
|
|
|
|
padding-left: @padding-xs;
|
|
|
|
}
|
2018-01-29 10:57:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/4903
|
|
|
|
.@{dropdown-prefix-cls}-menu-dark {
|
|
|
|
&,
|
|
|
|
.@{dropdown-prefix-cls}-menu {
|
|
|
|
background: @menu-dark-bg;
|
|
|
|
}
|
|
|
|
.@{dropdown-prefix-cls}-menu-item,
|
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-title,
|
2021-09-25 08:51:32 +00:00
|
|
|
.@{dropdown-prefix-cls}-menu-item > a,
|
|
|
|
.@{dropdown-prefix-cls}-menu-item > .@{iconfont-css-prefix} + span > a {
|
2018-01-29 10:57:20 +00:00
|
|
|
color: @text-color-secondary-dark;
|
2019-03-30 08:06:06 +00:00
|
|
|
.@{dropdown-prefix-cls}-menu-submenu-arrow::after {
|
2018-01-29 10:57:20 +00:00
|
|
|
color: @text-color-secondary-dark;
|
|
|
|
}
|
2022-03-12 01:56:32 +00:00
|
|
|
|
2018-01-29 10:57:20 +00:00
|
|
|
&:hover {
|
2019-03-30 08:06:06 +00:00
|
|
|
color: @text-color-inverse;
|
2018-01-29 10:57:20 +00:00
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.@{dropdown-prefix-cls}-menu-item-selected {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
> a {
|
2019-03-30 08:06:06 +00:00
|
|
|
color: @text-color-inverse;
|
2018-01-29 10:57:20 +00:00
|
|
|
background: @primary-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-09-25 08:51:32 +00:00
|
|
|
|
|
|
|
@import './rtl';
|