Skip to content

Commit

Permalink
chore: auto merge branchs (ant-design#30926)
Browse files Browse the repository at this point in the history
chore: sync master into feature
  • Loading branch information
github-actions[bot] committed Jun 9, 2021
2 parents 5ddd9e6 + 748be64 commit 827d34d
Show file tree
Hide file tree
Showing 16 changed files with 134 additions and 61 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/issue-open-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ jobs:
你好 @${{ github.event.issue.user.login }},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 [issue 助手](http://new-issue.ant.design) 来创建 issue 以方便我们定位错误。谢谢配合!
- name: check website
if: contains(github.event.issue.body, 'ant-design-issue-helper') == true
uses: actions-cool/issues-helper@v1.2
id: checkid
with:
actions: 'check-issue'
issue-number: ${{ github.event.issue.number }}
# 格式如:'x1,x2' or 'x1,x2/y1,y2' 最多支持 2 个数组
title-includes: '官网,网站,国内,镜像,mobile ant design,mobile.ant.design,ant design,ant.design,pro/挂了,无法访问,不能访问,访问不了,出问题,打不开,登不上,can not open,can not be reached'
title-includes: '官网,网站,国内,镜像,mobile ant design,mobile.ant.design,ant design,ant design pro,pro.ant.design,挂了,挂掉了,无法访问,不能访问,访问不了,出问题,打不开,登不上,can not open,cannot open,can not be reached'

- name: deal website
if: steps.checkid.outputs.check-result == 'true'
Expand Down
12 changes: 6 additions & 6 deletions components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,21 @@
&-hidden {
display: none;
}
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-bottomLeft,
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-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 {
&.@{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 {
animation-name: antSlideDownIn;
}

&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-bottomLeft {
animation-name: antSlideUpOut;
}

&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topLeft {
animation-name: antSlideDownOut;
}
}
Expand Down
24 changes: 12 additions & 12 deletions components/date-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -235,27 +235,27 @@
}
}

&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topRight {
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topLeft,
&.@{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-topLeft,
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topRight {
animation-name: antSlideDownIn;
}

&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-enter.slide-up-enter-active&-placement-bottomRight,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomRight {
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-bottomLeft,
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-bottomRight,
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-bottomLeft,
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-bottomRight {
animation-name: antSlideUpIn;
}

&.slide-up-leave.slide-up-leave-active&-placement-topLeft,
&.slide-up-leave.slide-up-leave-active&-placement-topRight {
&.@{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-topRight {
animation-name: antSlideDownOut;
}

&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft,
&.slide-up-leave.slide-up-leave-active&-placement-bottomRight {
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-bottomLeft,
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-bottomRight {
animation-name: antSlideUpOut;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/dropdown/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ const menu = (
</Menu.Item>
<Menu.Item icon={<DownOutlined />} disabled>
<a target="_blank" rel="noopener noreferrer" href="https://www.aliyun.com">
2nd menu item
2nd menu item (disabled)
</a>
</Menu.Item>
<Menu.Item disabled>
<a target="_blank" rel="noopener noreferrer" href="https://www.luohanacademy.com">
3rd menu item
3rd menu item (disabled)
</a>
</Menu.Item>
<Menu.Item danger>a danger item</Menu.Item>
Expand Down
38 changes: 20 additions & 18 deletions components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
}

&-title-content {
flex: auto;

> a {
color: inherit;
transition: all @animation-duration-slow;
Expand Down Expand Up @@ -296,33 +298,33 @@
}
}

&.slide-down-enter.slide-down-enter-active&-placement-bottomLeft,
&.slide-down-appear.slide-down-appear-active&-placement-bottomLeft,
&.slide-down-enter.slide-down-enter-active&-placement-bottomCenter,
&.slide-down-appear.slide-down-appear-active&-placement-bottomCenter,
&.slide-down-enter.slide-down-enter-active&-placement-bottomRight,
&.slide-down-appear.slide-down-appear-active&-placement-bottomRight {
&.@{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 {
animation-name: antSlideUpIn;
}

&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
&.slide-up-appear.slide-up-appear-active&-placement-topLeft,
&.slide-up-enter.slide-up-enter-active&-placement-topCenter,
&.slide-up-appear.slide-up-appear-active&-placement-topCenter,
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
&.slide-up-appear.slide-up-appear-active&-placement-topRight {
&.@{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 {
animation-name: antSlideDownIn;
}

&.slide-down-leave.slide-down-leave-active&-placement-bottomLeft,
&.slide-down-leave.slide-down-leave-active&-placement-bottomCenter,
&.slide-down-leave.slide-down-leave-active&-placement-bottomRight {
&.@{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 {
animation-name: antSlideUpOut;
}

&.slide-up-leave.slide-up-leave-active&-placement-topLeft,
&.slide-up-leave.slide-up-leave-active&-placement-topCenter,
&.slide-up-leave.slide-up-leave-active&-placement-topRight {
&.@{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 {
animation-name: antSlideDownOut;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/locale/pl_PL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const localeValues: Locale = {
filterReset: 'Wyczyść',
selectAll: 'Zaznacz bieżącą stronę',
selectInvert: 'Odwróć zaznaczenie',
triggerDesc: 'Sortuj rosnąco',
triggerAsc: 'Sortuj malejąco',
triggerDesc: 'Sortuj malejąco',
triggerAsc: 'Sortuj rosnąco',
cancelSort: 'Usuń sortowanie',
},
Modal: {
Expand Down
9 changes: 1 addition & 8 deletions components/menu/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@
background-color: @border-color-split;
}

&-item:hover,
&-item-active,
&:not(&-inline) &-submenu-open,
&-submenu-active,
&-submenu-title:hover {
color: @menu-highlight-color;
}

&-horizontal &-item,
&-horizontal &-submenu {
margin-top: -1px;
Expand Down Expand Up @@ -671,5 +663,6 @@
}
}

@import './light';
@import './dark';
@import './rtl';
12 changes: 12 additions & 0 deletions components/menu/style/light.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.@{menu-prefix-cls} {
// light theme
&-light {
.@{menu-prefix-cls}-item:hover,
.@{menu-prefix-cls}-item-active,
.@{menu-prefix-cls}:not(.@{menu-prefix-cls}-inline) .@{menu-prefix-cls}-submenu-open,
.@{menu-prefix-cls}-submenu-active,
.@{menu-prefix-cls}-submenu-title:hover {
color: @menu-highlight-color;
}
}
}
2 changes: 1 addition & 1 deletion components/message/__tests__/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('message.config', () => {
transitionName: '',
});
message.info('last');
expect(document.querySelectorAll('.move-up-enter').length).toBe(0);
expect(document.querySelectorAll('.ant-move-up-enter').length).toBe(0);
message.config({
transitionName: 'ant-move-up',
});
Expand Down
2 changes: 1 addition & 1 deletion components/message/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
font-size: @font-size-lg;
}

&-notice.move-up-leave.move-up-leave-active {
&-notice.@{ant-prefix}-move-up-leave.@{ant-prefix}-move-up-leave-active {
animation-name: MessageMoveOut;
animation-duration: 0.3s;
}
Expand Down
12 changes: 6 additions & 6 deletions components/select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,21 @@
outline: none;
box-shadow: @box-shadow-base;

&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-bottomLeft,
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-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 {
&.@{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 {
animation-name: antSlideDownIn;
}

&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-bottomLeft {
animation-name: antSlideUpOut;
}

&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topLeft {
animation-name: antSlideDownOut;
}

Expand Down
4 changes: 2 additions & 2 deletions components/style/mixins/modal-mask.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
.modal-mask() {
pointer-events: none;

&.zoom-enter,
&.zoom-appear {
&.@{ant-prefix}-zoom-enter,
&.@{ant-prefix}zoom-appear {
transform: none; // reset scale avoid mousePosition bug
opacity: 0;
animation-duration: @animation-duration-slow;
Expand Down
4 changes: 4 additions & 0 deletions components/table/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12957,6 +12957,7 @@ exports[`renders ./components/table/demo/resizable-column.md correctly 1`] = `
Date
<span
class="react-resizable-handle"
handleaxis="se"
/>
</th>
<th
Expand Down Expand Up @@ -13019,6 +13020,7 @@ exports[`renders ./components/table/demo/resizable-column.md correctly 1`] = `
</div>
<span
class="react-resizable-handle"
handleaxis="se"
/>
</th>
<th
Expand All @@ -13027,6 +13029,7 @@ exports[`renders ./components/table/demo/resizable-column.md correctly 1`] = `
Type
<span
class="react-resizable-handle"
handleaxis="se"
/>
</th>
<th
Expand All @@ -13035,6 +13038,7 @@ exports[`renders ./components/table/demo/resizable-column.md correctly 1`] = `
Note
<span
class="react-resizable-handle"
handleaxis="se"
/>
</th>
<th
Expand Down
17 changes: 16 additions & 1 deletion components/table/hooks/useFilter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import devWarning from '../../../_util/devWarning';
import {
TransformColumns,
ColumnsType,
Expand Down Expand Up @@ -207,11 +208,25 @@ function useFilter<RecordType>({
const mergedFilterStates = React.useMemo(() => {
const collectedStates = collectFilterStates(mergedColumns, false);

const filteredKeysIsNotControlled = collectedStates.every(
({ filteredKeys }) => filteredKeys === undefined,
);

// Return if not controlled
if (collectedStates.every(({ filteredKeys }) => filteredKeys === undefined)) {
if (filteredKeysIsNotControlled) {
return filterStates;
}

const filteredKeysIsAllControlled = collectedStates.every(
({ filteredKeys }) => filteredKeys !== undefined,
);

devWarning(
filteredKeysIsNotControlled || filteredKeysIsAllControlled,
'Table',
'`FilteredKeys` should all be controlled or not controlled.',
);

return collectedStates;
}, [mergedColumns, filterStates]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,15 @@ Array [
]
`;

exports[`renders ./components/typography/demo/ellipsis-middle.md correctly 1`] = `
<span
class="ant-typography ant-typography-ellipsis ant-typography-single-line"
style="max-width:100%"
>
In the process of internal desktop applications development, many different design specs and implementations would be involved, which might cause designers and developers difficulties and duplication and reduce the efficiency ofdevelopment.
</span>
`;

exports[`renders ./components/typography/demo/interactive.md correctly 1`] = `
Array [
<div
Expand Down
39 changes: 39 additions & 0 deletions components/typography/demo/ellipsis-middle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
order: 4.1
title:
zh-CN: 省略中间
en-US: Ellipsis from middle
---

## zh-CN

使用 `ellipsis={{ suffix: ... }}` 可以封装一个从中间省略内容的组件,适合于需要保留文本末位特征的内容。

## en-US

You can ellipsis content from middle by customize `ellipsis={{ suffix: ... }}`.

```jsx
import { Typography } from 'antd';

const { Text } = Typography;

const EllipsisMiddle = ({ suffixCount, children }) => {
const start = children.slice(0, children.length - suffixCount).trim();
const suffix = children.slice(-suffixCount).trim();
return (
<Text style={{ maxWidth: '100%' }} ellipsis={{ suffix }}>
{start}
</Text>
);
};

ReactDOM.render(
<EllipsisMiddle suffixCount={12}>
In the process of internal desktop applications development, many different design specs and
implementations would be involved, which might cause designers and developers difficulties and
duplication and reduce the efficiency of development.
</EllipsisMiddle>,
mountNode,
);
```

0 comments on commit 827d34d

Please sign in to comment.