2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
@popover-prefix-cls: ~'@{ant-prefix}-popover';
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2022-05-25 14:01:29 +08:00
|
|
|
@popover-arrow-rotate-width: sqrt(@popover-arrow-width * @popover-arrow-width * 2) + 6px;
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
@popover-arrow-offset-vertical: 12px;
|
|
|
|
@popover-arrow-offset-horizontal: 16px;
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{popover-prefix-cls} {
|
2020-12-22 11:08:12 +08:00
|
|
|
.reset-component();
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2015-06-17 16:58:13 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2016-03-28 16:01:37 +08:00
|
|
|
z-index: @zindex-popover;
|
2015-06-17 16:58:13 +08:00
|
|
|
font-weight: normal;
|
2019-02-15 10:48:07 +08:00
|
|
|
white-space: normal;
|
2015-06-17 16:58:13 +08:00
|
|
|
text-align: left;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: auto;
|
|
|
|
user-select: text;
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2022-05-25 14:01:29 +08:00
|
|
|
&-content {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::after {
|
2015-06-17 16:58:13 +08:00
|
|
|
position: absolute;
|
2018-12-04 13:11:31 +08:00
|
|
|
background: fade(@white, 1%);
|
2019-02-15 10:48:07 +08:00
|
|
|
content: '';
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Offset the popover to account for the popover arrow
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-top,
|
|
|
|
&-placement-topLeft,
|
|
|
|
&-placement-topRight {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-bottom: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-right,
|
|
|
|
&-placement-rightTop,
|
|
|
|
&-placement-rightBottom {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-left: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-bottom,
|
|
|
|
&-placement-bottomLeft,
|
|
|
|
&-placement-bottomRight {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-top: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-11-26 19:32:55 +08:00
|
|
|
&-placement-left,
|
|
|
|
&-placement-leftTop,
|
|
|
|
&-placement-leftBottom {
|
2017-05-13 15:07:01 +08:00
|
|
|
padding-right: @popover-distance;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-inner {
|
|
|
|
background-color: @popover-bg;
|
|
|
|
background-clip: padding-box;
|
|
|
|
border-radius: @border-radius-base;
|
2015-12-02 11:53:37 +08:00
|
|
|
box-shadow: @box-shadow-base;
|
2019-01-06 13:25:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
|
|
/* IE10+ */
|
|
|
|
&-inner {
|
|
|
|
box-shadow: @box-shadow-base;
|
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-title {
|
2016-10-20 11:23:30 +08:00
|
|
|
min-width: @popover-min-width;
|
2020-03-29 10:39:46 +08:00
|
|
|
min-height: @popover-min-height;
|
2015-06-17 16:58:13 +08:00
|
|
|
margin: 0; // reset heading margin
|
2020-03-29 10:39:46 +08:00
|
|
|
padding: 5px @popover-padding-horizontal 4px;
|
2017-09-27 22:32:49 +08:00
|
|
|
color: @heading-color;
|
2017-03-07 14:29:02 +08:00
|
|
|
font-weight: 500;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-bottom: 1px solid @border-color-split;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2016-03-17 15:10:49 +08:00
|
|
|
&-inner-content {
|
2020-03-29 10:39:46 +08:00
|
|
|
padding: @padding-sm @popover-padding-horizontal;
|
2017-05-04 01:35:06 +08:00
|
|
|
color: @popover-color;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
|
2015-06-24 19:20:47 +08:00
|
|
|
&-message {
|
2022-09-07 13:28:35 +08:00
|
|
|
display: flex;
|
2017-11-06 21:28:51 +08:00
|
|
|
padding: 4px 0 12px;
|
2017-05-04 01:35:06 +08:00
|
|
|
color: @popover-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: @font-size-base;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2022-09-07 13:28:35 +08:00
|
|
|
&-icon {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 8px;
|
2022-11-03 12:12:40 +08:00
|
|
|
color: @warning-color;
|
|
|
|
font-size: @font-size-base;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-buttons {
|
2017-11-06 21:28:51 +08:00
|
|
|
margin-bottom: 4px;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: right;
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2022-08-24 21:25:52 +08:00
|
|
|
button:not(:first-child) {
|
2015-07-16 11:50:36 +08:00
|
|
|
margin-left: 8px;
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Arrows
|
|
|
|
&-arrow {
|
2017-12-11 15:28:44 +08:00
|
|
|
position: absolute;
|
|
|
|
display: block;
|
2021-06-25 13:37:34 +08:00
|
|
|
width: @popover-arrow-rotate-width;
|
|
|
|
height: @popover-arrow-rotate-width;
|
|
|
|
overflow: hidden;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: transparent;
|
2021-06-25 13:37:34 +08:00
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
&-content {
|
2022-06-27 10:57:42 +08:00
|
|
|
--antd-arrow-background-color: @popover-bg;
|
2021-06-25 13:37:34 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
display: block;
|
|
|
|
width: @popover-arrow-width;
|
|
|
|
height: @popover-arrow-width;
|
|
|
|
margin: auto;
|
|
|
|
content: '';
|
|
|
|
pointer-events: auto;
|
2022-06-27 10:57:42 +08:00
|
|
|
.roundedArrow(@popover-arrow-width, 5px);
|
2021-06-25 13:37:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placement-top &-arrow,
|
|
|
|
&-placement-topLeft &-arrow,
|
|
|
|
&-placement-topRight &-arrow {
|
2022-05-25 14:01:29 +08:00
|
|
|
bottom: 0;
|
|
|
|
transform: translateY(100%);
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-content {
|
|
|
|
box-shadow: 3px 3px 7px fade(@black, 7%);
|
|
|
|
transform: translateY((-@popover-arrow-rotate-width / 2)) rotate(45deg);
|
|
|
|
}
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-top &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
left: 50%;
|
2022-05-25 14:01:29 +08:00
|
|
|
transform: translateY(100%) translateX(-50%);
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-topLeft &-arrow {
|
|
|
|
left: @popover-arrow-offset-horizontal;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-topRight &-arrow {
|
|
|
|
right: @popover-arrow-offset-horizontal;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-right &-arrow,
|
|
|
|
&-placement-rightTop &-arrow,
|
|
|
|
&-placement-rightBottom &-arrow {
|
2022-05-25 14:01:29 +08:00
|
|
|
left: 0;
|
|
|
|
transform: translateX(-100%);
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-content {
|
2022-02-08 09:52:33 +08:00
|
|
|
box-shadow: 3px 3px 7px fade(@black, 7%);
|
|
|
|
transform: translateX((@popover-arrow-rotate-width / 2)) rotate(135deg);
|
2021-06-25 13:37:34 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-right &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
top: 50%;
|
2022-05-25 14:01:29 +08:00
|
|
|
transform: translateX(-100%) translateY(-50%);
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-rightTop &-arrow {
|
|
|
|
top: @popover-arrow-offset-vertical;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-rightBottom &-arrow {
|
|
|
|
bottom: @popover-arrow-offset-vertical;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-bottom &-arrow,
|
|
|
|
&-placement-bottomLeft &-arrow,
|
|
|
|
&-placement-bottomRight &-arrow {
|
2022-05-25 14:01:29 +08:00
|
|
|
top: 0;
|
|
|
|
transform: translateY(-100%);
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-content {
|
2022-02-08 09:52:33 +08:00
|
|
|
box-shadow: 2px 2px 5px fade(@black, 6%);
|
|
|
|
transform: translateY((@popover-arrow-rotate-width / 2)) rotate(-135deg);
|
2021-06-25 13:37:34 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-bottom &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
left: 50%;
|
2022-05-25 14:01:29 +08:00
|
|
|
transform: translateY(-100%) translateX(-50%);
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-bottomLeft &-arrow {
|
|
|
|
left: @popover-arrow-offset-horizontal;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-bottomRight &-arrow {
|
|
|
|
right: @popover-arrow-offset-horizontal;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
|
2021-06-25 13:37:34 +08:00
|
|
|
&-placement-left &-arrow,
|
|
|
|
&-placement-leftTop &-arrow,
|
|
|
|
&-placement-leftBottom &-arrow {
|
2022-05-25 14:01:29 +08:00
|
|
|
right: 0;
|
|
|
|
transform: translateX(100%);
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-content {
|
2022-02-08 09:52:33 +08:00
|
|
|
box-shadow: 3px 3px 7px fade(@black, 7%);
|
|
|
|
transform: translateX((-@popover-arrow-rotate-width / 2)) rotate(-45deg);
|
2021-06-25 13:37:34 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-left &-arrow {
|
2016-02-24 13:57:33 +08:00
|
|
|
top: 50%;
|
2022-05-25 14:01:29 +08:00
|
|
|
transform: translateX(100%) translateY(-50%);
|
2016-02-24 13:57:33 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
|
|
|
|
&-placement-leftTop &-arrow {
|
|
|
|
top: @popover-arrow-offset-vertical;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-placement-leftBottom &-arrow {
|
|
|
|
bottom: @popover-arrow-offset-vertical;
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.generator-popover-preset-color(@i: length(@preset-colors)) when (@i > 0) {
|
|
|
|
.generator-popover-preset-color(@i - 1);
|
|
|
|
@color: extract(@preset-colors, @i);
|
|
|
|
@lightColor: '@{color}-6';
|
|
|
|
.@{popover-prefix-cls}-@{color} {
|
|
|
|
.@{popover-prefix-cls}-inner {
|
|
|
|
background-color: @@lightColor;
|
|
|
|
}
|
|
|
|
.@{popover-prefix-cls}-arrow {
|
|
|
|
&-content {
|
|
|
|
background-color: @@lightColor;
|
|
|
|
}
|
|
|
|
}
|
2015-09-28 21:02:04 +08:00
|
|
|
}
|
2015-06-17 16:58:13 +08:00
|
|
|
}
|
2021-06-25 13:37:34 +08:00
|
|
|
.generator-popover-preset-color();
|
2020-03-18 11:22:27 +08:00
|
|
|
|
2020-03-23 10:57:37 +08:00
|
|
|
@import './rtl';
|