style: add @zindex-popoconfirm (#25693)

* style: adjust @zindex-popover

* add ant-popconfirm

* update snap
This commit is contained in:
xrkffgg 2020-07-20 13:39:28 +08:00 committed by GitHub
parent 1cd7331c42
commit 309c8d4404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 82 additions and 61 deletions

View File

@ -18807,7 +18807,7 @@ exports[`ConfigProvider components Popconfirm configProvider 1`] = `
</span>
<div>
<div
class="config-popover"
class="config-popover config-popconfirm"
style="opacity:0"
>
<div
@ -18891,7 +18891,7 @@ exports[`ConfigProvider components Popconfirm configProvider componentSize large
</span>
<div>
<div
class="config-popover"
class="config-popover config-popconfirm"
style="opacity:0"
>
<div
@ -18975,7 +18975,7 @@ exports[`ConfigProvider components Popconfirm configProvider componentSize middl
</span>
<div>
<div
class="config-popover"
class="config-popover config-popconfirm"
style="opacity:0"
>
<div
@ -19059,7 +19059,7 @@ exports[`ConfigProvider components Popconfirm configProvider virtual and dropdow
</span>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity:0"
>
<div
@ -19143,7 +19143,7 @@ exports[`ConfigProvider components Popconfirm normal 1`] = `
</span>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity:0"
>
<div
@ -19227,7 +19227,7 @@ exports[`ConfigProvider components Popconfirm prefixCls 1`] = `
</span>
<div>
<div
class="prefix-Popconfirm"
class="prefix-Popconfirm prefix-Popconfirm"
style="opacity:0"
>
<div

View File

@ -5308,7 +5308,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -10352,7 +10352,7 @@ exports[`Locale Provider should display the text as az 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -15396,7 +15396,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -20440,7 +20440,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -25484,7 +25484,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -30528,7 +30528,7 @@ exports[`Locale Provider should display the text as da 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -35572,7 +35572,7 @@ exports[`Locale Provider should display the text as de 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -40616,7 +40616,7 @@ exports[`Locale Provider should display the text as el 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -45660,7 +45660,7 @@ exports[`Locale Provider should display the text as en 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -50704,7 +50704,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -55748,7 +55748,7 @@ exports[`Locale Provider should display the text as es 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -60792,7 +60792,7 @@ exports[`Locale Provider should display the text as et 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -65836,7 +65836,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -70880,7 +70880,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -75924,7 +75924,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -80968,7 +80968,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -86012,7 +86012,7 @@ exports[`Locale Provider should display the text as ga 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -91056,7 +91056,7 @@ exports[`Locale Provider should display the text as he 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -96100,7 +96100,7 @@ exports[`Locale Provider should display the text as hi 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -101144,7 +101144,7 @@ exports[`Locale Provider should display the text as hr 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -106188,7 +106188,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -111232,7 +111232,7 @@ exports[`Locale Provider should display the text as hy-am 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -116276,7 +116276,7 @@ exports[`Locale Provider should display the text as id 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -121320,7 +121320,7 @@ exports[`Locale Provider should display the text as is 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -126364,7 +126364,7 @@ exports[`Locale Provider should display the text as it 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -131408,7 +131408,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -136452,7 +136452,7 @@ exports[`Locale Provider should display the text as kn 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -141496,7 +141496,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -146540,7 +146540,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -151584,7 +151584,7 @@ exports[`Locale Provider should display the text as lv 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -156628,7 +156628,7 @@ exports[`Locale Provider should display the text as mk 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -161672,7 +161672,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -166716,7 +166716,7 @@ exports[`Locale Provider should display the text as ms-my 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -171760,7 +171760,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -176804,7 +176804,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -181848,7 +181848,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -186892,7 +186892,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -191936,7 +191936,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -196980,7 +196980,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -202024,7 +202024,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -207068,7 +207068,7 @@ exports[`Locale Provider should display the text as ro 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -212112,7 +212112,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -217156,7 +217156,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -222200,7 +222200,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -227244,7 +227244,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -232288,7 +232288,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -237332,7 +237332,7 @@ exports[`Locale Provider should display the text as ta 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -242376,7 +242376,7 @@ exports[`Locale Provider should display the text as th 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -247420,7 +247420,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -252464,7 +252464,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -257508,7 +257508,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -262552,7 +262552,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div
@ -267596,7 +267596,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
</a>
<div>
<div
class="ant-popover"
class="ant-popover ant-popconfirm"
style="opacity: 0;"
>
<div

View File

@ -1,4 +1,5 @@
import * as React from 'react';
import classNames from 'classnames';
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
import KeyCode from 'rc-util/lib/KeyCode';
import Tooltip, { AbstractTooltipProps } from '../tooltip';
@ -121,8 +122,16 @@ const Popconfirm = React.forwardRef<unknown, PopconfirmProps>((props, ref) => {
const { getPrefixCls } = React.useContext(ConfigContext);
const { prefixCls: customizePrefixCls, placement, children, ...restProps } = props;
const {
prefixCls: customizePrefixCls,
placement,
children,
overlayClassName,
...restProps
} = props;
const prefixCls = getPrefixCls('popover', customizePrefixCls);
const prefixClsConfirm = getPrefixCls('popconfirm', customizePrefixCls);
const overlayClassNames = classNames(prefixClsConfirm, overlayClassName);
const overlay = (
<LocaleReceiver componentName="Popconfirm" defaultLocale={defaultLocale.Popconfirm}>
@ -138,6 +147,7 @@ const Popconfirm = React.forwardRef<unknown, PopconfirmProps>((props, ref) => {
onVisibleChange={onVisibleChange}
visible={visible}
overlay={overlay}
overlayClassName={overlayClassNames}
ref={ref as any}
>
{cloneElement(children, {

View File

@ -0,0 +1,8 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@popconfirm-prefix-cls: ~'@{ant-prefix}-popconfirm';
.@{popconfirm-prefix-cls} {
z-index: @zindex-popoconfirm;
}

View File

@ -4,3 +4,5 @@ import '../../style/index.less';
// deps-lint-skip: tooltip, popover
import '../../popover/style';
import '../../button/style';
import './index.less';

View File

@ -336,7 +336,8 @@
@zindex-popover: 1030;
@zindex-dropdown: 1050;
@zindex-picker: 1050;
@zindex-tooltip: 1060;
@zindex-popoconfirm: 1060;
@zindex-tooltip: 1070;
// Animation
@animation-duration-slow: 0.3s; // Modal