diff --git a/components/badge/__tests__/__snapshots__/demo.test.js.snap b/components/badge/__tests__/__snapshots__/demo.test.js.snap
index 4467d46442..578500ea1e 100644
--- a/components/badge/__tests__/__snapshots__/demo.test.js.snap
+++ b/components/badge/__tests__/__snapshots__/demo.test.js.snap
@@ -2211,6 +2211,349 @@ exports[`renders ./components/badge/demo/ribbon-debug.md correctly 1`] = `
`;
+exports[`renders ./components/badge/demo/size.md correctly 1`] = `
+Array [
+
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+ 0
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+ 0
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+
+ ,
+
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+ 0
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+ 0
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+
+ ,
+]
+`;
+
exports[`renders ./components/badge/demo/status.md correctly 1`] = `
@@ -896,5 +929,10 @@ Array [
>
h4. Ant Design
,
+
+ h5. Ant Design
+
,
]
`;
diff --git a/components/typography/__tests__/index.test.js b/components/typography/__tests__/index.test.js
index c7900f081b..87924615a0 100644
--- a/components/typography/__tests__/index.test.js
+++ b/components/typography/__tests__/index.test.js
@@ -65,7 +65,7 @@ describe('Typography', () => {
mount(
);
expect(errorSpy).toHaveBeenCalledWith(
- 'Warning: [antd: Typography.Title] Title only accept `1 | 2 | 3 | 4` as `level` value.',
+ 'Warning: [antd: Typography.Title] Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.',
);
});
});
diff --git a/components/typography/demo/interactive.md b/components/typography/demo/interactive.md
index 9b8b0c31d7..38d2a4b63d 100644
--- a/components/typography/demo/interactive.md
+++ b/components/typography/demo/interactive.md
@@ -22,6 +22,7 @@ const { Paragraph } = Typography;
class Demo extends React.Component {
state = {
str: 'This is an editable text.',
+ lengthLimitedStr: 'This is an editable text with limited length.',
};
onChange = str => {
@@ -29,10 +30,24 @@ class Demo extends React.Component {
this.setState({ str });
};
+ onLengthLimitedStrChange = lengthLimitedStr => {
+ this.setState({ lengthLimitedStr });
+ };
+
render() {
+ const { lengthLimitedStr } = this.state;
return (
<>
{this.state.str}
+
+ {lengthLimitedStr}
+
This is a copyable text.
Replace copy text.
}}>Custom icon.
diff --git a/components/typography/demo/title.md b/components/typography/demo/title.md
index e3a4188fd2..7333b7fcc3 100644
--- a/components/typography/demo/title.md
+++ b/components/typography/demo/title.md
@@ -24,6 +24,7 @@ ReactDOM.render(
h2. Ant Design
h3. Ant Design
h4. Ant Design
+
h5. Ant Design
>,
mountNode,
);
diff --git a/components/typography/index.en-US.md b/components/typography/index.en-US.md
index 3592d67604..105c4a7ed3 100644
--- a/components/typography/index.en-US.md
+++ b/components/typography/index.en-US.md
@@ -23,7 +23,7 @@ Basic text writing, including headings, body text, lists, and more.
| copyable | Whether to be copyable, customize it via setting an object | boolean \| { text: string, onCopy: function, icon: ReactNode, tooltips: \[ReactNode, ReactNode\] } | false | icon and tooltips: 4.4.0 |
| delete | Deleted line style | boolean | false | |
| disabled | Disabled content | boolean | false | |
-| editable | If editable. Can control edit state when is object | boolean \| { editing: boolean, onStart: function, onChange: function(string) } | false | |
+| editable | If editable. Can control edit state when is object | boolean \| { editing: boolean, maxLength: number, autoSize: true \| false \| { minRows: number, maxRows: number }, onStart: function, onChange: function(string) } | false | maxLength and autoSize: 4.6.0 |
| ellipsis | Display ellipsis when text overflows. Should set width when ellipsis needed | boolean | false | |
| mark | Marked style | boolean | false | |
| keyboard | Keyboard style | boolean | false | 4.3.0 |
@@ -40,9 +40,9 @@ Basic text writing, including headings, body text, lists, and more.
| copyable | Whether to be copyable, customize it via setting an object | boolean \| { text: string, onCopy: function, icon: ReactNode, tooltips: \[ReactNode, ReactNode\] } | false | icon and tooltips: 4.4.0 |
| delete | Deleted line style | boolean | false | |
| disabled | Disabled content | boolean | false | |
-| editable | If editable. Can control edit state when is object | boolean \| { editing: boolean, onStart: function, onChange: function(string) } | false | |
+| editable | If editable. Can control edit state when is object | boolean \| { editing: boolean, maxLength: number, autoSize: true \| false \| { minRows: number, maxRows: number }, onStart: function, onChange: function(string) } | false | maxLength and autoSize: 4.6.0 |
| ellipsis | Display ellipsis when text overflows. Can configure rows and expandable by using object | boolean \| { rows: number, expandable: boolean, onExpand: function(event), onEllipsis: function(ellipsis) } | false | onEllipsis: 4.2.0 |
-| level | Set content importance. Match with `h1`, `h2`, `h3`, `h4` | number: 1, 2, 3, 4 | 1 | |
+| level | Set content importance. Match with `h1`, `h2`, `h3`, `h4`, `h5` | number: 1, 2, 3, 4, 5 | 1 | 5: 4.6.0 |
| mark | Marked style | boolean | false | |
| underline | Underlined style | boolean | false | |
| onChange | Trigger when user edits the content | function(string) | - | |
@@ -56,7 +56,7 @@ Basic text writing, including headings, body text, lists, and more.
| copyable | Whether to be copyable, customize it via setting an object | boolean \| { text: string, onCopy: function, icon: ReactNode, tooltips: \[ReactNode, ReactNode\] } | false | icon and tooltips: 4.4.0 |
| delete | Deleted line style | boolean | false | |
| disabled | Disabled content | boolean | false | |
-| editable | If editable. Can control edit state when is object | boolean \| { editing: boolean, onStart: function, onChange: function(string) } | false | |
+| editable | If editable. Can control edit state when is object | boolean \| { editing: boolean, maxLength: number, autoSize: true \| false \| { minRows: number, maxRows: number }, onStart: function, onChange: function(string) } | false | maxLength and autoSize: 4.6.0 |
| ellipsis | Display ellipsis when text overflows. Can configure rows expandable and suffix by using object | boolean \| { rows: number, expandable: boolean, suffix: string, symbol: React.ReactNode, onExpand: function(event), onEllipsis: function(ellipsis) } | false | onEllipsis: 4.2.0 |
| mark | Marked style | boolean | false | |
| underline | Underlined style | boolean | false | |
diff --git a/components/typography/index.zh-CN.md b/components/typography/index.zh-CN.md
index daaac6958b..d0ac8a9f50 100644
--- a/components/typography/index.zh-CN.md
+++ b/components/typography/index.zh-CN.md
@@ -24,7 +24,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
| copyable | 是否可拷贝,为对象时可进行各种自定义 | boolean \| { text: string, onCopy: function, icon: ReactNode, tooltips: \[ReactNode, ReactNode\] } | false | `icon` 和 `tooltips` 在 `4.4.0` 支持 |
| delete | 添加删除线样式 | boolean | false | |
| disabled | 禁用文本 | boolean | false | |
-| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, onStart: function, onChange: function(string) } | false | |
+| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, maxLength: number, autoSize: true \| false \| { minRows: number, maxRows: number }, onStart: function, onChange: function(string) } | false | maxLength and autoSize: 4.6.0 |
| ellipsis | 设置自动溢出省略,需要设置元素宽度 | boolean | false | |
| mark | 添加标记样式 | boolean | false | |
| keyboard | 添加键盘样式 | boolean | false | 4.3.0 |
@@ -40,9 +40,9 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
| copyable | 是否可拷贝,为对象时可进行各种自定义 | boolean \| { text: string, onCopy: function, icon: ReactNode, tooltips: \[ReactNode, ReactNode\] } | false | `icon` 和 `tooltips` 在 `4.4.0` 支持 |
| delete | 添加删除线样式 | boolean | false | |
| disabled | 禁用文本 | boolean | false | |
-| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, onStart: function, onChange: function(string) } | false | |
+| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, maxLength: number, autoSize: true \| false \| { minRows: number, maxRows: number }, onStart: function, onChange: function(string) } | false | maxLength and autoSize: 4.6.0 |
| ellipsis | 自动溢出省略,为对象时可设置省略行数与是否可展开等 | boolean \| { rows: number, expandable: boolean, onExpand: function(event), onEllipsis: function(ellipsis) } | false | onEllipsis: 4.2.0 |
-| level | 重要程度,相当于 `h1`、`h2`、`h3`、`h4` | number: 1, 2, 3, 4 | 1 | |
+| level | 重要程度,相当于 `h1`、`h2`、`h3`、`h4`、`h5` | number: 1, 2, 3, 4, 5 | 1 | 5: 4.6.0 |
| mark | 添加标记样式 | boolean | false | |
| underline | 添加下划线样式 | boolean | false | |
| onChange | 当用户提交编辑内容时触发 | function(string) | - | |
@@ -56,7 +56,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
| copyable | 是否可拷贝,为对象时可进行各种自定义 | boolean \| { text: string, onCopy: function, icon: ReactNode, tooltips: \[ReactNode, ReactNode\] } | false | `icon` 和 `tooltips` 在 `4.4.0` 支持 |
| delete | 添加删除线样式 | boolean | false | |
| disabled | 禁用文本 | boolean | false | |
-| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, onStart: function, onChange: function(string) } | false | |
+| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, maxLength: number, autoSize: true \| false \| { minRows: number, maxRows: number }, onStart: function, onChange: function(string) } | false | maxLength and autoSize: 4.6.0 |
| ellipsis | 自动溢出省略,为对象时可设置省略行数、是否可展开、添加后缀等 | boolean \| { rows: number, expandable: boolean, suffix: string, symbol: React.ReactNode, onExpand: function(event), onEllipsis: function(ellipsis) } | false | onEllipsis: 4.2.0 |
| mark | 添加标记样式 | boolean | false | |
| underline | 添加下划线样式 | boolean | false | |
diff --git a/components/typography/style/index.less b/components/typography/style/index.less
index 435b93e68f..9c432c99b9 100644
--- a/components/typography/style/index.less
+++ b/components/typography/style/index.less
@@ -48,11 +48,16 @@
h4 {
.typography-title-4();
}
+ h5&,
+ h5 {
+ .typography-title-5();
+ }
h1&,
h2&,
h3&,
- h4& {
+ h4&,
+ h5& {
.@{typography-prefix-cls} + & {
margin-top: @typography-title-margin-top;
}
@@ -65,11 +70,13 @@
h1,
h2,
h3,
- h4 {
+ h4,
+ h5 {
+ h1,
+ h2,
+ h3,
- + h4 {
+ + h4,
+ + h5 {
margin-top: @typography-title-margin-top;
}
}
diff --git a/package.json b/package.json
index 3260b002b4..262573e626 100644
--- a/package.json
+++ b/package.json
@@ -123,7 +123,7 @@
"rc-dialog": "~8.1.0",
"rc-drawer": "~4.1.0",
"rc-dropdown": "~3.1.2",
- "rc-field-form": "~1.8.0",
+ "rc-field-form": "~1.9.2",
"rc-input-number": "~6.0.0",
"rc-mentions": "~1.4.0",
"rc-menu": "~8.5.2",
@@ -134,7 +134,7 @@
"rc-progress": "~3.0.0",
"rc-rate": "~2.8.2",
"rc-resize-observer": "^0.2.3",
- "rc-select": "~11.0.12",
+ "rc-select": "~11.1.0",
"rc-slider": "~9.3.0",
"rc-steps": "~4.1.0",
"rc-switch": "~3.2.0",