chore: auto merge branchs (#34584)

chore: sync master to next
This commit is contained in:
github-actions[bot] 2022-03-19 09:58:36 +00:00 committed by GitHub
commit 5c234a84c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 76 additions and 42 deletions

12
.github/workflows/chain-alert.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: ChainAlert
on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]
jobs:
chainalert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: checkmarx/chainalert-github-action@v1

View File

@ -13,7 +13,7 @@ timeline: true
- 次版本号:每月发布一个带有新特性的向下兼容的版本。
- 主版本号:含有破坏性更新和新特性,不在发布周期内。
--
---
## 4.19.2

View File

@ -6,7 +6,7 @@
&:not(&-not-a-wrapper) &-count,
&:not(&-not-a-wrapper) &-dot,
&:not(&-not-a-wrapper) .@{number-prefix-cls}-custom-component {
.@{badge-prefix-cls}-rtl & {
.@{badge-prefix-cls}-rtl& {
right: auto;
left: 0;
direction: ltr;

View File

@ -2,9 +2,6 @@
@import '../../style/mixins/index';
@import './mixin';
@row-prefix-cls: ~'@{ant-prefix}-row';
@col-prefix-cls: ~'@{ant-prefix}-col';
// Grid system
.@{row-prefix-cls} {
display: flex;

View File

@ -1,49 +1,52 @@
@import '../../style/mixins/index';
@row-prefix-cls: ~'@{ant-prefix}-row';
@col-prefix-cls: ~'@{ant-prefix}-col';
// mixins for grid system
// ------------------------
.loop-grid-columns(@index, @class) when (@index > 0) {
.@{ant-prefix}-col@{class}-@{index} {
.@{col-prefix-cls}@{class}-@{index} {
display: block;
flex: 0 0 percentage((@index / @grid-columns));
max-width: percentage((@index / @grid-columns));
}
.@{ant-prefix}-col@{class}-push-@{index} {
.@{col-prefix-cls}@{class}-push-@{index} {
left: percentage((@index / @grid-columns));
}
.@{ant-prefix}-col@{class}-pull-@{index} {
.@{col-prefix-cls}@{class}-pull-@{index} {
right: percentage((@index / @grid-columns));
}
.@{ant-prefix}-col@{class}-offset-@{index} {
.@{col-prefix-cls}@{class}-offset-@{index} {
margin-left: percentage((@index / @grid-columns));
}
.@{ant-prefix}-col@{class}-order-@{index} {
.@{col-prefix-cls}@{class}-order-@{index} {
order: @index;
}
.loop-grid-columns((@index - 1), @class);
}
.loop-grid-columns(@index, @class) when (@index = 0) {
.@{ant-prefix}-col@{class}-@{index} {
.@{col-prefix-cls}@{class}-@{index} {
display: none;
}
.@{ant-prefix}-col-push-@{index} {
.@{col-prefix-cls}-push-@{index} {
left: auto;
}
.@{ant-prefix}-col-pull-@{index} {
.@{col-prefix-cls}-pull-@{index} {
right: auto;
}
.@{ant-prefix}-col@{class}-push-@{index} {
.@{col-prefix-cls}@{class}-push-@{index} {
left: auto;
}
.@{ant-prefix}-col@{class}-pull-@{index} {
.@{col-prefix-cls}@{class}-pull-@{index} {
right: auto;
}
.@{ant-prefix}-col@{class}-offset-@{index} {
.@{col-prefix-cls}@{class}-offset-@{index} {
margin-left: 0;
}
.@{ant-prefix}-col@{class}-order-@{index} {
.@{col-prefix-cls}@{class}-order-@{index} {
order: 0;
}
}

View File

@ -1,7 +1,8 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './mixin';
.@{ant-prefix}-row {
.@{row-prefix-cls} {
&-rtl {
direction: rtl;
}
@ -9,25 +10,25 @@
// mixin
.loop-grid-columns(@index, @class) when (@index > 0) {
.@{ant-prefix}-col@{class}-push-@{index} {
.@{col-prefix-cls}@{class}-push-@{index} {
// reset property in RTL direction
&.@{ant-prefix}-col-rtl {
&.@{col-prefix-cls}-rtl {
right: percentage((@index / @grid-columns));
left: auto;
}
}
.@{ant-prefix}-col@{class}-pull-@{index} {
.@{col-prefix-cls}@{class}-pull-@{index} {
// reset property in RTL direction
&.@{ant-prefix}-col-rtl {
&.@{col-prefix-cls}-rtl {
right: auto;
left: percentage((@index / @grid-columns));
}
}
.@{ant-prefix}-col@{class}-offset-@{index} {
.@{col-prefix-cls}@{class}-offset-@{index} {
// reset property in RTL direction
&.@{ant-prefix}-col-rtl {
&.@{col-prefix-cls}-rtl {
margin-right: percentage((@index / @grid-columns));
margin-left: 0;
}
@ -35,33 +36,33 @@
}
.loop-grid-columns(@index, @class) when (@index = 0) {
.@{ant-prefix}-col-push-@{index} {
.@{col-prefix-cls}-push-@{index} {
// reset property in RTL direction
&.@{ant-prefix}-col-rtl {
&.@{col-prefix-cls}-rtl {
right: auto;
}
}
.@{ant-prefix}-col-pull-@{index} {
&.@{ant-prefix}-col-rtl {
.@{col-prefix-cls}-pull-@{index} {
&.@{col-prefix-cls}-rtl {
left: auto;
}
}
.@{ant-prefix}-col@{class}-push-@{index} {
&.@{ant-prefix}-col-rtl {
.@{col-prefix-cls}@{class}-push-@{index} {
&.@{col-prefix-cls}-rtl {
right: auto;
}
}
.@{ant-prefix}-col@{class}-pull-@{index} {
&.@{ant-prefix}-col-rtl {
.@{col-prefix-cls}@{class}-pull-@{index} {
&.@{col-prefix-cls}-rtl {
left: auto;
}
}
.@{ant-prefix}-col@{class}-offset-@{index} {
&.@{ant-prefix}-col-rtl {
.@{col-prefix-cls}@{class}-offset-@{index} {
&.@{col-prefix-cls}-rtl {
margin-right: 0;
}
}

View File

@ -146,7 +146,7 @@ const Input = forwardRef<InputRef, InputProps>((props, ref) => {
// Style
const [wrapSSR, hashId] = useStyle(prefixCls, iconPrefixCls);
// ===================== Status =====================
// ===================== Size =====================
const size = React.useContext(SizeContext);
const mergedSize = customSize || size;

View File

@ -0,0 +1,17 @@
import React from 'react';
import { mount } from 'enzyme';
import Input from '..';
import { InputProps } from '../Input';
describe('Input types', () => {
it('should support data-attributes', () => {
const dataProps: InputProps = {
'data-test': 'test',
size: 'large',
};
const wrapper = mount(<Input {...dataProps} />);
expect(wrapper.find('input').prop('data-test')).toBe('test');
const wrapper2 = mount(<Input data-test="test" size="large" />);
expect(wrapper2.find('input').prop('data-test')).toBe('test');
});
});

View File

@ -29,7 +29,7 @@ A basic widget for getting the user input is a text field. Keyboard and mouse ca
| showCount | Whether show text count | boolean \| { formatter: ({ count: number, maxLength?: number }) => ReactNode } | false | 4.18.0 |
| status | Set validation status | 'error' \| 'warning' | - | 4.19.0 |
| prefix | The prefix icon for the Input | ReactNode | - | |
| size | The size of the input box. Note: in the context of a form, the `large` size is used | `large` \| `middle` \| `small` | - | |
| size | The size of the input box. Note: in the context of a form, the `middle` size is used | `large` \| `middle` \| `small` | - | |
| suffix | The suffix icon for the Input | ReactNode | - | |
| type | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)( use `Input.TextArea` instead of `type="textarea"`) | string | `text` | |
| value | The input content value | string | - | |

View File

@ -30,7 +30,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/xS9YEJhfe/Input.svg
| showCount | 是否展示字数 | boolean \| { formatter: ({ count: number, maxLength?: number }) => ReactNode } | false | 4.18.0 |
| status | 设置校验状态 | 'error' \| 'warning' | - | 4.19.0 |
| prefix | 带有前缀图标的 input | ReactNode | - | |
| size | 控件大小。注:标准表单内的输入框大小限制为 `large` | `large` \| `middle` \| `small` | - | |
| size | 控件大小。注:标准表单内的输入框大小限制为 `middle` | `large` \| `middle` \| `small` | - | |
| suffix | 带有后缀图标的 input | ReactNode | - | |
| type | 声明 input 类型,同原生 input 标签的 type 属性,见:[MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input#属性)(请直接使用 `Input.TextArea` 代替 `type="textarea"`) | string | `text` | |
| value | 输入框内容 | string | - | |

View File

@ -17,6 +17,8 @@ const localeValues: Locale = {
filterTitle: 'Menù Filtro',
filterConfirm: 'OK',
filterReset: 'Reset',
selectNone: 'Deseleziona tutto',
selectionAll: 'Seleziona tutto',
selectAll: 'Seleziona pagina corrente',
selectInvert: 'Inverti selezione nella pagina corrente',
sortTitle: 'Ordina',

View File

@ -6,7 +6,7 @@ import TimePicker from '../time-picker/locale/lt_LT';
import Calendar from '../calendar/locale/lt_LT';
import { Locale } from '../locale-provider';
const typeTemplate: string = '${label} не является типом ${type}';
const typeTemplate: string = '${label} neatitinka tipo ${type}';
const localeValues: Locale = {
locale: 'lt',

View File

@ -201,7 +201,7 @@
}
.@{tooltip-prefix-cls}-arrow {
&-content::before {
background-color: @@lightColor;
background: @@lightColor;
}
}
}

View File

@ -55,6 +55,7 @@ Tree selection control.
| treeDefaultExpandedKeys | Default expanded treeNodes | string\[] | - | |
| treeExpandedKeys | Set expanded keys | string\[] | - | |
| treeIcon | Shows the icon before a TreeNode's title. There is no default style; you must set a custom style for it if set to `true` | boolean | false | |
| treeLoadedKeys | (Controlled) Set loaded tree nodes, work with `loadData` only | string[] | [] | |
| treeLine | Show the line. Ref [Tree - showLine](/components/tree/#components-tree-demo-line) | boolean \| object | false | 4.17.0 |
| treeNodeFilterProp | Will be used for filtering if `filterTreeNode` returns true | string | `value` | |
| treeNodeLabelProp | Will render as content of select | string | `title` | |

View File

@ -57,6 +57,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Ax4DA0njr/TreeSelect.svg
| treeExpandedKeys | 设置展开的树节点 | string\[] | - | |
| treeIcon | 是否展示 TreeNode title 前的图标,没有默认样式,如设置为 true需要自行定义图标相关样式 | boolean | false | |
| treeLine | 是否展示线条样式,请参考 [Tree - showLine](/components/tree/#components-tree-demo-line) | boolean \| object | false | 4.17.0 |
| treeLoadedKeys | (受控)已经加载的节点,需要配合 `loadData` 使用 | string[] | [] | |
| treeNodeFilterProp | 输入项过滤对应的 treeNode 属性 | string | `value` | |
| treeNodeLabelProp | 作为显示的 prop 设置 | string | `title` | |
| value | 指定当前选中的条目 | string \| string\[] | - | |

View File

@ -45,7 +45,6 @@ Almost anything can be represented in a tree structure. Examples include directo
| switcherIcon | Customize collapse/expand icon of tree node | ReactNode | - | |
| titleRender | Customize tree node title render | (nodeData) => ReactNode | - | 4.5.0 |
| treeData | The treeNodes data Array, if set it then you need not to construct children TreeNode. (key should be unique across the whole array) | array&lt;{ key, title, children, \[disabled, selectable] }> | - | |
| treeLoadedKeys | (Controlled) Set loaded tree nodes, work with `loadData` only | string[] | [] | |
| virtual | Disable virtual scroll when set to false | boolean | true | 4.1.0 |
| onCheck | Callback function for when the onCheck event occurs | function(checkedKeys, e:{checked: bool, checkedNodes, node, event, halfCheckedKeys}) | - | |
| onDragEnd | Callback function for when the onDragEnd event occurs | function({event, node}) | - | |

View File

@ -46,7 +46,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Xh-oWqg9k/Tree.svg
| switcherIcon | 自定义树节点的展开/折叠图标 | ReactNode | - | |
| titleRender | 自定义渲染节点 | (nodeData) => ReactNode | - | 4.5.0 |
| treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点key 在整个树范围内唯一) | array&lt;{key, title, children, \[disabled, selectable]}> | - | |
| treeLoadedKeys | (受控)已经加载的节点,需要配合 `loadData` 使用 | string[] | [] | |
| virtual | 设置 false 时关闭虚拟滚动 | boolean | true | 4.1.0 |
| onCheck | 点击复选框触发 | function(checkedKeys, e:{checked: bool, checkedNodes, node, event, halfCheckedKeys}) | - | |
| onDragEnd | dragend 触发时调用 | function({event, node}) | - | |

View File

@ -39,6 +39,7 @@ title: Third-Party Libraries
| Animation | [react-move](https://github.com/react-tools/react-move) [Ant Motion](https://motion.ant.design/components/tween-one) [react-spring](https://www.react-spring.io) |
| Page Footer | [rc-footer](https://github.com/react-component/footer) |
| Water Mark | [WaterMark](https://procomponents.ant.design/components/water-mark) |
| Currency | [react-number-format](https://github.com/s-yadav/react-number-format) [react-currency-input-fiel](https://github.com/cchanxzy/react-currency-input-field) |
## Products we are using ✨

View File

@ -39,6 +39,7 @@ title: 社区精选组件
| 动画 | [react-move](https://github.com/react-tools/react-move) [Ant Motion](https://motion.ant.design/components/tween-one) [react-spring](https://www.react-spring.io) |
| 页脚 | [rc-footer](https://github.com/react-component/footer) |
| 水印 | [WaterMark](https://procomponents.ant.design/components/water-mark) |
| 金额格式化 | [react-number-format](https://github.com/s-yadav/react-number-format) [react-currency-input-fiel](https://github.com/cchanxzy/react-currency-input-field) |
## 推荐产品 ✨

View File

@ -168,7 +168,7 @@
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@types/enzyme": "^3.10.5",
"@types/gtag.js": "^0.0.8",
"@types/gtag.js": "^0.0.10",
"@types/jest": "^27.0.0",
"@types/jest-axe": "^3.5.3",
"@types/jest-environment-puppeteer": "^5.0.0",