diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 6ea553cfb9..6b32aa4938 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,41 @@ 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` + +- 🐞 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 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) + - ⚡️ 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..e31721aeb7 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,40 @@ 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` + +- 🐞 修复 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) +- 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` 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 > } @@ -116,10 +120,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; 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 }> | 无 | diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index 8a6a39c765..24d3066e26 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -70,6 +70,24 @@ export default class Breadcrumb extends React.Component { 'see: https://u.ant.design/item-render.', ); } + + 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 = {}, @@ -78,11 +96,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]); - }); + const path = this.getPath(route.path, params); if (path) { paths.push(path); @@ -93,10 +107,12 @@ export default class Breadcrumb extends React.Component { overlay = ( {route.children.map(child => ( - - {itemRender(child, params, routes, paths)} - - ))} + + { + itemRender(child, params, routes, this.addChildPath(paths, child.path, params)) + } + + ))} ); } 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, ); ``` 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'; 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(); } }; diff --git a/components/checkbox/style/mixin.less b/components/checkbox/style/mixin.less index 6e136528a0..2e7d5ea1f2 100644 --- a/components/checkbox/style/mixin.less +++ b/components/checkbox/style/mixin.less @@ -175,7 +175,7 @@ // 半选状态 .@{checkbox-prefix-cls}-indeterminate { .@{checkbox-inner-prefix-cls} { - background-color: #fff; + background-color: @component-background; border-color: @border-color-base; } .@{checkbox-inner-prefix-cls}::after { diff --git a/components/collapse/style/index.less b/components/collapse/style/index.less index 45a3416252..47d016cc2d 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 { 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; 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`] = `