From fc88005c9c00dcecabc469995c968d24d41a9430 Mon Sep 17 00:00:00 2001 From: chenlong Date: Wed, 6 Mar 2019 13:58:04 +0800 Subject: [PATCH 01/79] Add fault-tolerant processing for rowSelection.getCheckboxProps --- components/table/Table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 4cb60c1420..8570dacd60 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -153,7 +153,7 @@ export default class Table extends React.Component, TableState< const key = this.getRecordKey(item, index); // Cache checkboxProps if (!this.CheckboxPropsCache[key]) { - this.CheckboxPropsCache[key] = rowSelection.getCheckboxProps(item); + this.CheckboxPropsCache[key] = rowSelection.getCheckboxProps(item) || {}; } return this.CheckboxPropsCache[key]; }; From 8263ea74fe5b186b70e4cc91f7eb7c498851a46c Mon Sep 17 00:00:00 2001 From: kpogodin <37631833+gadzillllla@users.noreply.github.com> Date: Wed, 22 May 2019 19:38:24 +0400 Subject: [PATCH 02/79] Update index.en-US.md add missing prop `showTitle` in documentation of Pagination --- components/pagination/index.en-US.md | 1 + 1 file changed, 1 insertion(+) diff --git a/components/pagination/index.en-US.md b/components/pagination/index.en-US.md index 6174db2ce0..a3b0a70d16 100644 --- a/components/pagination/index.en-US.md +++ b/components/pagination/index.en-US.md @@ -31,6 +31,7 @@ A long list can be divided into several pages by `Pagination`, and only one page | showLessItems | show less page items | boolean | false | | | showQuickJumper | determine whether you can jump to pages directly | boolean \| `{ goButton: ReactNode }` | false | | | showSizeChanger | determine whether `pageSize` can be changed | boolean | false | | +| showTitle | show page items title | boolean | true | | | showTotal | to display the total number and range | Function(total, range) | - | | | simple | whether to use simple mode | boolean | - | | | size | specify the size of `Pagination`, can be set to `small` | string | "" | | From fa5d5e0a9600ef688da42a9298250910ffec2381 Mon Sep 17 00:00:00 2001 From: DiamondYuan Date: Wed, 29 May 2019 13:52:35 +0800 Subject: [PATCH 03/79] fix: fix type of RcFile --- components/upload/interface.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/upload/interface.tsx b/components/upload/interface.tsx index b46711ac72..b121f32a53 100755 --- a/components/upload/interface.tsx +++ b/components/upload/interface.tsx @@ -8,7 +8,12 @@ export interface HttpRequestHeader { export interface RcFile extends File { uid: string; - lastModifiedDate: Date; + readonly name: string; + readonly type: string; + readonly lastModified: number; + readonly lastModifiedDate: Date; + readonly size: number; + readonly webkitRelativePath: string; } export interface UploadFile { From c7bc6b743cdad910c83df31ca948be588f6988e0 Mon Sep 17 00:00:00 2001 From: DiamondYuan Date: Wed, 29 May 2019 13:53:33 +0800 Subject: [PATCH 04/79] fix: fix type of action in UploadProps --- components/upload/interface.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/upload/interface.tsx b/components/upload/interface.tsx index b121f32a53..dc571ccdf4 100755 --- a/components/upload/interface.tsx +++ b/components/upload/interface.tsx @@ -32,7 +32,6 @@ export interface UploadFile { error?: any; linkProps?: any; type: string; - webkitRelativePath?: string; } export interface UploadChangeParam { @@ -64,7 +63,7 @@ export interface UploadProps { name?: string; defaultFileList?: Array; fileList?: Array; - action?: string | ((file: UploadFile) => string) | ((file: UploadFile) => PromiseLike); + action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike); directory?: boolean; data?: Object | ((file: UploadFile) => any); headers?: HttpRequestHeader; From 3122f3b86bf74442839cfdb20983f15f38e9dfaa Mon Sep 17 00:00:00 2001 From: haianweifeng <1531297152@qq.com> Date: Thu, 30 May 2019 17:06:59 +0800 Subject: [PATCH 05/79] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBreadcrumb.tsx=20?= =?UTF-8?q?=E4=B8=AD=E5=A4=84=E7=90=86route.children=20=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit {itemRender(child, params, routes, [...paths, this.getPath(child.path, params)])} itemRender(...args) 中路径应该到拼接当前child.path --- components/breadcrumb/Breadcrumb.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index 8a6a39c765..2bdbdb13b4 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -70,6 +70,15 @@ export default class Breadcrumb extends React.Component { 'see: https://u.ant.design/item-render.', ); } + + getPath = (path, params) => { + path = (path || '').replace(/^\//, ''); + Object.keys(params).forEach(key => { + path = path.replace(`:${key}`, params[key]); + }); + return path; + } + genForRoutes = ({ routes = [], params = {}, @@ -78,11 +87,7 @@ export default class Breadcrumb extends React.Component { }: BreadcrumbProps) => { const paths: string[] = []; return routes.map(route => { - route.path = route.path || ''; - let path = route.path.replace(/^\//, ''); - Object.keys(params).forEach(key => { - path = path.replace(`:${key}`, params[key]); - }); + let path = this.getPath(route.path, params); if (path) { paths.push(path); @@ -94,7 +99,7 @@ export default class Breadcrumb extends React.Component { {route.children.map(child => ( - {itemRender(child, params, routes, paths)} + {itemRender(child, params, routes, [...paths, this.getPath(child.path, params)])} ))} From 1fac84b222237161ca7f94815ee73425e280ee4c Mon Sep 17 00:00:00 2001 From: haianweifeng <1531297152@qq.com> Date: Thu, 30 May 2019 17:28:19 +0800 Subject: [PATCH 06/79] fix Breadcrumb.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getPath() 参数赋默认值 --- components/breadcrumb/Breadcrumb.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index 2bdbdb13b4..0db011c8f5 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -71,8 +71,8 @@ export default class Breadcrumb extends React.Component { ); } - getPath = (path, params) => { - path = (path || '').replace(/^\//, ''); + getPath = (path = '', params = {}) => { + path = path.replace(/^\//, ''); Object.keys(params).forEach(key => { path = path.replace(`:${key}`, params[key]); }); From 239c472c388a6210e71822bd30a383c26348bf48 Mon Sep 17 00:00:00 2001 From: MrHeer Date: Wed, 29 May 2019 19:19:32 +0800 Subject: [PATCH 07/79] fix: use @error-color & @warning-color instead of @text-color-danger & @text-color-warning #16856 --- components/style/themes/default.less | 2 -- components/typography/style/index.less | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/style/themes/default.less b/components/style/themes/default.less index a31717d1c2..1ab14ba348 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -47,8 +47,6 @@ @code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; @text-color: fade(@black, 65%); @text-color-secondary: fade(@black, 45%); -@text-color-warning: @gold-7; -@text-color-danger: @red-7; @text-color-inverse: @white; @icon-color: inherit; @icon-color-hover: fade(@black, 75%); diff --git a/components/typography/style/index.less b/components/typography/style/index.less index 30c75b8879..47c691b9b9 100644 --- a/components/typography/style/index.less +++ b/components/typography/style/index.less @@ -39,11 +39,11 @@ } &&-warning { - color: @text-color-warning; + color: @warning-color; } &&-danger { - color: @text-color-danger; + color: @error-color; } &&-disabled { From eee76be930028c5342d6e541b1def49dca429b26 Mon Sep 17 00:00:00 2001 From: haianweifeng <1531297152@qq.com> Date: Thu, 30 May 2019 22:59:01 +0800 Subject: [PATCH 08/79] fix Breadcrumb.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对于子路径是否为空进行判断 --- components/breadcrumb/Breadcrumb.tsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index 0db011c8f5..7f30762256 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -71,14 +71,23 @@ export default class Breadcrumb extends React.Component { ); } - getPath = (path = '', params = {}) => { - path = path.replace(/^\//, ''); + getPath = (path: string, params: any) => { + path = (path || '').replace(/^\//, ''); Object.keys(params).forEach(key => { path = path.replace(`:${key}`, params[key]); }); return path; } + addChildPath = (paths: string[], childPath: string = '', params: any) => { + const originalPaths = [...paths]; + const path = this.getPath(childPath, params); + if (path) { + originalPaths.push(path); + } + return originalPaths; + } + genForRoutes = ({ routes = [], params = {}, @@ -98,10 +107,12 @@ export default class Breadcrumb extends React.Component { overlay = ( {route.children.map(child => ( - - {itemRender(child, params, routes, [...paths, this.getPath(child.path, params)])} - - ))} + + { + itemRender(child, params, routes, this.addChildPath(paths, child.path, params)) + } + + ))} ); } From 364e1624eaa23ffca733ad86d2f8d13f9dd48c55 Mon Sep 17 00:00:00 2001 From: zombieJ Date: Fri, 31 May 2019 10:48:00 +0800 Subject: [PATCH 09/79] add antd pro 4.0 badge (#16894) --- site/theme/en-US.js | 2 +- site/theme/template/Layout/Header.jsx | 12 +++++++++--- site/theme/zh-CN.js | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/site/theme/en-US.js b/site/theme/en-US.js index e629041997..201841bac6 100644 --- a/site/theme/en-US.js +++ b/site/theme/en-US.js @@ -12,7 +12,7 @@ module.exports = { 'app.header.menu.spec': 'Guidelines', 'app.header.menu.resource': 'Resources', 'app.header.menu.mobile': 'Mobile', - 'app.header.menu.pro': 'Ant Design Pro', + 'app.header.menu.pro.v4': 'Ant Design Pro v4', 'app.header.menu.ecosystem': 'Ecosystem', 'app.header.lang': '中文', 'app.content.edit-page': 'Edit this page on GitHub!', diff --git a/site/theme/template/Layout/Header.jsx b/site/theme/template/Layout/Header.jsx index 55eeea37be..957e197257 100644 --- a/site/theme/template/Layout/Header.jsx +++ b/site/theme/template/Layout/Header.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { Link } from 'bisheng/router'; import { FormattedMessage } from 'react-intl'; import classNames from 'classnames'; -import { Select, Menu, Row, Col, Icon, Popover, Input, Button } from 'antd'; +import { Select, Menu, Row, Col, Icon, Popover, Input, Button, Badge } from 'antd'; import Santa from './Santa'; import * as utils from '../utils'; import { version as antdVersion } from '../../../../package.json'; @@ -179,7 +179,11 @@ export default class Header extends React.Component { } + title={ + + + + } > - + + + diff --git a/site/theme/zh-CN.js b/site/theme/zh-CN.js index 40ff1bba64..8d4e84fcb6 100644 --- a/site/theme/zh-CN.js +++ b/site/theme/zh-CN.js @@ -12,7 +12,7 @@ module.exports = { 'app.header.menu.spec': '设计语言', 'app.header.menu.resource': '资源', 'app.header.menu.mobile': '移动版', - 'app.header.menu.pro': 'Ant Design Pro', + 'app.header.menu.pro.v4': 'Ant Design Pro v4', 'app.header.menu.ecosystem': '生态', 'app.header.lang': 'English', 'app.content.edit-page': '在 GitHub 上编辑此页!', From 3806d81f83a40ffa54668b06e3721bf6a5e33fcf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Fri, 31 May 2019 09:14:21 +0000 Subject: [PATCH 10/79] Update ansi-styles requirement from ^3.2.1 to ^4.0.0 Updates the requirements on [ansi-styles](https://github.com/chalk/ansi-styles) to permit the latest version. - [Release notes](https://github.com/chalk/ansi-styles/releases) - [Commits](https://github.com/chalk/ansi-styles/compare/v3.2.1...v4.0.0) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 10b43ee3bb..a705315a41 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@types/react-intl": "^2.3.14", "@types/warning": "^3.0.0", "@yesmeck/offline-plugin": "^5.0.5", - "ansi-styles": "^3.2.1", + "ansi-styles": "^4.0.0", "antd-theme-generator": "^1.1.4", "antd-tools": "^7.3.5", "babel-eslint": "^10.0.1", From 4c07822eabb11549686b87f1a732120bc1dc32e5 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:23:13 +0800 Subject: [PATCH 11/79] doc: changelog 3.19.2 --- CHANGELOG.en-US.md | 15 +++++++++++++++ CHANGELOG.zh-CN.md | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 6ea553cfb9..0444b060c9 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,21 @@ timeline: true --- +## 3.19.2 + +`2019-06-01` + +- 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) +- 🐞 Fix transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) +- 💄 Remove useless Modal default props `okButtonDisabled` 、`cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) +- 🐞 Fix Less var, using `@error-color`、`@warning-color` instead of `@text-color-danger`、`@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- TypeScript + - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) + - ⚡️ export `TypographyProps` type. [#16835](https://github.com/ant-design/ant-design/pull/16835) + - ⚡️ Add `onChange` prop type definition to Steps. [#16845](https://github.com/ant-design/ant-design/pull/16845) [@JonathanLee-LX](https://github.com/JonathanLee-LX) + - ⚡️ Add `webkitRelativePath` prop type definition to Upload. [#16850](https://github.com/ant-design/ant-design/pull/16850) [@DiamondYuan](https://github.com/DiamondYuan) + ## 3.19.1 `2019-05-27` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 797829cc2b..ebf5fb6435 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,21 @@ timeline: true --- +## 3.19.2 + +`2019-06-01` + +- 🐞 修复 Tabs 在垂直卡片模式下标签不能滚动的问题。[#16825](https://github.com/ant-design/ant-design/pull/16825) +- 🐞 修复 Transfer 组件在 unmount 时 setState 警告。[#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 💄 增加在 Sider 内 Menu 使用 `inlineCollapsed` 时的提示信息。[#16826](https://github.com/ant-design/ant-design/pull/16826) +- 💄 去掉 Modal 中 `okButtonDisabled` 、`cancelButtonDisabled` 的默认值。[#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) +- 🐞 修复 Less 变量,使用 `@error-color`、`@warning-color` 分别代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- TypeScript + - ⚡️ 增加 Menu 中 `forceSubMenuRender` 类型定义。[#16827](https://github.com/ant-design/ant-design/pull/16827) + - ⚡️ 导出 Typography 类型定义。[#16835](https://github.com/ant-design/ant-design/pull/16835) + - ⚡️ 增加 Steps 中的 `onChange` 类型定义。[#16845](https://github.com/ant-design/ant-design/pull/16845) [@JonathanLee-LX](https://github.com/JonathanLee-LX) + - ⚡️ 增加 Upload 中 `webkitRelativePath` 类型定义。[#16850](https://github.com/ant-design/ant-design/pull/16850) [@DiamondYuan](https://github.com/DiamondYuan) + ## 3.19.1 `2019-05-27` From 87a2d9f7c02bdea580dd7e723ea0d700b79c38ce Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:31:28 +0800 Subject: [PATCH 12/79] doc: changelog --- CHANGELOG.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 0444b060c9..0ecfa02bd1 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -26,7 +26,7 @@ timeline: true - 🐞 Fix Less var, using `@error-color`、`@warning-color` instead of `@text-color-danger`、`@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) - - ⚡️ export `TypographyProps` type. [#16835](https://github.com/ant-design/ant-design/pull/16835) + - ⚡️ Export `TypographyProps` type. [#16835](https://github.com/ant-design/ant-design/pull/16835) - ⚡️ Add `onChange` prop type definition to Steps. [#16845](https://github.com/ant-design/ant-design/pull/16845) [@JonathanLee-LX](https://github.com/JonathanLee-LX) - ⚡️ Add `webkitRelativePath` prop type definition to Upload. [#16850](https://github.com/ant-design/ant-design/pull/16850) [@DiamondYuan](https://github.com/DiamondYuan) From b6f755095caf62987e1b9de8570d149364c4672b Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:32:34 +0800 Subject: [PATCH 13/79] tweak: order changelog --- CHANGELOG.en-US.md | 2 +- CHANGELOG.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 0ecfa02bd1..a68014e634 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -21,9 +21,9 @@ timeline: true - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 Fix transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 🐞 Fix Less var, using `@error-color`、`@warning-color` instead of `@text-color-danger`、`@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - 💄 Remove useless Modal default props `okButtonDisabled` 、`cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) -- 🐞 Fix Less var, using `@error-color`、`@warning-color` instead of `@text-color-danger`、`@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) - ⚡️ Export `TypographyProps` type. [#16835](https://github.com/ant-design/ant-design/pull/16835) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index ebf5fb6435..b13893bc33 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -21,9 +21,9 @@ timeline: true - 🐞 修复 Tabs 在垂直卡片模式下标签不能滚动的问题。[#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 修复 Transfer 组件在 unmount 时 setState 警告。[#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 🐞 修复 Less 变量,使用 `@error-color`、`@warning-color` 分别代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 增加在 Sider 内 Menu 使用 `inlineCollapsed` 时的提示信息。[#16826](https://github.com/ant-design/ant-design/pull/16826) - 💄 去掉 Modal 中 `okButtonDisabled` 、`cancelButtonDisabled` 的默认值。[#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) -- 🐞 修复 Less 变量,使用 `@error-color`、`@warning-color` 分别代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - TypeScript - ⚡️ 增加 Menu 中 `forceSubMenuRender` 类型定义。[#16827](https://github.com/ant-design/ant-design/pull/16827) - ⚡️ 导出 Typography 类型定义。[#16835](https://github.com/ant-design/ant-design/pull/16835) From 4eecc68d9dafd8ac6b2335d9f423195d346dd49d Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:33:42 +0800 Subject: [PATCH 14/79] doc: changelog --- CHANGELOG.en-US.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index a68014e634..cc77b5168b 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -21,9 +21,9 @@ timeline: true - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 Fix transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) -- 🐞 Fix Less var, using `@error-color`、`@warning-color` instead of `@text-color-danger`、`@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- 🐞 Fix Less var, using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) -- 💄 Remove useless Modal default props `okButtonDisabled` 、`cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) +- 💄 Remove useless Modal default props `okButtonDisabled`, `cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) - ⚡️ Export `TypographyProps` type. [#16835](https://github.com/ant-design/ant-design/pull/16835) From 96ca08bd81d3c0934aa3ae850229ebc72deec666 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:34:08 +0800 Subject: [PATCH 15/79] doc: changelog --- CHANGELOG.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index cc77b5168b..b35024cfa2 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -21,7 +21,7 @@ timeline: true - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 Fix transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) -- 🐞 Fix Less var, using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- 🐞 Fix Less var using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - 💄 Remove useless Modal default props `okButtonDisabled`, `cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) - TypeScript From 522c817cd2b43ae375e23da9ad01ee33165c6581 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:34:56 +0800 Subject: [PATCH 16/79] doc: changelog --- CHANGELOG.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index b35024cfa2..5a48d8d18f 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -20,7 +20,7 @@ timeline: true `2019-06-01` - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) -- 🐞 Fix transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 🐞 Fix Transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) - 🐞 Fix Less var using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - 💄 Remove useless Modal default props `okButtonDisabled`, `cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) From 0dd2f5a53305ea3f7ac2c60d2507e5ff21a1311f Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:42:07 +0800 Subject: [PATCH 17/79] doc: changelog --- CHANGELOG.en-US.md | 1 - CHANGELOG.zh-CN.md | 1 - 2 files changed, 2 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 5a48d8d18f..6ad409bddc 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -23,7 +23,6 @@ timeline: true - 🐞 Fix Transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) - 🐞 Fix Less var using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) -- 💄 Remove useless Modal default props `okButtonDisabled`, `cancelButtonDisabled`. [#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) - ⚡️ Export `TypographyProps` type. [#16835](https://github.com/ant-design/ant-design/pull/16835) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index b13893bc33..576e317979 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -23,7 +23,6 @@ timeline: true - 🐞 修复 Transfer 组件在 unmount 时 setState 警告。[#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) - 🐞 修复 Less 变量,使用 `@error-color`、`@warning-color` 分别代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 增加在 Sider 内 Menu 使用 `inlineCollapsed` 时的提示信息。[#16826](https://github.com/ant-design/ant-design/pull/16826) -- 💄 去掉 Modal 中 `okButtonDisabled` 、`cancelButtonDisabled` 的默认值。[#16869](https://github.com/ant-design/ant-design/pull/16869) [@aiham](https://github.com/aiham) - TypeScript - ⚡️ 增加 Menu 中 `forceSubMenuRender` 类型定义。[#16827](https://github.com/ant-design/ant-design/pull/16827) - ⚡️ 导出 Typography 类型定义。[#16835](https://github.com/ant-design/ant-design/pull/16835) From 1ffa7ba4f90ac8f7ac7bf042bdea78590f632853 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 15:45:05 +0800 Subject: [PATCH 18/79] doc: format --- CHANGELOG.en-US.md | 2 +- CHANGELOG.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 6ad409bddc..b81b85268d 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -20,7 +20,7 @@ timeline: true `2019-06-01` - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) -- 🐞 Fix Transfer warn state update on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 🐞 Fix Transfer warn `setStart` on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) - 🐞 Fix Less var using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - TypeScript diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 576e317979..b9840c3023 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -20,7 +20,7 @@ timeline: true `2019-06-01` - 🐞 修复 Tabs 在垂直卡片模式下标签不能滚动的问题。[#16825](https://github.com/ant-design/ant-design/pull/16825) -- 🐞 修复 Transfer 组件在 unmount 时 setState 警告。[#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) +- 🐞 修复 Transfer 组件在 unmount 时 `setState` 警告。[#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) - 🐞 修复 Less 变量,使用 `@error-color`、`@warning-color` 分别代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 增加在 Sider 内 Menu 使用 `inlineCollapsed` 时的提示信息。[#16826](https://github.com/ant-design/ant-design/pull/16826) - TypeScript From f92b77705c48c528d4314c19dcaa454b93e2d35a Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 22:51:27 +0800 Subject: [PATCH 19/79] doc: changelog --- CHANGELOG.en-US.md | 2 +- CHANGELOG.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index b81b85268d..afe29d9a0f 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -21,7 +21,7 @@ timeline: true - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 Fix Transfer warn `setStart` on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) -- 🐞 Fix Less var using `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- 💄 using Less var `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index b9840c3023..492f1be32c 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -21,7 +21,7 @@ timeline: true - 🐞 修复 Tabs 在垂直卡片模式下标签不能滚动的问题。[#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 修复 Transfer 组件在 unmount 时 `setState` 警告。[#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) -- 🐞 修复 Less 变量,使用 `@error-color`、`@warning-color` 分别代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- 💄 使用 Less 变量 `@error-color`、`@warning-color` 代替 `@text-color-danger`、`@text-color-warning`。[#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 增加在 Sider 内 Menu 使用 `inlineCollapsed` 时的提示信息。[#16826](https://github.com/ant-design/ant-design/pull/16826) - TypeScript - ⚡️ 增加 Menu 中 `forceSubMenuRender` 类型定义。[#16827](https://github.com/ant-design/ant-design/pull/16827) From 438df8367d6c43c7b86fed2f6fce1940a8a55152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=A1=E9=91=AB-King?= <45808948@qq.com> Date: Sat, 1 Jun 2019 23:24:45 +0800 Subject: [PATCH 20/79] :memo: changelog --- CHANGELOG.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index afe29d9a0f..285feb9a59 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -21,7 +21,7 @@ timeline: true - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 Fix Transfer warn `setStart` on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) -- 💄 using Less var `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- 💄 Using Less var `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) From fd45cee489dd592d8c942855bc48669c0df7e2c0 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 23:27:54 +0800 Subject: [PATCH 21/79] :memo: changelog --- CHANGELOG.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 285feb9a59..aafba2cd28 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -21,7 +21,7 @@ timeline: true - 🐞 Fix Tabs vertical card mode not scrollable. [#16825](https://github.com/ant-design/ant-design/pull/16825) - 🐞 Fix Transfer warn `setStart` on an unmounted component. [#16822](https://github.com/ant-design/ant-design/pull/16822) [@shiningjason](https://github.com/shiningjason) -- 💄 Using Less var `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) +- 💄 Using less variables `@error-color`, `@warning-color` instead of `@text-color-danger`, `@text-color-warning`. [#16890](https://github.com/ant-design/ant-design/pull/16890) [@MrHeer](https://github.com/MrHeer) - 💄 Add warning if Menu use `inlineCollapsed` under Sider. [#16826](https://github.com/ant-design/ant-design/pull/16826) - TypeScript - ⚡️ Add `forceSubmenuRender` into MenuProps. [#16827](https://github.com/ant-design/ant-design/pull/16827) From 86bc28161cb3854aed882d62085d9cf1275d3148 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Sat, 1 Jun 2019 23:59:15 +0800 Subject: [PATCH 22/79] release: 3.19.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a705315a41..810799b3d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.19.1", + "version": "3.19.2", "title": "Ant Design", "description": "An enterprise-class UI design language and React components implementation", "homepage": "http://ant.design/", From 24ee1634f02c42b4375e79b4d4c0cfc399e4128d Mon Sep 17 00:00:00 2001 From: Juraj Carnogursky Date: Sat, 1 Jun 2019 23:40:49 +0200 Subject: [PATCH 23/79] :bug: fixes #16871 Cascader - Space during search --- components/cascader/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index 676e7e95f3..17fc1dbbe5 100644 --- a/components/cascader/index.tsx +++ b/components/cascader/index.tsx @@ -292,7 +292,8 @@ class Cascader extends React.Component { }; handleKeyDown = (e: React.KeyboardEvent) => { - if (e.keyCode === KeyCode.BACKSPACE) { + // SPACE => https://github.com/ant-design/ant-design/issues/16871 + if (e.keyCode === KeyCode.BACKSPACE || e.keyCode === KeyCode.SPACE) { e.stopPropagation(); } }; From ce4b71c71f965408aa4624dbddc264179edf63d5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 2 Jun 2019 19:46:15 +0800 Subject: [PATCH 24/79] :wrench: Add packtracker --- package.json | 1 + webpack.config.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/package.json b/package.json index 810799b3d5..51f07f8e0a 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ }, "devDependencies": { "@ant-design/colors": "^3.0.0", + "@packtracker/webpack-plugin": "^2.0.1", "@sentry/browser": "^5.0.3", "@types/classnames": "^2.2.6", "@types/prop-types": "^15.5.6", diff --git a/webpack.config.js b/webpack.config.js index 08d3c36c2d..a9994574cf 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ /* eslint no-param-reassign: 0 */ // This config is for building dist files const getWebpackConfig = require('antd-tools/lib/getWebpackConfig'); +const PacktrackerPlugin = require('@packtracker/webpack-plugin'); const { webpack } = getWebpackConfig; @@ -35,6 +36,14 @@ if (process.env.RUN_ENV === 'PRODUCTION') { ignoreMomentLocale(config); externalMoment(config); addLocales(config); + // https://docs.packtracker.io/uploading-your-webpack-stats/webpack-plugin + config.plugins.push( + new PacktrackerPlugin({ + project_token: '8adbb892-ee4a-4d6f-93bb-a03219fb6778', + upload: process.env.CI === 'true', + fail_build: true, + }), + ); }); } From bd0479b30bd704b762af611c383760b8913973a3 Mon Sep 17 00:00:00 2001 From: ztplz Date: Sun, 2 Jun 2019 20:16:02 +0800 Subject: [PATCH 25/79] Remove useless type --- components/upload/interface.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/upload/interface.tsx b/components/upload/interface.tsx index dc571ccdf4..0efe181cb0 100755 --- a/components/upload/interface.tsx +++ b/components/upload/interface.tsx @@ -8,11 +8,7 @@ export interface HttpRequestHeader { export interface RcFile extends File { uid: string; - readonly name: string; - readonly type: string; - readonly lastModified: number; readonly lastModifiedDate: Date; - readonly size: number; readonly webkitRelativePath: string; } From 10fec945e57bdcb9f2203a235d7f333199fe7263 Mon Sep 17 00:00:00 2001 From: zombieJ Date: Mon, 3 Jun 2019 11:44:26 +0800 Subject: [PATCH 26/79] fix: Transfer render Empty when customize without data (#16925) --- components/transfer/list.tsx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index 80f68ab2e1..ebbe21edc2 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -159,26 +159,25 @@ export default class TransferList extends React.Component ) : null; - const searchNotFound = !filteredItems.length && ( -
{notFoundContent}
- ); - let listBody: React.ReactNode = bodyDom; if (!listBody) { - let bodyNode: React.ReactNode = searchNotFound; - if (!bodyNode) { - const { bodyContent, customize } = renderListNode(renderList, { - ...omit(this.props, OmitProps), - filteredItems, - filteredRenderItems, - selectedKeys: checkedKeys, - }); + let bodyNode: React.ReactNode; - // We should wrap customize list body in a classNamed div to use flex layout. - bodyNode = customize ? ( -
{bodyContent}
- ) : ( + const { bodyContent, customize } = renderListNode(renderList, { + ...omit(this.props, OmitProps), + filteredItems, + filteredRenderItems, + selectedKeys: checkedKeys, + }); + + // We should wrap customize list body in a classNamed div to use flex layout. + if (customize) { + bodyNode =
{bodyContent}
; + } else { + bodyNode = filteredItems.length ? ( bodyContent + ) : ( +
{notFoundContent}
); } From a6ef4ca6a24e6931f6534793ab61b9f33718b93c Mon Sep 17 00:00:00 2001 From: zombieJ Date: Mon, 3 Jun 2019 13:44:27 +0800 Subject: [PATCH 27/79] fix: Hide Spinner of InputNumber when type is number (#16926) * fix: Hide Spinner of InputNumber when type is number * Firefox not obedient --- components/input-number/style/index.less | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/input-number/style/index.less b/components/input-number/style/index.less index 597c38ac39..8cf7efed1f 100644 --- a/components/input-number/style/index.less +++ b/components/input-number/style/index.less @@ -77,8 +77,14 @@ border-radius: @border-radius-base; outline: 0; transition: all 0.3s linear; - -moz-appearance: textfield; + -moz-appearance: textfield !important; .placeholder(); + + &[type='number']::-webkit-inner-spin-button, + &[type='number']::-webkit-outer-spin-button { + margin: 0; + -webkit-appearance: none; + } } &-lg { From 6d2a5df1e67e2330cf6c8848aed7b79ccb248368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Mon, 3 Jun 2019 16:13:15 +0800 Subject: [PATCH 28/79] fix: Breadcrumb validateDOMNesting warning (#16929) * :bug: Fix Breadcrumb validateDOMNesting warning ``` Warning: validateDOMNesting(...): cannot appear as a descendant of . in a (created by Context.Consumer) in span (created by Context.Consumer) in a (created by Context.Consumer) in Trigger (created by Dropdown) in Dropdown (created by Context.Consumer) in Dropdown (created by Context.Consumer) in span (created by Context.Consumer) in BreadcrumbItem (created by Context.Consumer) in div (created by Context.Consumer) in Breadcrumb (created by TestBreadcrumb) in TestBreadcrumb ``` * :white_check_mark: update snapshots --- components/breadcrumb/BreadcrumbItem.tsx | 4 +- .../__snapshots__/Breadcrumb.test.js.snap | 63 ++++----- .../__tests__/__snapshots__/demo.test.js.snap | 131 +++++++++--------- components/breadcrumb/demo/overlay.md | 22 ++- 4 files changed, 109 insertions(+), 111 deletions(-) diff --git a/components/breadcrumb/BreadcrumbItem.tsx b/components/breadcrumb/BreadcrumbItem.tsx index 851f92199e..37936f4f81 100644 --- a/components/breadcrumb/BreadcrumbItem.tsx +++ b/components/breadcrumb/BreadcrumbItem.tsx @@ -71,10 +71,10 @@ export default class BreadcrumbItem extends React.Component - + {breadcrumbItem} - + ); } diff --git a/components/breadcrumb/__tests__/__snapshots__/Breadcrumb.test.js.snap b/components/breadcrumb/__tests__/__snapshots__/Breadcrumb.test.js.snap index 1f82c45588..c5cb3931cc 100644 --- a/components/breadcrumb/__tests__/__snapshots__/Breadcrumb.test.js.snap +++ b/components/breadcrumb/__tests__/__snapshots__/Breadcrumb.test.js.snap @@ -71,42 +71,43 @@ exports[`Breadcrumb should render a menu 1`] = ` - - - + + first + + + + + + + - first - - - - - - - / + / + -
- - - Ant Design - - - / - +
+ + + Ant Design - + + / + + + + + + Component + + + + / + + + + - Component + General - - / - + + - - - - - - General - - - - - / - - - Button - - - / - + + + + Button -
+ + / + +
`; diff --git a/components/breadcrumb/demo/overlay.md b/components/breadcrumb/demo/overlay.md index 0789262d9b..11f839c0e5 100644 --- a/components/breadcrumb/demo/overlay.md +++ b/components/breadcrumb/demo/overlay.md @@ -37,18 +37,16 @@ const menu = ( ); ReactDOM.render( -
- - Ant Design - - Component - - - General - - Button - -
, + + Ant Design + + Component + + + General + + Button + , mountNode, ); ``` From c6ea0aa3d754f2b1bfea722b5fa52f3c6ca17b32 Mon Sep 17 00:00:00 2001 From: haianweifeng <1531297152@qq.com> Date: Mon, 3 Jun 2019 16:36:07 +0800 Subject: [PATCH 29/79] Update Breadcrumb.tsx --- components/breadcrumb/Breadcrumb.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index 7f30762256..24d3066e26 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -96,7 +96,7 @@ export default class Breadcrumb extends React.Component { }: BreadcrumbProps) => { const paths: string[] = []; return routes.map(route => { - let path = this.getPath(route.path, params); + const path = this.getPath(route.path, params); if (path) { paths.push(path); From eb063d58fa93e8f01ed820d83decc2d4d92a7d9d Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 3 Jun 2019 16:46:31 +0800 Subject: [PATCH 30/79] :bug: Fix abnormal scrollbar in Chrome when rowSelection and title work together close #16912 --- components/table/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index c4379ec91f..9a36429e53 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -271,8 +271,8 @@ &-title + &-content { position: relative; - overflow: hidden; border-radius: @table-border-radius-base @table-border-radius-base 0 0; + .@{table-prefix-cls}-bordered & { &, table, From 553487e0062fd7f9372324d63654fbcc57ed3a8f Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 4 Jun 2019 14:20:18 +0800 Subject: [PATCH 31/79] :bug: Fix Table header extra scrollbar control close #4637 close #14211 https://github.com/react-component/table/pull/333 --- components/table/style/index.less | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index c4379ec91f..0f9d792d00 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -600,6 +600,16 @@ opacity: 0.9999; } + &-hide-scrollbar { + // https://github.com/ant-design/ant-design/issues/4637 + // https://stackoverflow.com/a/54101063 + // https://github.com/react-component/table/pull/333 + scrollbar-color: transparent transparent; + &::-webkit-scrollbar { + background-color: transparent; + } + } + &-fixed-left, &-fixed-right { position: absolute; diff --git a/package.json b/package.json index 51f07f8e0a..e6e723c7d0 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "rc-slider": "~8.6.5", "rc-steps": "~3.4.1", "rc-switch": "~1.9.0", - "rc-table": "~6.5.0", + "rc-table": "~6.6.0", "rc-tabs": "~9.6.0", "rc-time-picker": "~3.6.1", "rc-tooltip": "~3.7.3", From 1d1339e3023b085b7088a581b13436aaddd2f220 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 4 Jun 2019 16:11:01 +0800 Subject: [PATCH 32/79] :white_check_mark: update snapshots --- .../__tests__/__snapshots__/demo.test.js.snap | 14 +- .../__snapshots__/index.test.js.snap | 976 +++++++++++++++++- 2 files changed, 949 insertions(+), 41 deletions(-) diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index 749e4ad733..090fdf6c0a 100755 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -5809,7 +5809,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="ant-table-scroll" >
- +Array [ - + - - - - + + + + , +
+
+
+
+ +
+
+
+
    +
  • + 00 +
  • +
  • + 01 +
  • +
  • + 02 +
  • +
  • + 03 +
  • +
  • + 04 +
  • +
  • + 05 +
  • +
  • + 06 +
  • +
  • + 07 +
  • +
  • + 08 +
  • +
  • + 09 +
  • +
  • + 10 +
  • +
  • + 11 +
  • +
  • + 12 +
  • +
  • + 13 +
  • +
  • + 14 +
  • +
  • + 15 +
  • +
  • + 16 +
  • +
  • + 17 +
  • +
  • + 18 +
  • +
  • + 19 +
  • +
  • + 20 +
  • +
  • + 21 +
  • +
  • + 22 +
  • +
  • + 23 +
  • +
+
+
+
    +
  • + 00 +
  • +
  • + 01 +
  • +
  • + 02 +
  • +
  • + 03 +
  • +
  • + 04 +
  • +
  • + 05 +
  • +
  • + 06 +
  • +
  • + 07 +
  • +
  • + 08 +
  • +
  • + 09 +
  • +
  • + 10 +
  • +
  • + 11 +
  • +
  • + 12 +
  • +
  • + 13 +
  • +
  • + 14 +
  • +
  • + 15 +
  • +
  • + 16 +
  • +
  • + 17 +
  • +
  • + 18 +
  • +
  • + 19 +
  • +
  • + 20 +
  • +
  • + 21 +
  • +
  • + 22 +
  • +
  • + 23 +
  • +
  • + 24 +
  • +
  • + 25 +
  • +
  • + 26 +
  • +
  • + 27 +
  • +
  • + 28 +
  • +
  • + 29 +
  • +
  • + 30 +
  • +
  • + 31 +
  • +
  • + 32 +
  • +
  • + 33 +
  • +
  • + 34 +
  • +
  • + 35 +
  • +
  • + 36 +
  • +
  • + 37 +
  • +
  • + 38 +
  • +
  • + 39 +
  • +
  • + 40 +
  • +
  • + 41 +
  • +
  • + 42 +
  • +
  • + 43 +
  • +
  • + 44 +
  • +
  • + 45 +
  • +
  • + 46 +
  • +
  • + 47 +
  • +
  • + 48 +
  • +
  • + 49 +
  • +
  • + 50 +
  • +
  • + 51 +
  • +
  • + 52 +
  • +
  • + 53 +
  • +
  • + 54 +
  • +
  • + 55 +
  • +
  • + 56 +
  • +
  • + 57 +
  • +
  • + 58 +
  • +
  • + 59 +
  • +
+
+
+
    +
  • + 00 +
  • +
  • + 01 +
  • +
  • + 02 +
  • +
  • + 03 +
  • +
  • + 04 +
  • +
  • + 05 +
  • +
  • + 06 +
  • +
  • + 07 +
  • +
  • + 08 +
  • +
  • + 09 +
  • +
  • + 10 +
  • +
  • + 11 +
  • +
  • + 12 +
  • +
  • + 13 +
  • +
  • + 14 +
  • +
  • + 15 +
  • +
  • + 16 +
  • +
  • + 17 +
  • +
  • + 18 +
  • +
  • + 19 +
  • +
  • + 20 +
  • +
  • + 21 +
  • +
  • + 22 +
  • +
  • + 23 +
  • +
  • + 24 +
  • +
  • + 25 +
  • +
  • + 26 +
  • +
  • + 27 +
  • +
  • + 28 +
  • +
  • + 29 +
  • +
  • + 30 +
  • +
  • + 31 +
  • +
  • + 32 +
  • +
  • + 33 +
  • +
  • + 34 +
  • +
  • + 35 +
  • +
  • + 36 +
  • +
  • + 37 +
  • +
  • + 38 +
  • +
  • + 39 +
  • +
  • + 40 +
  • +
  • + 41 +
  • +
  • + 42 +
  • +
  • + 43 +
  • +
  • + 44 +
  • +
  • + 45 +
  • +
  • + 46 +
  • +
  • + 47 +
  • +
  • + 48 +
  • +
  • + 49 +
  • +
  • + 50 +
  • +
  • + 51 +
  • +
  • + 52 +
  • +
  • + 53 +
  • +
  • + 54 +
  • +
  • + 55 +
  • +
  • + 56 +
  • +
  • + 57 +
  • +
  • + 58 +
  • +
  • + 59 +
  • +
+
+
+
+
+
, +] `; exports[`TimePicker renders addon correctly 1`] = ` From b1f81045c6a4dee478d18872fea88a03846fe3df Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 4 Jun 2019 16:18:25 +0800 Subject: [PATCH 33/79] :lipstick: Fix scrollbar border bottom --- components/table/style/index.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/table/style/index.less b/components/table/style/index.less index 0f9d792d00..5e451f1b74 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -598,6 +598,10 @@ // Workaround for additional scroll bar on the table header // https://github.com/ant-design/ant-design/issues/6515#issuecomment-419634369 opacity: 0.9999; + + &::-webkit-scrollbar { + border-bottom: 1px solid @border-color-split; + } } &-hide-scrollbar { From f1c43c16b7f48617dc9591f58c515e4cc3744265 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 4 Jun 2019 16:35:39 +0800 Subject: [PATCH 34/79] :white_check_mark: update snapshots --- .../__snapshots__/index.test.js.snap | 36 ++++++++++++++----- .../time-picker/__tests__/index.test.js | 2 +- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/components/time-picker/__tests__/__snapshots__/index.test.js.snap b/components/time-picker/__tests__/__snapshots__/index.test.js.snap index 5f95adc5fe..773d6e63ab 100644 --- a/components/time-picker/__tests__/__snapshots__/index.test.js.snap +++ b/components/time-picker/__tests__/__snapshots__/index.test.js.snap @@ -51,7 +51,7 @@ Array [ id="" placeholder="Избери дата" type="text" - value="" + value="00:00:00" /> + + + ,
  • 00 @@ -201,7 +221,7 @@ Array [ 15
  • 16 @@ -255,7 +275,7 @@ Array [ >
    • 00 @@ -309,7 +329,7 @@ Array [ 08
    • 09 @@ -621,7 +641,7 @@ Array [ >
      • 00 @@ -789,7 +809,7 @@ Array [ 27
      • 28 diff --git a/components/time-picker/__tests__/index.test.js b/components/time-picker/__tests__/index.test.js index 1ec96fc081..c9074382ee 100644 --- a/components/time-picker/__tests__/index.test.js +++ b/components/time-picker/__tests__/index.test.js @@ -73,7 +73,7 @@ describe('TimePicker', () => { const locale = { placeholder: 'Избери дата', }; - const wrapper = mount(); + const wrapper = mount(); expect(wrapper.render()).toMatchSnapshot(); }); }); From 7a484dda71c9e9966945d42a3a162b0a23a29332 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 4 Jun 2019 18:53:54 +0800 Subject: [PATCH 35/79] :memo: fix size toc overflow style --- site/theme/static/toc.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/theme/static/toc.less b/site/theme/static/toc.less index 5092d277a5..ed49ef636e 100644 --- a/site/theme/static/toc.less +++ b/site/theme/static/toc.less @@ -51,7 +51,8 @@ ul.toc > li { .ant-affix { z-index: 9; max-height: ~'calc(100vh - 16px)'; - overflow: auto; + overflow-x: hidden; + overflow-y: auto; background: #fff; } } From ff680a5376d030704e3346d03adb3c5129f3c859 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Tue, 4 Jun 2019 19:46:01 +0800 Subject: [PATCH 36/79] :lipstick: use marginRight remind developer --- components/auto-complete/demo/uncertain-category.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/auto-complete/demo/uncertain-category.md b/components/auto-complete/demo/uncertain-category.md index 28e6822472..108fc02ea4 100644 --- a/components/auto-complete/demo/uncertain-category.md +++ b/components/auto-complete/demo/uncertain-category.md @@ -85,7 +85,12 @@ class Complete extends React.Component { > + } @@ -116,10 +121,6 @@ ReactDOM.render(, mountNode); padding-right: 62px; } -.global-search.ant-select-auto-complete .ant-input-affix-wrapper .ant-input-suffix { - right: 0; -} - .global-search.ant-select-auto-complete .ant-input-affix-wrapper .ant-input-suffix button { border-top-left-radius: 0; border-bottom-left-radius: 0; From fa391b3ca39bbbd34d8c5d0a2ab1458fc7bc7c40 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Tue, 4 Jun 2019 19:59:39 +0800 Subject: [PATCH 37/79] fix: test ci --- .../auto-complete/__tests__/__snapshots__/demo.test.js.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap b/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap index f30f2613f6..1069a87819 100644 --- a/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap +++ b/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap @@ -443,6 +443,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly >
+ - + Date: Sat, 8 Jun 2019 18:33:35 +0800 Subject: [PATCH 54/79] Fix typo --- docs/spec/colors.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/colors.zh-CN.md b/docs/spec/colors.zh-CN.md index 47a476daa8..c3742dcf49 100644 --- a/docs/spec/colors.zh-CN.md +++ b/docs/spec/colors.zh-CN.md @@ -99,7 +99,7 @@ ReactDOM.render(, mountNode); -品牌色是体现产品特性和传播理念最直观的视觉元素之一。在色彩选取时,需要先明确品牌色在界面中的使用场景及范围。在基础色板中选择主色,我们建议选择色板从浅自深的第六个颜色作为主色。 Ant Design 的品牌色取自基础色板的蓝色,Hex 值为 1890FF,应用场景包括:关键行动点,操作状态、重要信息高亮,图形化等场景。 +品牌色是体现产品特性和传播理念最直观的视觉元素之一。在色彩选取时,需要先明确品牌色在界面中的使用场景及范围。在基础色板中选择主色,我们建议选择色板从浅至深的第六个颜色作为主色。 Ant Design 的品牌色取自基础色板的蓝色,Hex 值为 `#1890FF`,应用场景包括:关键行动点,操作状态、重要信息高亮,图形化等场景。 ### 功能色 From 05d84555d8f4793bb53cc9b0719e8dca1b74fcca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Sat, 8 Jun 2019 18:34:16 +0800 Subject: [PATCH 55/79] Update colors.zh-CN.md --- docs/spec/colors.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/colors.zh-CN.md b/docs/spec/colors.zh-CN.md index c3742dcf49..cea69b1a66 100644 --- a/docs/spec/colors.zh-CN.md +++ b/docs/spec/colors.zh-CN.md @@ -38,7 +38,7 @@ Ant Design 的色板还具备进一步拓展的能力。经过设计师和程序 ### 中性色板 -中性色包含了黑、白、灰。在蚂蚁中后台的网页设计中被大量使用到,合理的选择中性色能够令页面信息具备良好的主次关系,助力阅读体验。Ant Design 的中性色板一共包含了从白到黑的 10 个颜色。 +中性色包含了黑、白、灰。在蚂蚁中后台的网页设计中被大量使用到,合理地选择中性色能够令页面信息具备良好的主次关系,助力阅读体验。Ant Design 的中性色板一共包含了从白到黑的 10 个颜色。 ```__react import Palette from '../../site/theme/template/Color/Palette'; From b0b533a44deda7b3ee438383929c35afad29d14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=95=B8=E7=94=9F?= Date: Mon, 10 Jun 2019 10:04:41 +0800 Subject: [PATCH 56/79] docs: 3.19.3 change-log (#16998) --- CHANGELOG.en-US.md | 21 +++++++++++++++++++++ CHANGELOG.zh-CN.md | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index aafba2cd28..6b32aa4938 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,27 @@ timeline: true --- +## 3.19.3 + +`2019-06-06` + +- 📝 Add FAQ for DatePicker/RangePicker with `mode` cannot be selected. [#16984](https://github.com/ant-design/ant-design/pull/16984) +- 🐞 Fix Breadcrumb validateDOMNesting warning. [#16929](https://github.com/ant-design/ant-design/pull/16929) +- 🐞 Fix Breadcrumb path error when `children` is selected. [#16885](https://github.com/ant-design/ant-design/pull/16885) [@haianweifeng](https://github.com/haianweifeng) +- 🐞 Fix InputNumber with `number` type display native spinner. [#16926](https://github.com/ant-design/ant-design/pull/16926) +- 🐞 Fix Transfer render Empty when customize without data. [#16925](https://github.com/ant-design/ant-design/pull/16925) +- 🐞 **Fix Table header extra vertical scrollbar problem.** [#16950](https://github.com/ant-design/ant-design/pull/16950) +- 🐞 Fix Table miss `border-radius` in Firefox. [#16957](https://github.com/ant-design/ant-design/pull/16957) +- 🐞 Fix Table error when `rowSelection.getCheckboxProps()` has no return value. [#15224](https://github.com/ant-design/ant-design/pull/15224) +- 🐞 Fix Table abnormal scrollbar in Chrome when using `title` and `rowSelection`. + [#16934](https://github.com/ant-design/ant-design/pull/16934) +- 🐞 Fix Divider `orientation="center"` style. [#16988](https://github.com/ant-design/ant-design/pull/16988) +- 🐞 Fix Cascader error when type space. [#16918](https://github.com/ant-design/ant-design/pull/16918) [@Durisvk](https://github.com/Durisvk) +- 🐞 Fix missing spanish translations. [#17002](https://github.com/ant-design/ant-design/pull/17002) [@morellan](https://github.com/morellan) +- TypeScript + - 🐞 Fix Upload `RcFile` definition. [#16851](https://github.com/ant-design/ant-design/pull/16851) + - ⚡️ Export `TextProps` type in Typography. [#17003](https://github.com/ant-design/ant-design/pull/17003) [@Jarvis1010](https://github.com/Jarvis1010) + ## 3.19.2 `2019-06-01` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 492f1be32c..e31721aeb7 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,26 @@ timeline: true --- +## 3.19.3 + +`2019-06-06` + +- 📝 增加 DatePicker/RangePicker 指定 `mode` 后无法选择的文档说明。[#16984](https://github.com/ant-design/ant-design/pull/16984) +- 🐞 修复 Breadcrumb 的 `validateDOMNesting` 警告信息。[#16929](https://github.com/ant-design/ant-design/pull/16929) +- 🐞 修复 Breadcrumb 选中子路由时浏览器路径问题。[#16885](https://github.com/ant-design/ant-design/pull/16885) [@haianweifeng](https://github.com/haianweifeng) +- 🐞 修复 InputNumber 设置 `number` 类型时会展示原生按钮的问题。[#16926](https://github.com/ant-design/ant-design/pull/16926) +- 🐞 修复 Transfer 在自定义列表为空时展示 Empty 样式。[#16925](https://github.com/ant-design/ant-design/pull/16925) +- 🐞 **修复 Table 头部多余的垂直滚动条样式。**[#16950](https://github.com/ant-design/ant-design/pull/16950) +- 🐞 修复 Table 的 `rowSelection.getCheckboxProps()` 在没有返回值时报错的问题。[#15224](https://github.com/ant-design/ant-design/pull/15224) +- 🐞 修复 Firefox 的 Table 丢失 `border-radius` 样式问题。[#16957](https://github.com/ant-design/ant-design/pull/16957) +- 🐞 修复 Table 当 `title` 和 `rowSelection` 同时指定时在 Chrome 下滚动条异常的问题。[#16934](https://github.com/ant-design/ant-design/pull/16934) +- 🐞 修复 Divider `orientation="center"` 时样式错位的问题。[#16988](https://github.com/ant-design/ant-design/pull/16988) +- 🐞 修复 Cascader 搜索时不支持空格输入的问题。[#16918](https://github.com/ant-design/ant-design/pull/16918) [@Durisvk](https://github.com/Durisvk) +- 🐞 修复部分组件的西班牙语言翻译。[#17002](https://github.com/ant-design/ant-design/pull/17002) [@morellan](https://github.com/morellan) +- TypeScript + - 🐞 修复 Upload 的 `RcFile` 类型定义。[#16851](https://github.com/ant-design/ant-design/pull/16851) + - ⚡️ 导出 Typography 中 `TextProps` 的类型定义。[#17003](https://github.com/ant-design/ant-design/pull/17003) [@Jarvis1010](https://github.com/Jarvis1010) + ## 3.19.2 `2019-06-01` From 8c417e6cbf3807c4e206f42bdef99700d83ad816 Mon Sep 17 00:00:00 2001 From: ikobe Date: Mon, 10 Jun 2019 10:12:11 +0800 Subject: [PATCH 57/79] chore: update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66398e8cf7..58abeb5a3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.19.2", + "version": "3.19.3", "title": "Ant Design", "description": "An enterprise-class UI design language and React components implementation", "homepage": "http://ant.design/", From e67270cd596b996617d0dc07986c772ffe714c50 Mon Sep 17 00:00:00 2001 From: zombieJ Date: Mon, 10 Jun 2019 11:59:46 +0800 Subject: [PATCH 58/79] fix: Table with sort should reset to first page (#17020) * sort reset pagination * add test case --- components/table/Table.tsx | 10 ++++++++++ .../table/__tests__/Table.sorter.test.js | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 3595349bfa..ed5eab8828 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -414,6 +414,9 @@ export default class Table extends React.Component, TableState< if (!column.sorter) { return; } + + const pagination = { ...this.state.pagination }; + const sortDirections = column.sortDirections || (this.props.sortDirections as SortOrder[]); const { sortOrder, sortColumn } = this.state; // 只同时允许一列进行排序,否则会导致排序顺序的逻辑问题 @@ -428,7 +431,14 @@ export default class Table extends React.Component, TableState< newSortOrder = sortDirections[0]; } + if (this.props.pagination) { + // Reset current prop + pagination.current = 1; + pagination.onChange!(pagination.current); + } + const newState = { + pagination, sortOrder: newSortOrder, sortColumn: newSortOrder ? column : null, }; diff --git a/components/table/__tests__/Table.sorter.test.js b/components/table/__tests__/Table.sorter.test.js index 2200810841..7d3abdfc79 100644 --- a/components/table/__tests__/Table.sorter.test.js +++ b/components/table/__tests__/Table.sorter.test.js @@ -587,4 +587,23 @@ describe('Table.sorter', () => { wrapper.find('.ant-table-column-sorters').simulate('click'); expect(renderedNames(wrapper)).toEqual(['Jack', 'Lucy', 'Tom', 'Jerry']); }); + + it('pagination back', () => { + const onPageChange = jest.fn(); + const onChange = jest.fn(); + + const wrapper = mount( + createTable({ + pagination: { + pageSize: 2, + onChange: onPageChange, + }, + onChange, + }), + ); + + wrapper.find('.ant-table-column-sorters').simulate('click'); + expect(onChange.mock.calls[0][0].current).toBe(1); + expect(onPageChange.mock.calls[0][0]).toBe(1); + }); }); From 16ed7273dd866ff8c696e27f5f7f8c2ae11e663f Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 10 Jun 2019 18:22:33 +0800 Subject: [PATCH 59/79] :bug: Fix margin issue of PageHeader extra close #17025 --- components/page-header/index.tsx | 2 +- components/page-header/style/index.less | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/page-header/index.tsx b/components/page-header/index.tsx index f79d526c6b..afc5d14c5e 100644 --- a/components/page-header/index.tsx +++ b/components/page-header/index.tsx @@ -70,7 +70,7 @@ const renderTitle = (prefixCls: string, props: PageHeaderProps) => { const titlePrefixCls = `${prefixCls}-title-view`; if (title || subTitle || tags || extra) { return ( -
+
{title && {title}} {subTitle && {subTitle}} {tags && {tags}} diff --git a/components/page-header/style/index.less b/components/page-header/style/index.less index 82535759c0..9180fe47b1 100644 --- a/components/page-header/style/index.less +++ b/components/page-header/style/index.less @@ -65,9 +65,9 @@ top: 16px; right: @page-header-padding-horizontal; > * { - margin-right: 8px; + margin-left: 8px; } - > *:last-child { + > *:first-child { margin-right: 0; } } From 28eea42a0b1b9050dc5f4541fc513a265153f515 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Mon, 10 Jun 2019 10:53:56 +0000 Subject: [PATCH 60/79] :arrow_up: Update majo requirement from ^0.7.1 to ^0.8.0 Updates the requirements on [majo](https://github.com/egoist/majo) to permit the latest version. - [Release notes](https://github.com/egoist/majo/releases) - [Commits](https://github.com/egoist/majo/compare/v0.7.1...v0.8.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58abeb5a3c..82ae091791 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "logrocket": "^1.0.0", "logrocket-react": "^3.0.0", "lz-string": "^1.4.4", - "majo": "^0.7.1", + "majo": "^0.8.0", "mockdate": "^2.0.2", "node-fetch": "^2.6.0", "pre-commit": "^1.2.2", From 4aced89c674ec95b82e3546c7bcb54b3377b689c Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 10 Jun 2019 19:06:16 +0800 Subject: [PATCH 61/79] :bug: Fix margin issue of PageHeader extra continually --- components/page-header/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/page-header/style/index.less b/components/page-header/style/index.less index 9180fe47b1..c47cb73d41 100644 --- a/components/page-header/style/index.less +++ b/components/page-header/style/index.less @@ -68,7 +68,7 @@ margin-left: 8px; } > *:first-child { - margin-right: 0; + margin-left: 0; } } } From 61d3041a077d9bbc4137bc64fd02f7c4776186ad Mon Sep 17 00:00:00 2001 From: zombieJ Date: Tue, 11 Jun 2019 11:04:29 +0800 Subject: [PATCH 62/79] update calendar (#17038) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 82ae091791..afda6b30c4 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "prop-types": "^15.7.2", "raf": "^3.4.1", "rc-animate": "^2.8.3", - "rc-calendar": "~9.14.5", + "rc-calendar": "~9.15.0", "rc-cascader": "~0.17.4", "rc-checkbox": "~2.1.6", "rc-collapse": "~1.11.3", From 20e6bed8a10277833b239d898209991e26ba1391 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 11 Jun 2019 12:00:52 +0800 Subject: [PATCH 63/79] :lipstick: Keep submenu selected style --- components/menu/style/index.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/menu/style/index.less b/components/menu/style/index.less index 78b21fb68b..acbfdef49e 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -43,6 +43,10 @@ padding 0.15s @ease-in-out; } + &-submenu-selected { + color: @menu-highlight-color; + } + &-item:active, &-submenu-title:active { background: @menu-item-active-bg; From 594555087fc26d7f152f9cdb57d3ae47b0445605 Mon Sep 17 00:00:00 2001 From: Sam Kirkland Date: Mon, 10 Jun 2019 23:57:27 -0500 Subject: [PATCH 64/79] Update index.less --- components/comment/style/index.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/comment/style/index.less b/components/comment/style/index.less index 78548a27ab..b83a734477 100644 --- a/components/comment/style/index.less +++ b/components/comment/style/index.less @@ -27,25 +27,25 @@ position: relative; flex: 1 1 auto; min-width: 1px; - font-size: 14px; + font-size: @comment-font-size-base; word-wrap: break-word; &-author { display: flex; justify-content: flex-start; margin-bottom: 4px; - font-size: 14px; + font-size: @comment-font-size-base; & > a, & > span { height: 18px; padding-right: 8px; - font-size: 12px; + font-size: @comment-font-size-sm; line-height: 18px; } &-name { color: @comment-author-name-color; - font-size: 14px; + font-size: @comment-font-size-base; transition: color 0.3s; > * { color: @comment-author-name-color; @@ -76,7 +76,7 @@ > span { padding-right: 10px; color: @comment-action-color; - font-size: 12px; + font-size: @comment-font-size-sm; cursor: pointer; transition: color 0.3s; user-select: none; From 7b3f0554bcb363a9823326a822c8c9f3183b88e5 Mon Sep 17 00:00:00 2001 From: Sam Kirkland Date: Mon, 10 Jun 2019 23:58:42 -0500 Subject: [PATCH 65/79] Update default.less --- components/style/themes/default.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 39af315aad..22663a0f7a 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -452,6 +452,8 @@ // --- @comment-padding-base: 16px 0; @comment-nest-indent: 44px; +@comment-font-size-base: @font-size-base; +@comment-font-size-sm: @font-size-sm; @comment-author-name-color: @text-color-secondary; @comment-author-time-color: #ccc; @comment-action-color: @text-color-secondary; From 219636f592a67afc4aa94ceb181813dbf7c1b566 Mon Sep 17 00:00:00 2001 From: Sam Kirkland Date: Tue, 11 Jun 2019 00:07:58 -0500 Subject: [PATCH 66/79] Update certain-category.md --- .../auto-complete/demo/certain-category.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/auto-complete/demo/certain-category.md b/components/auto-complete/demo/certain-category.md index 49547cb7ee..f4751006a8 100644 --- a/components/auto-complete/demo/certain-category.md +++ b/components/auto-complete/demo/certain-category.md @@ -20,7 +20,7 @@ const { Option, OptGroup } = AutoComplete; const dataSource = [ { - title: '话题', + title: 'Libraries', children: [ { title: 'AntDesign', @@ -33,23 +33,23 @@ const dataSource = [ ], }, { - title: '问题', + title: 'Solutions', children: [ { - title: 'AntDesign UI 有多好', + title: 'AntDesign UI', count: 60100, }, { - title: 'AntDesign 是啥', + title: 'AntDesign', count: 30010, }, ], }, { - title: '文章', + title: 'Articles', children: [ { - title: 'AntDesign 是一个设计语言', + title: 'AntDesign design language', count: 100000, }, ], @@ -66,7 +66,7 @@ function renderTitle(title) { target="_blank" rel="noopener noreferrer" > - 更多 + more ); @@ -78,7 +78,7 @@ const options = dataSource {group.children.map(opt => ( ))} @@ -86,7 +86,7 @@ const options = dataSource .concat([ , ]); From 740eb7fda92df8722d7ea9d5c1ecc7091ad1e952 Mon Sep 17 00:00:00 2001 From: Sam Kirkland Date: Tue, 11 Jun 2019 00:08:52 -0500 Subject: [PATCH 67/79] Update uncertain-category.md --- components/auto-complete/demo/uncertain-category.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/auto-complete/demo/uncertain-category.md b/components/auto-complete/demo/uncertain-category.md index 108fc02ea4..dec42e5128 100644 --- a/components/auto-complete/demo/uncertain-category.md +++ b/components/auto-complete/demo/uncertain-category.md @@ -42,7 +42,7 @@ function renderOption(item) { ); From 9b3c0d3fa565cf22a082a2abe47c8afbea3468ec Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 11 Jun 2019 14:45:04 +0800 Subject: [PATCH 68/79] :white_check_mark: update snapshots --- .../__snapshots__/components.test.js.snap | 3 ++ .../__snapshots__/index.test.js.snap | 45 +++++++++++++++++++ .../__snapshots__/Modal.test.js.snap | 2 + 3 files changed, 50 insertions(+) diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 902e5564ae..abe53c9504 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -8175,6 +8175,7 @@ exports[`ConfigProvider components Modal configProvider 1`] = `
Date: Wed, 12 Jun 2019 12:20:32 +0800 Subject: [PATCH 71/79] use calc to fix tree line (#17055) --- components/tree/style/index.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/tree/style/index.less b/components/tree/style/index.less index ca9053870a..da347b39f7 100644 --- a/components/tree/style/index.less +++ b/components/tree/style/index.less @@ -244,7 +244,8 @@ left: 12px; width: 1px; height: 100%; - margin: 22px 0; + height: calc(100% - 22px); // Remove additional height if support + margin: 22px 0 0; border-left: 1px solid @border-color-base; content: ' '; } From 3c2c7c60c5c34ee640e7871b23b8362d7ac8b2ba Mon Sep 17 00:00:00 2001 From: lon Date: Wed, 12 Jun 2019 13:58:13 +0800 Subject: [PATCH 72/79] fix: add link button to basic demo of button docs --- components/button/demo/basic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/button/demo/basic.md b/components/button/demo/basic.md index d1a0621650..98fbfa3666 100644 --- a/components/button/demo/basic.md +++ b/components/button/demo/basic.md @@ -7,11 +7,11 @@ title: ## zh-CN -按钮有四种类型:主按钮、次按钮、虚线按钮、危险按钮。主按钮在同一个操作区域最多出现一次。 +按钮有五种类型:主按钮、次按钮、虚线按钮、危险按钮和链接按钮。主按钮在同一个操作区域最多出现一次。 ## en-US -There are `primary` button, `default` button, `dashed` button and `danger` button in antd. +There are `primary` button, `default` button, `dashed` button, `danger` button and `link` button in antd. ```jsx import { Button } from 'antd'; From 52905e1b39600c91920383674300231efa3f9fda Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 12 Jun 2019 18:12:11 +0800 Subject: [PATCH 73/79] :lipstick: adjust bordered table header scrollbar style --- components/table/style/index.less | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index 95c38d262b..edcd32d705 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -599,10 +599,16 @@ opacity: 0.9999; &::-webkit-scrollbar { - border-bottom: 1px solid @border-color-split; + border: 1px solid @border-color-split; + border-width: 0 0 1px 0; } } + &-bordered&-fixed-header &-scroll &-header::-webkit-scrollbar { + border: 1px solid @border-color-split; + border-width: 1px 1px 0 0; + } + &-hide-scrollbar { // https://github.com/ant-design/ant-design/issues/4637 // https://stackoverflow.com/a/54101063 From 6d2ad5c324af37f3837c5319ac2a073f4d3aa637 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 12 Jun 2019 19:39:28 +0800 Subject: [PATCH 74/79] :lipstick: optimize bordered table header scrollbar style continue after #17065 --- components/table/style/index.less | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index edcd32d705..5ec1764532 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -604,11 +604,6 @@ } } - &-bordered&-fixed-header &-scroll &-header::-webkit-scrollbar { - border: 1px solid @border-color-split; - border-width: 1px 1px 0 0; - } - &-hide-scrollbar { // https://github.com/ant-design/ant-design/issues/4637 // https://stackoverflow.com/a/54101063 @@ -619,6 +614,17 @@ } } + // optimize header style of borderd table after hide extra scrollbar + &-bordered&-fixed-header &-scroll &-header { + &::-webkit-scrollbar { + border: 1px solid @border-color-split; + border-width: 1px 1px 1px 0; + } + &.@{table-prefix-cls}-hide-scrollbar .@{table-prefix-cls}-thead > tr > th:last-child { + border-right-color: transparent; + } + } + &-fixed-left, &-fixed-right { position: absolute; From 67b28c36f09a3d96989803de7b44a541013d70e4 Mon Sep 17 00:00:00 2001 From: maximest-pierre Date: Wed, 12 Jun 2019 14:42:48 -0400 Subject: [PATCH 75/79] Fix grammar on message documentation --- components/message/demo/other.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/message/demo/other.md b/components/message/demo/other.md index fb6fd3aadc..bf4089d5ef 100644 --- a/components/message/demo/other.md +++ b/components/message/demo/other.md @@ -17,15 +17,15 @@ Messages of success, error and warning types. import { message, Button } from 'antd'; const success = () => { - message.success('This is a message of success'); + message.success('This is a success message'); }; const error = () => { - message.error('This is a message of error'); + message.error('This is an error message'); }; const warning = () => { - message.warning('This is message of warning'); + message.warning('This is a warning message'); }; ReactDOM.render( From a85b449d6f3036401e5db68778d7777ac1960e95 Mon Sep 17 00:00:00 2001 From: Michael Adams <36059111+mtadams007@users.noreply.github.com> Date: Wed, 12 Jun 2019 23:29:20 -0400 Subject: [PATCH 76/79] fix: remove margin for collapse arrow (#17009) * remove margin for collapse arrow * change translateY to -21px in collapse * remove line-height to center arrow --- components/collapse/style/index.less | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index 93791bfba3..9378af6f74 100644 --- a/components/collapse/style/index.less +++ b/components/collapse/style/index.less @@ -37,9 +37,7 @@ top: 50%; left: @padding-md; display: inline-block; - margin-top: 2px; font-size: @font-size-sm; - line-height: 46px; transform: translateY(-50%); & svg { From 482491ae8739cf998cd95d96c76d858fc814afae Mon Sep 17 00:00:00 2001 From: Ahmad Abdelaziz Date: Thu, 13 Jun 2019 18:03:23 +0200 Subject: [PATCH 77/79] Fixing date formats for Arabic-Egypt locale --- components/date-picker/locale/ar_EG.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/date-picker/locale/ar_EG.tsx b/components/date-picker/locale/ar_EG.tsx index fcdaa12adc..ad840b669b 100644 --- a/components/date-picker/locale/ar_EG.tsx +++ b/components/date-picker/locale/ar_EG.tsx @@ -11,6 +11,10 @@ const locale = { timePickerLocale: { ...TimePickerLocale, }, + dateFormat: 'DD-MM-YYYY', + monthFormat: 'MM-YYYY', + dateTimeFormat: 'DD-MM-YYYY HH:mm:ss', + weekFormat: 'wo-YYYY', }; // All settings at: From 2efa79b4ebd8b9505ef0acc69f40c3590e8fddb1 Mon Sep 17 00:00:00 2001 From: Johnsen Date: Fri, 14 Jun 2019 14:13:06 +0800 Subject: [PATCH 78/79] Update index.zh-CN.md add getPopupContainer props --- components/auto-complete/index.zh-CN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/components/auto-complete/index.zh-CN.md b/components/auto-complete/index.zh-CN.md index 70e4a9f8cb..6d2edb45b0 100644 --- a/components/auto-complete/index.zh-CN.md +++ b/components/auto-complete/index.zh-CN.md @@ -31,6 +31,7 @@ const dataSource = ['12345', '23456', '34567']; | defaultValue | 指定默认选中的条目 | string\|string\[]\| 无 | | disabled | 是否禁用 | boolean | false | | filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`。 | boolean or function(inputValue, option) | true | +| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](https://codesandbox.io/s/4j168r7jw0) | Function(triggerNode) | () => document.body | | optionLabelProp | 回填到选择框的 Option 的属性值,默认是 Option 的子元素。比如在子元素需要高亮效果时,此值可以设为 `value`。 | string | `children` | | placeholder | 输入框提示 | string | - | | value | 指定当前选中的条目 | string\|string\[]\|{ key: string, label: string\|ReactNode }\|Array<{ key: string, label: string\|ReactNode }> | 无 | From 3606d15c2fc94f63d8124be539532485547faa8e Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 14 Jun 2019 15:28:49 +0800 Subject: [PATCH 79/79] :bug: Fix Input not align with other components in Chrome close #17082 --- components/input/style/mixin.less | 4 +++- components/time-picker/style/index.less | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less index f8a917d4d1..0bc2b8f0c6 100644 --- a/components/input/style/mixin.less +++ b/components/input/style/mixin.less @@ -8,11 +8,13 @@ height: @input-height-lg; padding: @input-padding-vertical-lg @input-padding-horizontal-lg; font-size: @font-size-lg; + line-height: @input-height-lg; } .input-sm() { height: @input-height-sm; padding: @input-padding-vertical-sm @input-padding-horizontal-sm; + line-height: @input-height-sm; } // input status @@ -49,7 +51,7 @@ padding: @input-padding-vertical-base @input-padding-horizontal-base; color: @input-color; font-size: @font-size-base; - line-height: @line-height-base; + line-height: @input-height-base; background-color: @input-bg; background-image: none; border: @border-width-base @border-style-base @input-border-color; diff --git a/components/time-picker/style/index.less b/components/time-picker/style/index.less index 372d2e91d7..0785200e0c 100644 --- a/components/time-picker/style/index.less +++ b/components/time-picker/style/index.less @@ -225,3 +225,14 @@ right: @control-padding-horizontal-sm - 1px; } } + +// Fix cursor height in safari +// https://stackoverflow.com/q/3843408/3040605 +// https://browserstrangeness.github.io/css_hacks.html#safari +@media not all and (min-resolution: 0.001dpcm) { + @supports (-webkit-appearance: none) and (stroke-color: transparent) { + .@{ant-prefix}-input { + line-height: @line-height-base; + } + } +}