From fbf1a352499cdb0a3389b55e5f85d97d4b777230 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 24 Jul 2018 16:27:21 +0800 Subject: [PATCH 01/30] Fix extra scrollbar style of Modal.confirm in Firefox, close #11432 --- components/modal/style/confirm.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal/style/confirm.less b/components/modal/style/confirm.less index 34bcc26ea4..aa13254389 100644 --- a/components/modal/style/confirm.less +++ b/components/modal/style/confirm.less @@ -24,7 +24,7 @@ color: @heading-color; font-weight: 500; font-size: @font-size-lg; - line-height: 1.375; + line-height: 1.4; display: block; // create BFC to avoid // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png From 36f396f86fce8542a380b7b1a4af8ad1280f1745 Mon Sep 17 00:00:00 2001 From: JribiBelhassen Date: Wed, 25 Jul 2018 03:53:18 +0100 Subject: [PATCH 02/30] Change label in TreeData interface to title, since label is deprecated (#11442) --- components/tree-select/interface.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/tree-select/interface.tsx b/components/tree-select/interface.tsx index c19a5cdb2e..34a597c54f 100644 --- a/components/tree-select/interface.tsx +++ b/components/tree-select/interface.tsx @@ -4,7 +4,7 @@ import { AbstractSelectProps } from '../select'; export interface TreeData { key: string; value: string; - label: React.ReactNode; + title: React.ReactNode; children?: TreeData[]; } From b9992f4a08574efb47b6e6cd80eb1e888b9a1ede Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Wed, 25 Jul 2018 15:42:48 +0800 Subject: [PATCH 03/30] fix: DatePicker can not change year/month when under control React 16.4 call getDerivedStateFromProps on every render close #11447 close #11440 close #11439 close #11416 close #11405 --- components/date-picker/RangePicker.tsx | 8 +++++++- components/date-picker/createPicker.tsx | 14 ++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/components/date-picker/RangePicker.tsx b/components/date-picker/RangePicker.tsx index 50e78ea797..cf66d680aa 100644 --- a/components/date-picker/RangePicker.tsx +++ b/components/date-picker/RangePicker.tsx @@ -5,6 +5,7 @@ import { polyfill } from 'react-lifecycles-compat'; import RangeCalendar from 'rc-calendar/lib/RangeCalendar'; import RcDatePicker from 'rc-calendar/lib/Picker'; import classNames from 'classnames'; +import shallowequal from 'shallowequal'; import Icon from '../icon'; import Tag from '../tag'; import warning from '../_util/warning'; @@ -77,8 +78,13 @@ class RangePicker extends React.Component { const value = nextProps.value || []; state = { value, - showDate: getShowDateFromValue(value) || prevState.showDate, }; + if (!shallowequal(nextProps.value, prevState.value)) { + state = { + ...state, + showDate: getShowDateFromValue(value) || prevState.showDate, + }; + } } if (('open' in nextProps) && prevState.open !== nextProps.open) { state = { diff --git a/components/date-picker/createPicker.tsx b/components/date-picker/createPicker.tsx index c2ed5dcda8..959af2dceb 100644 --- a/components/date-picker/createPicker.tsx +++ b/components/date-picker/createPicker.tsx @@ -23,14 +23,20 @@ export default function createPicker(TheCalendar: React.ComponentClass): any { showToday: true, }; - static getDerivedStateFromProps(nextProps: PickerProps) { + static getDerivedStateFromProps(nextProps: PickerProps, prevState: any) { + let state = null; if ('value' in nextProps) { - return { + state = { value: nextProps.value, - showDate: nextProps.value, }; + if (nextProps.value !== prevState.value) { + state = { + ...state, + showDate: nextProps.value, + }; + } } - return null; + return state; } private input: any; From 9f76f1c2763a3f99ae9939250a12d37f63830652 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Wed, 25 Jul 2018 16:31:18 +0800 Subject: [PATCH 04/30] chore: add tests for b9992f4 --- components/date-picker/__tests__/DatePicker.test.js | 11 +++++++++++ components/date-picker/__tests__/RangePicker.test.js | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/components/date-picker/__tests__/DatePicker.test.js b/components/date-picker/__tests__/DatePicker.test.js index 41a5c86b07..2bceeeaa96 100644 --- a/components/date-picker/__tests__/DatePicker.test.js +++ b/components/date-picker/__tests__/DatePicker.test.js @@ -165,4 +165,15 @@ describe('DatePicker', () => { const input = wrapper.find('.ant-calendar-picker-input').getDOMNode(); expect(input.getAttribute('role')).toBe('search'); }); + + it('changes year/month when under control', () => { + const wrapper = mount( + + ); + openPanel(wrapper); + expect(wrapper.find('.ant-calendar-my-select').text()).toBe('Jul2018'); + wrapper.find('.ant-calendar-prev-year-btn').simulate('click'); + wrapper.find('.ant-calendar-prev-month-btn').simulate('click'); + expect(wrapper.find('.ant-calendar-my-select').text()).toBe('Jun2017'); + }); }); diff --git a/components/date-picker/__tests__/RangePicker.test.js b/components/date-picker/__tests__/RangePicker.test.js index c26114c284..55d58b0804 100644 --- a/components/date-picker/__tests__/RangePicker.test.js +++ b/components/date-picker/__tests__/RangePicker.test.js @@ -3,7 +3,7 @@ import { mount, render } from 'enzyme'; import moment from 'moment'; import DatePicker from '..'; import { setMockDate, resetMockDate } from '../../../tests/utils'; -import { selectDate } from './utils'; +import { selectDate, openPanel } from './utils'; import focusTest from '../../../tests/shared/focusTest'; const { RangePicker } = DatePicker; @@ -215,4 +215,13 @@ describe('RangePicker', () => { wrapper.find('.ant-calendar-input').at(1).simulate('change', { target: { value: '2016-01-01' } }) )).not.toThrow(); }); + + it('changes year/month when under control', () => { + const wrapper = mount(); + openPanel(wrapper); + expect(wrapper.find('.ant-calendar-my-select').first().text()).toBe('Jul2018'); + wrapper.find('.ant-calendar-prev-year-btn').first().simulate('click'); + wrapper.find('.ant-calendar-prev-month-btn').first().simulate('click'); + expect(wrapper.find('.ant-calendar-my-select').first().text()).toBe('Jun2017'); + }); }); From f5652f8e576bf6ce1a0be47dca96248f29ff6a0a Mon Sep 17 00:00:00 2001 From: zombiej Date: Wed, 25 Jul 2018 17:06:44 +0800 Subject: [PATCH 05/30] make title & label as optional props in treeSelect --- components/tree-select/interface.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/tree-select/interface.tsx b/components/tree-select/interface.tsx index 34a597c54f..8c7d58c159 100644 --- a/components/tree-select/interface.tsx +++ b/components/tree-select/interface.tsx @@ -4,7 +4,11 @@ import { AbstractSelectProps } from '../select'; export interface TreeData { key: string; value: string; - title: React.ReactNode; + /** + * @deprecated Please use `title` instead. + */ + label?: React.ReactNode; + title?: React.ReactNode; children?: TreeData[]; } From 548c694c404b08ff0d04148fad9bd9242dc8207b Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Wed, 25 Jul 2018 17:42:31 +0800 Subject: [PATCH 06/30] Add 3.7.2 changelog (#11455) --- CHANGELOG.en-US.md | 22 ++++++++++++++++++++++ CHANGELOG.zh-CN.md | 24 +++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index c22481e3fd..881fd1c83c 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,28 @@ timeline: true --- +## 3.7.2 + +`2018-07-25` + +- DatePicker + - 🐞 **Fix issue resulting in year and month can not be changed in control mode.** [b9992f4](https://github.com/ant-design/ant-design/commit/b9992f4a08574efb47b6e6cd80eb1e888b9a1ede) + - 🐞 Fix warning of `getDerivedStateFromProp`. [#11398](https://github.com/ant-design/ant-design/pull/11398) [@yoyo837](https://github.com/yoyo837) +- Drawer + - 🐞 Fix close animation when setting `destroyOnClose`. [#11307](https://github.com/ant-design/ant-design/issues/11307) + - 🐞 Fix display issue when using a `vw` value as `width`. [#11326](https://github.com/ant-design/ant-design/issues/11326) + - 🐞 Fix `wrapClassName` now working. +- 🐞 Fix text overflow of Tooltip. [#11402](https://github.com/ant-design/ant-design/pull/11402) [@weidapao](https://github.com/weidapao) +- 🐞 Fix style issue of dark theme Menu in Layout.Header. [#11400](https://github.com/ant-design/ant-design/pull/11400) [@hongxuWei](https://github.com/hongxuWei) +- 🐞 Fix the arrow buttons of InputNumber showing wrong positon in a fixed table. [#11408](https://github.com/ant-design/ant-design/issues/11408) +- 🐞 Fix issue resulting in Select.Option shows wrong border radius in Select.OptGroup. [6cb6f5c](https://github.com/ant-design/ant-design/commit/6cb6f5c83ed634e67d5b5d0816d11aa0788a74d8) +- 🐞 Fix issue resulting in `onChange` was trigged twice when click the filter icon of Table. [#11164](https://github.com/ant-design/ant-design/issues/11164) [@adybionka](https://github.com/adybionka) +- 🐞 Fix issue resulting title of Model.confirm shows scrollbar on Firefox. [#11432](https://github.com/ant-design/ant-design/issues/11432) +- TypeScript + - 🐞 Fix type definition of Radio.Group. [#11409](https://github.com/ant-design/ant-design/pull/11409) [@eddiemoore](https://github.com/eddiemoore) + - 🐞 Fix type definition of TreeSelect. [#11442](https://github.com/ant-design/ant-design/pull/11442) [@JribiBelhassen](https://github.com/JribiBelhassen) + - 🐞 Fix type definition of Badge. [#11421](https://github.com/ant-design/ant-design/pull/11421) [@zongzi531](https://github.com/zongzi531) + ## 3.7.1 `2018-07-21` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index ca23ebe872..954e7c5515 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,28 @@ timeline: true --- +## 3.7.2 + +`2018-07-25` + +- DatePicker + - 🐞 **修复在受控模式下不能切换年月的问题。**[b9992f4](https://github.com/ant-design/ant-design/commit/b9992f4a08574efb47b6e6cd80eb1e888b9a1ede) + - 🐞 修复在 `getDerivedStateFromProp` 的警告。[#11398](https://github.com/ant-design/ant-design/pull/11398) [@yoyo837](https://github.com/yoyo837) +- Drawer + - 🐞 修复使用 `destroyOnClose` 时没有关闭动画的问题。[#11307](https://github.com/ant-design/ant-design/issues/11307) + - 🐞 修复 `width` 以 `vw` 为单位时的显示错误。[#11326](https://github.com/ant-design/ant-design/issues/11326) + - 🐞 修复 `wrapClassName` 属性无效的问题。 +- 🐞 修复 Tooltip 文字溢出的问题。[#11402](https://github.com/ant-design/ant-design/pull/11402) [@weidapao](https://github.com/weidapao) +- 🐞 修复 Menu 在 `theme` 为 `dark` 是在 Layout.Header 里的样式问题。[#11400](https://github.com/ant-design/ant-design/pull/11400) [@hongxuWei](https://github.com/hongxuWei) +- 🐞 修复 InputNumber 的箭头按钮在使用了固定列的 Table 里显示错位的问题。[#11408](https://github.com/ant-design/ant-design/issues/11408) +- 🐞 修复 Select 使用分组时 Option 的圆角显示错误。[6cb6f5c](https://github.com/ant-design/ant-design/commit/6cb6f5c83ed634e67d5b5d0816d11aa0788a74d8) +- 🐞 修复 Table 第一次点击过滤按钮的时候 `onChange` 会被触发两次的问题。[#11164](https://github.com/ant-design/ant-design/issues/11164) [@adybionka](https://github.com/adybionka) +- 🐞 修复 Model.confirm 的标题在 Firefox 下会显示滚动条的问题。[#11432](https://github.com/ant-design/ant-design/issues/11432) +- TypeScript + - 🐞 修复 Radio.Group 类型定义。[#11409](https://github.com/ant-design/ant-design/pull/11409) [@eddiemoore](https://github.com/eddiemoore) + - 🐞 修复 TreeSelect 类型定义。[#11442](https://github.com/ant-design/ant-design/pull/11442) [@JribiBelhassen](https://github.com/JribiBelhassen) + - 🐞 修复 Badge 类型定义。[#11421](https://github.com/ant-design/ant-design/pull/11421) [@zongzi531](https://github.com/zongzi531) + ## 3.7.1 `2018-07-21` @@ -29,7 +51,7 @@ timeline: true ## 3.7.0 -3.7.0是一个重磅更新,带来了很多激动人心的变化和新特性。 +3.7.0 是一个重磅更新,带来了很多激动人心的变化和新特性。 以下是一些亮点✨: - 🔥 增加抽屉组件 : [`Drawer`](https://ant.design/components/drawer-cn/) [#10791](https://github.com/ant-design/ant-design/pull/10791) From ee1c726447f4fa036b0b0a223f483144cae5e4a6 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Wed, 25 Jul 2018 17:43:39 +0800 Subject: [PATCH 07/30] Bump 3.7.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b91cd818c..ccf72ccdaa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.7.1", + "version": "3.7.2", "title": "Ant Design", "description": "An enterprise-class UI design language and React-based implementation", "homepage": "http://ant.design/", From fd06d7b8b12fbab0c7dd2c142e15b9da795818d0 Mon Sep 17 00:00:00 2001 From: Grant Klinsing Date: Fri, 27 Jul 2018 02:14:20 -0500 Subject: [PATCH 08/30] Update Pagination Typescript definition to include "role" (#11474) * Add data-, aria- and role prop types to match rc-pagination * Remove data- and aria- definitions since they are allowed already --- components/pagination/Pagination.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/pagination/Pagination.tsx b/components/pagination/Pagination.tsx index e42f31a343..6aecaea3fe 100644 --- a/components/pagination/Pagination.tsx +++ b/components/pagination/Pagination.tsx @@ -27,6 +27,7 @@ export interface PaginationProps { prefixCls?: string; selectPrefixCls?: string; itemRender?: (page: number, type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next') => React.ReactNode; + role?: string; } export interface PaginationConfig extends PaginationProps { From 45f1ff5bf70fef939e2b514edcd1ff7a0d737912 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 26 Jul 2018 07:12:03 +0000 Subject: [PATCH 09/30] build(deps-dev): update stylelint requirement to 9.4.0 Updates the requirements on [stylelint](https://github.com/stylelint/stylelint) to permit the latest version. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/commits/9.4.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ccf72ccdaa..2f4c7a646d 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "reqwest": "^2.0.5", "rimraf": "^2.5.4", "scrollama": "^1.4.1", - "stylelint": "9.3.0", + "stylelint": "9.4.0", "stylelint-config-standard": "^18.0.0", "typescript": "~2.9.1", "unified": "^7.0.0", From 2e7d08e98f2c6935fa72d8180e2175fb8367dec9 Mon Sep 17 00:00:00 2001 From: This JJ <32838161+thisJJ@users.noreply.github.com> Date: Fri, 27 Jul 2018 15:47:07 +0700 Subject: [PATCH 10/30] Add id to Select props (#11189) * Can set id to props on Select * Update index.tsx --- components/select/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/select/index.tsx b/components/select/index.tsx index ee50969377..70ecfec5d2 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -27,6 +27,7 @@ export interface AbstractSelectProps { dropdownMatchSelectWidth?: boolean; onSearch?: (value: string) => any; filterOption?: boolean | ((inputValue: string, option: React.ReactElement) => any); + id?: string; } export interface LabeledValue { @@ -85,6 +86,7 @@ const SelectPropTypes = { optionLabelProp: PropTypes.string, transitionName: PropTypes.string, choiceTransitionName: PropTypes.string, + id: PropTypes.string, }; // => It is needless to export the declaration of below two inner components. From a0a0d88b78b4693eb0d829e6afaf04e58c1873aa Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Tue, 24 Jul 2018 10:34:50 +0800 Subject: [PATCH 11/30] Fix content without vertical alignment icon when using vertical label mode; And description text-align: center; --- components/steps/style/label-placement.less | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/steps/style/label-placement.less b/components/steps/style/label-placement.less index f5a2957b2c..b229784ca3 100644 --- a/components/steps/style/label-placement.less +++ b/components/steps/style/label-placement.less @@ -9,7 +9,8 @@ display: block; text-align: center; margin-top: 8px; - width: @steps-desciption-max-width; + // icon左边距离+一半icon宽度,是content一半的宽度,垂直对齐icon + width: (@steps-icon-size / 2 + 36px) * 2; } &-icon { display: inline-block; @@ -21,8 +22,5 @@ display: none; } } - &-description { - text-align: left; - } } } From 6ae02a9ab71943c2317073d23543d95553e85b9a Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Tue, 24 Jul 2018 10:57:45 +0800 Subject: [PATCH 12/30] progress-dot --- components/steps/style/progress-dot.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/steps/style/progress-dot.less b/components/steps/style/progress-dot.less index e7aa109fce..94ece6a8bd 100644 --- a/components/steps/style/progress-dot.less +++ b/components/steps/style/progress-dot.less @@ -44,6 +44,9 @@ } } } + &-content { + width: @steps-desciption-max-width; + } &-process .@{steps-prefix-cls}-item-icon { width: @steps-current-dot-size; height: @steps-current-dot-size; From ce24f278cf861de0cd023fcd95a0f27fff8edace Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Tue, 24 Jul 2018 11:15:28 +0800 Subject: [PATCH 13/30] docs --- components/steps/index.en-US.md | 3 ++- components/steps/index.zh-CN.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/steps/index.en-US.md b/components/steps/index.en-US.md index 308369fa6e..c5475a7fb8 100644 --- a/components/steps/index.en-US.md +++ b/components/steps/index.en-US.md @@ -29,7 +29,8 @@ The whole of the step bar. | -------- | ----------- | ---- | ------- | | current | to set the current step, counting from 0. You can overwrite this state by using `status` of `Step` | number | 0 | | direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | string | `horizontal` | -| progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false | +| labelPlacement | support vertial title and description | string | `horizontal` | +| progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode. labelPlacement will be `vertical` | false | | size | to specify the size of the step bar, `default` and `small` are currently supported | string | `default` | | status | to specify the status of current step, can be set to one of the following values: `wait` `process` `finish` `error` | string | `process` | diff --git a/components/steps/index.zh-CN.md b/components/steps/index.zh-CN.md index 2be3d47144..c7aee3aad9 100644 --- a/components/steps/index.zh-CN.md +++ b/components/steps/index.zh-CN.md @@ -30,7 +30,8 @@ title: Steps | --- | --- | --- | --- | | current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 `status` 属性覆盖状态 | number | 0 | | direction | 指定步骤条方向。目前支持水平(`horizontal`)和竖直(`vertical`)两种方向 | string | horizontal | -| progressDot | 点状步骤条,可以设置为一个 function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false | +| labelPlacement | 指定标签放置位置,默认水平放图标右侧,可选`vertical`放图标下方 | string | `horizontal` | +| progressDot | 点状步骤条,可以设置为一个 function | Boolean or (iconDot, {index, status, title, description}) => ReactNode。labelPlacement 讲强制为`vertical` | false | | size | 指定大小,目前支持普通(`default`)和迷你(`small`) | string | default | | status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | string | process | From 5ca7d75c0d0f39e7fe25af13152f043ddb7f8aac Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Tue, 24 Jul 2018 11:26:14 +0800 Subject: [PATCH 14/30] fix doc --- components/steps/index.en-US.md | 2 +- components/steps/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/steps/index.en-US.md b/components/steps/index.en-US.md index c5475a7fb8..00823e19a8 100644 --- a/components/steps/index.en-US.md +++ b/components/steps/index.en-US.md @@ -30,7 +30,7 @@ The whole of the step bar. | current | to set the current step, counting from 0. You can overwrite this state by using `status` of `Step` | number | 0 | | direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | string | `horizontal` | | labelPlacement | support vertial title and description | string | `horizontal` | -| progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode. labelPlacement will be `vertical` | false | +| progressDot | Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be `vertical` | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false | | size | to specify the size of the step bar, `default` and `small` are currently supported | string | `default` | | status | to specify the status of current step, can be set to one of the following values: `wait` `process` `finish` `error` | string | `process` | diff --git a/components/steps/index.zh-CN.md b/components/steps/index.zh-CN.md index c7aee3aad9..56fc397e91 100644 --- a/components/steps/index.zh-CN.md +++ b/components/steps/index.zh-CN.md @@ -31,7 +31,7 @@ title: Steps | current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 `status` 属性覆盖状态 | number | 0 | | direction | 指定步骤条方向。目前支持水平(`horizontal`)和竖直(`vertical`)两种方向 | string | horizontal | | labelPlacement | 指定标签放置位置,默认水平放图标右侧,可选`vertical`放图标下方 | string | `horizontal` | -| progressDot | 点状步骤条,可以设置为一个 function | Boolean or (iconDot, {index, status, title, description}) => ReactNode。labelPlacement 讲强制为`vertical` | false | +| progressDot | 点状步骤条,可以设置为一个 function,labelPlacement 将强制为`vertical` | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false | | size | 指定大小,目前支持普通(`default`)和迷你(`small`) | string | default | | status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | string | process | From 68ce09be4ecc498ad5ecc17867f25ec470887efc Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Fri, 27 Jul 2018 13:39:45 +0200 Subject: [PATCH 15/30] =?UTF-8?q?=F0=9F=90=9B=20fix=20icons=20page=20100%?= =?UTF-8?q?=20cpu=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/theme/template/IconSet/CopyableIcon.jsx | 46 +++++++------------- site/theme/template/IconSet/index.jsx | 21 ++++++++- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/site/theme/template/IconSet/CopyableIcon.jsx b/site/theme/template/IconSet/CopyableIcon.jsx index f1183e5c96..c7cd740927 100644 --- a/site/theme/template/IconSet/CopyableIcon.jsx +++ b/site/theme/template/IconSet/CopyableIcon.jsx @@ -2,34 +2,20 @@ import React from 'react'; import CopyToClipboard from 'react-copy-to-clipboard'; import { Icon, Badge } from 'antd'; -export default class CopyableIcon extends React.Component { - state = { - justCopied: false, - }; +const CopyableIcon = ({ type, isNew, justCopied, onCopied }) => ( + `} + onCopy={() => onCopied(type)} + > +
  • + + + + {type} + + +
  • +
    +); - onCopied = () => { - this.setState({ justCopied: true }, () => { - setTimeout(() => { - this.setState({ justCopied: false }); - }, 2000); - }); - } - - render() { - const { type, isNew } = this.props; - const { justCopied } = this.state; - const text = ``; - return ( - -
  • - - - - {type} - - -
  • -
    - ); - } -} +export default CopyableIcon; diff --git a/site/theme/template/IconSet/index.jsx b/site/theme/template/IconSet/index.jsx index 07be7b0cdf..ceb3065c48 100644 --- a/site/theme/template/IconSet/index.jsx +++ b/site/theme/template/IconSet/index.jsx @@ -7,6 +7,18 @@ export default class IconSet extends React.Component { icons: [], } + state = { + justCopied: null, + }; + + onCopied = (type) => { + this.setState({ justCopied: type }, () => { + setTimeout(() => { + this.setState({ justCopied: null }); + }, 2000); + }); + } + icons = { direction: ['step-backward', 'step-forward', 'fast-backward', 'fast-forward', 'shrink', 'arrows-alt', 'down', 'up', 'left', 'right', 'caret-up', 'caret-down', 'caret-left', 'caret-right', 'up-circle', 'down-circle', 'left-circle', 'right-circle', 'up-circle-o', 'down-circle-o', 'right-circle-o', 'left-circle-o', 'double-right', 'double-left', 'verticle-left', 'verticle-right', 'forward', 'backward', 'rollback', 'enter', 'retweet', 'swap', 'swap-left', 'swap-right', 'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'play-circle', 'play-circle-o', 'up-square', 'down-square', 'left-square', 'right-square', 'up-square-o', 'down-square-o', 'left-square-o', 'right-square-o', 'login', 'logout', 'menu-fold', 'menu-unfold'], suggestion: ['question', 'question-circle-o', 'question-circle', 'plus', 'plus-circle-o', 'plus-circle', 'pause', 'pause-circle-o', 'pause-circle', 'minus', 'minus-circle-o', 'minus-circle', 'plus-square', 'plus-square-o', 'minus-square', 'minus-square-o', 'info', 'info-circle-o', 'info-circle', 'exclamation', 'exclamation-circle-o', 'exclamation-circle', 'close', 'close-circle', 'close-circle-o', 'close-square', 'close-square-o', 'check', 'check-circle', 'check-circle-o', 'check-square', 'check-square-o', 'clock-circle-o', 'clock-circle', 'warning'], @@ -24,6 +36,7 @@ export default class IconSet extends React.Component { ]; render() { + const { justCopied } = this.state; const { className, catigory } = this.props; const listClassName = classNames({ 'anticons-list': true, @@ -33,7 +46,13 @@ export default class IconSet extends React.Component { return (
      {this.icons[catigory].map(type => ( - = 0} /> + = 0} + justCopied={justCopied} + onCopied={this.onCopied} + /> ))}
    ); From 1bbf59bb1d3dbe86b08e4f3b9296b2051c45e00f Mon Sep 17 00:00:00 2001 From: Eric Turriff Date: Fri, 27 Jul 2018 22:00:51 -0400 Subject: [PATCH 16/30] fixed typo in `InputNumber` docs --- components/input-number/index.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/input-number/index.en-US.md b/components/input-number/index.en-US.md index 2982a00a69..0f0bf0d048 100644 --- a/components/input-number/index.en-US.md +++ b/components/input-number/index.en-US.md @@ -18,7 +18,7 @@ When a numeric value needs to be provided. | defaultValue | initial value | number | | | disabled | disable the input | boolean | false | | formatter | Specifies the format of the value presented | function(value: number \| string): string | - | -| max | max vale | number | Infinity | +| max | max value | number | Infinity | | min | min value | number | -Infinity | | parser | Specifies the value extracted from formatter | function( string): number | - | | precision | precision of input value | number | - | From c6518b92aa163f1cb490c930001c10ae333e86e1 Mon Sep 17 00:00:00 2001 From: qliu <1403927509@qq.com> Date: Sat, 28 Jul 2018 13:29:39 +0800 Subject: [PATCH 17/30] =?UTF-8?q?fix:=20get=20label=20should=20use=20child?= =?UTF-8?q?renKeyName=20for=20arrayTreeFilter=20when=20us=E2=80=A6=20(#113?= =?UTF-8?q?11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: get label should use childrenKeyName for arrayTreeFilter when use customer fieldNames otherwise It can not get correct label array * feat: add fieldNames test case in Cascader * fix: cli fail * fix: cil fail again --- components/cascader/__tests__/index.test.js | 36 +++++++++++++++++++++ components/cascader/index.tsx | 1 + 2 files changed, 37 insertions(+) diff --git a/components/cascader/__tests__/index.test.js b/components/cascader/__tests__/index.test.js index 4d97c0c576..08014c3237 100644 --- a/components/cascader/__tests__/index.test.js +++ b/components/cascader/__tests__/index.test.js @@ -190,4 +190,40 @@ describe('Cascader', () => { wrapper.setProps({ options: [options[0]] }); expect(wrapper.find('.ant-cascader-menu-item').length).toBe(1); }); + + it('can use fieldNames', () => { + const customerOptions = [{ + code: 'zhejiang', + name: 'Zhejiang', + items: [{ + code: 'hangzhou', + name: 'Hangzhou', + items: [{ + code: 'xihu', + name: 'West Lake', + }], + }], + }, { + code: 'jiangsu', + name: 'Jiangsu', + items: [{ + code: 'nanjing', + name: 'Nanjing', + items: [{ + code: 'zhonghuamen', + name: 'Zhong Hua Men', + }], + }], + }]; + const wrapper = mount(); + wrapper.instance().handleChange(['zhejiang', 'hangzhou', 'xihu'], customerOptions); + expect(wrapper.find('.ant-cascader-picker-label').text().split('/').length).toBe(3); + }); }); diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index b18528b8a4..e8d794ce6e 100644 --- a/components/cascader/index.tsx +++ b/components/cascader/index.tsx @@ -253,6 +253,7 @@ export default class Cascader extends React.Component o[names.value] === unwrappedValue[level], + { childrenKeyName: names.children }, ); const label = selectedOptions.map(o => o[names.label]); return displayRender(label, selectedOptions); From d1ba62e50b8956b2a94f97c2aa1e9fc45acd3f11 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Sat, 28 Jul 2018 16:27:01 +0800 Subject: [PATCH 18/30] Add 3.7.3 changelog (#11494) --- CHANGELOG.en-US.md | 10 ++++++++++ CHANGELOG.zh-CN.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 881fd1c83c..f19a9986b0 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,16 @@ timeline: true --- +## 3.7.3 + +`2018-07-28` + +- 🐞 Fix issue resulting in title not vertical align with icon when setting `labelPlacement` to `vertical` in Steps. [#11426](https://github.com/ant-design/ant-design/pull/11426) [@yoyo837](https://github.com/yoyo837) +- 🐞 Fix issue resulting in the children field specified in `fieldName` could not be read correctly in Cascader. [#11311](https://github.com/ant-design/ant-design/pull/11311) [@405go](https://github.com/405go) +- TypeScript + - 🐞 Fix type definition of Pagination. [#11474](https://github.com/ant-design/ant-design/pull/11474) [@kagd](https://github.com/kagd) + - 🐞 Fix type definition of Select. [#11189](https://github.com/ant-design/ant-design/pull/11189) [@thisJJ](https://github.com/thisJJ) + ## 3.7.2 `2018-07-25` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 954e7c5515..415a266db3 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,16 @@ timeline: true --- +## 3.7.3 + +`2018-07-28` + +- 🐞 修复 Steps 在 `labelPlacement` 为 `vertical` 时标题与图标不对齐的问题。[#11426](https://github.com/ant-design/ant-design/pull/11426) [@yoyo837](https://github.com/yoyo837) +- 🐞 修复 Cascader 设置 `fieldNames` 时不能正确读取子节点的问题。[#11311](https://github.com/ant-design/ant-design/pull/11311) [@405go](https://github.com/405go) +- TypeScript + - 🐞 修复 Pagination 类型定义。[#11474](https://github.com/ant-design/ant-design/pull/11474) [@kagd](https://github.com/kagd) + - 🐞 修复 Select 类型定义。[#11189](https://github.com/ant-design/ant-design/pull/11189) [@thisJJ](https://github.com/thisJJ) + ## 3.7.2 `2018-07-25` From 855b613ce9cf8f868cb389d461abf826855b04ea Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Sat, 28 Jul 2018 17:36:37 +0800 Subject: [PATCH 19/30] Bump 3.7.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f4c7a646d..79e3e88458 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.7.2", + "version": "3.7.3", "title": "Ant Design", "description": "An enterprise-class UI design language and React-based implementation", "homepage": "http://ant.design/", From 4a906137b8086c67523bd6cda6f0c89d56663787 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Sat, 28 Jul 2018 17:45:21 +0800 Subject: [PATCH 20/30] Add testUrl https://github.com/jsdom/jsdom/issues/2304 --- .jest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.jest.js b/.jest.js index f2b15bb87f..ed2c101e41 100644 --- a/.jest.js +++ b/.jest.js @@ -48,4 +48,5 @@ module.exports = { tsConfigFile: './tsconfig.test.json', } }, + testURL: 'http://localhost', }; From 7d46cabb1790624315351867a4aac332744fec97 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 29 Jul 2018 00:05:44 +0800 Subject: [PATCH 21/30] docs: Add instruction about cascader typo api --- components/cascader/index.en-US.md | 2 +- components/cascader/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cascader/index.en-US.md b/components/cascader/index.en-US.md index 8e91cb6576..1e154b0f8a 100644 --- a/components/cascader/index.en-US.md +++ b/components/cascader/index.en-US.md @@ -28,7 +28,7 @@ Cascade selection box. | disabled | whether disabled select | boolean | false | | displayRender | render function of displaying selected options | `(label, selectedOptions) => ReactNode` | `label => label.join(' / ')` | | expandTrigger | expand current item when click or hover, one of 'click' 'hover' | string | 'click' | -| fieldNames | custom field name for label and value and children | object | `{ label: 'label', value: 'value', children: 'children' }` | +| fieldNames | custom field name for label and value and children (before 3.7.0 it calls `filedNames` which is typo)) | object | `{ label: 'label', value: 'value', children: 'children' }` | | getPopupContainer | Parent Node which the selector should be rendered to. Default to `body`. When position issues happen, try to modify it into scrollable content and position it relative.[example](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | Function(triggerNode) | () => document.body | | loadData | To load option lazily, and it cannot work with `showSearch` | `(selectedOptions) => void` | - | | notFoundContent | Specify content to show when no result matches. | string | 'Not Found' | diff --git a/components/cascader/index.zh-CN.md b/components/cascader/index.zh-CN.md index e1e72fd3c5..4fb77fa9fe 100644 --- a/components/cascader/index.zh-CN.md +++ b/components/cascader/index.zh-CN.md @@ -29,7 +29,7 @@ subtitle: 级联选择 | disabled | 禁用 | boolean | false | | displayRender | 选择后展示的渲染函数 | `(label, selectedOptions) => ReactNode` | `label => label.join(' / ')` | | expandTrigger | 次级菜单的展开方式,可选 'click' 和 'hover' | string | 'click' | -| fieldNames | 自定义 options 中 label name children 的字段 | object | `{ label: 'label', value: 'value', children: 'children' }` | +| fieldNames | 自定义 options 中 label name children 的字段(注意,3.7.0 之前的版本为 `filedNames`) | object | `{ label: 'label', value: 'value', children: 'children' }` | | getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | Function(triggerNode) | () => document.body | | loadData | 用于动态加载选项,无法与 `showSearch` 一起使用 | `(selectedOptions) => void` | - | | notFoundContent | 当下拉列表为空时显示的内容 | string | 'Not Found' | From 6cecc9a0ea68acb25a82ab4d1862de59166ef7ee Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Sat, 28 Jul 2018 17:50:47 +0200 Subject: [PATCH 22/30] =?UTF-8?q?=F0=9F=92=AC=20fixing=20upload=20componen?= =?UTF-8?q?t=20typos=20and=20capitalization=20consistency=20for=20en-US?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/upload/demo/fileList.md | 8 ++++---- components/upload/demo/picture-style.md | 5 ++--- components/upload/index.en-US.md | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/components/upload/demo/fileList.md b/components/upload/demo/fileList.md index 6dee6259dd..b3c1c96732 100644 --- a/components/upload/demo/fileList.md +++ b/components/upload/demo/fileList.md @@ -42,10 +42,10 @@ class MyUpload extends React.Component { let fileList = info.fileList; // 1. Limit the number of uploaded files - // Only to show two recent uploaded files, and old ones will be replaced by the new + // Only to show two recent uploaded files, and old ones will be replaced by the new fileList = fileList.slice(-2); - // 2. read from response and show file link + // 2. Read from response and show file link fileList = fileList.map((file) => { if (file.response) { // Component will show file.url as link @@ -54,7 +54,7 @@ class MyUpload extends React.Component { return file; }); - // 3. filter successfully uploaded files according to response from server + // 3. Filter successfully uploaded files according to response from server fileList = fileList.filter((file) => { if (file.response) { return file.response.status === 'success'; @@ -74,7 +74,7 @@ class MyUpload extends React.Component { return ( ); diff --git a/components/upload/demo/picture-style.md b/components/upload/demo/picture-style.md index ac28dda202..a83576c904 100644 --- a/components/upload/demo/picture-style.md +++ b/components/upload/demo/picture-style.md @@ -13,7 +13,6 @@ title: If uploaded file is a picture, the thumbnail can be shown. `IE8/9` do not support local thumbnail show. Please use `thumbUrl` instead. - ````jsx import { Upload, Button, Icon } from 'antd'; @@ -48,14 +47,14 @@ ReactDOM.render(


    , diff --git a/components/upload/index.en-US.md b/components/upload/index.en-US.md index 0f6b41b91f..51a50ea164 100644 --- a/components/upload/index.en-US.md +++ b/components/upload/index.en-US.md @@ -42,7 +42,7 @@ Uploading is the process of publishing information (web pages, text, pictures, v ### onChange -> The function will be called when uploading is in progress, completed or failed +> The function will be called when uploading is in progress, completed or failed When uploading state change, it returns: From 186496d840f80523d9559906e2dca284cf61be68 Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Sat, 28 Jul 2018 18:55:37 +0200 Subject: [PATCH 23/30] =?UTF-8?q?=F0=9F=92=AC=20fix=20tree=20component=20t?= =?UTF-8?q?ypos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tree-select/demo/treeData.md | 1 - components/tree/index.en-US.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/tree-select/demo/treeData.md b/components/tree-select/demo/treeData.md index 1dfb48b107..3a4ee0b087 100644 --- a/components/tree-select/demo/treeData.md +++ b/components/tree-select/demo/treeData.md @@ -13,7 +13,6 @@ title: The tree structure can be populated using `treeData` property. This is a quick and easy way to provide the tree content. - ````jsx import { TreeSelect } from 'antd'; diff --git a/components/tree/index.en-US.md b/components/tree/index.en-US.md index dd09675fbb..6d40dcc7ed 100644 --- a/components/tree/index.en-US.md +++ b/components/tree/index.en-US.md @@ -6,7 +6,7 @@ title: Tree ## When To Use -Almost anything can be represented in a tree structure. Examples include directories, organization hierarchies, biological classifications, countries, etc. The `Tree` component is a way of representing the hierarchical relationship between these things. You can also expand, collapse, and select a treeNode within a `Tree`. +Almost anything can be represented in a tree structure. Examples include directories, organization hierarchies, biological classifications, countries, etc. The `Tree` component is a way of representing the hierarchical relationship between these things. You can also expand, collapse, and select a treeNode within a `Tree`. ## API From da92bfeba299a248fc378b70926c7222e6d07d52 Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Sat, 28 Jul 2018 18:56:14 +0200 Subject: [PATCH 24/30] =?UTF-8?q?=F0=9F=92=AC=20fix=20tabs=20component=20b?= =?UTF-8?q?lank=20spaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tabs/demo/card.md | 1 - components/tabs/demo/custom-add-trigger.md | 1 - components/tabs/demo/extra.md | 1 - components/tabs/demo/icon.md | 1 - 4 files changed, 4 deletions(-) diff --git a/components/tabs/demo/card.md b/components/tabs/demo/card.md index 51ce1676d1..78d8a2a000 100644 --- a/components/tabs/demo/card.md +++ b/components/tabs/demo/card.md @@ -13,7 +13,6 @@ title: Another type Tabs, which doesn't support vertical mode. - ````jsx import { Tabs } from 'antd'; diff --git a/components/tabs/demo/custom-add-trigger.md b/components/tabs/demo/custom-add-trigger.md index e9313b0440..920455ba66 100644 --- a/components/tabs/demo/custom-add-trigger.md +++ b/components/tabs/demo/custom-add-trigger.md @@ -12,7 +12,6 @@ title: Hide default plus icon, and bind event for customized trigger. - ````jsx import { Tabs, Button } from 'antd'; diff --git a/components/tabs/demo/extra.md b/components/tabs/demo/extra.md index 79cce14212..9241831f03 100644 --- a/components/tabs/demo/extra.md +++ b/components/tabs/demo/extra.md @@ -13,7 +13,6 @@ title: You can add extra actions to the right of Tabs. - ````jsx import { Tabs, Button } from 'antd'; diff --git a/components/tabs/demo/icon.md b/components/tabs/demo/icon.md index 685597ec33..896c524c40 100644 --- a/components/tabs/demo/icon.md +++ b/components/tabs/demo/icon.md @@ -13,7 +13,6 @@ title: The Tab with Icon. - ````jsx import { Tabs, Icon } from 'antd'; From 8ee70e84b6d8b31e46c2ca9cd2dc2f1212c2d03a Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Sat, 28 Jul 2018 18:56:53 +0200 Subject: [PATCH 25/30] =?UTF-8?q?=F0=9F=92=AC=20update=20layout=20copyrigh?= =?UTF-8?q?ts=20year=20and=20fix=20typos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/__tests__/__snapshots__/demo.test.js.snap | 12 ++++++------ components/layout/demo/fixed-sider.md | 2 +- components/layout/demo/fixed.md | 4 ++-- components/layout/demo/responsive.md | 2 +- components/layout/demo/side.md | 4 ++-- components/layout/demo/top-side.md | 4 ++-- components/layout/demo/top.md | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/components/layout/__tests__/__snapshots__/demo.test.js.snap b/components/layout/__tests__/__snapshots__/demo.test.js.snap index 745a9cdfe5..6798c3612e 100644 --- a/components/layout/__tests__/__snapshots__/demo.test.js.snap +++ b/components/layout/__tests__/__snapshots__/demo.test.js.snap @@ -292,7 +292,7 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = ` class="ant-layout-footer" style="text-align:center" > - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED `; @@ -546,7 +546,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` class="ant-layout-footer" style="text-align:center" > - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED @@ -650,7 +650,7 @@ exports[`renders ./components/layout/demo/responsive.md correctly 1`] = ` class="ant-layout-footer" style="text-align:center" > - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED @@ -820,7 +820,7 @@ exports[`renders ./components/layout/demo/side.md correctly 1`] = ` class="ant-layout-footer" style="text-align:center" > - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED @@ -916,7 +916,7 @@ exports[`renders ./components/layout/demo/top.md correctly 1`] = ` class="ant-layout-footer" style="text-align:center" > - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED `; @@ -1132,7 +1132,7 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = ` class="ant-layout-footer" style="text-align:center" > - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED `; diff --git a/components/layout/demo/fixed-sider.md b/components/layout/demo/fixed-sider.md index 187f0ffbb8..8a7520a090 100644 --- a/components/layout/demo/fixed-sider.md +++ b/components/layout/demo/fixed-sider.md @@ -78,7 +78,7 @@ ReactDOM.render(
    - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED
    , diff --git a/components/layout/demo/fixed.md b/components/layout/demo/fixed.md index 45b78be8e7..cb25026869 100644 --- a/components/layout/demo/fixed.md +++ b/components/layout/demo/fixed.md @@ -43,7 +43,7 @@ ReactDOM.render(
    Content
    - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED
    , mountNode); @@ -53,7 +53,7 @@ ReactDOM.render( #components-layout-demo-fixed .logo { width: 120px; height: 31px; - background: rgba(255,255,255,.2); + background: rgba(255,255,255,.2); margin: 16px 24px 16px 0; float: left; } diff --git a/components/layout/demo/responsive.md b/components/layout/demo/responsive.md index 43b930dbe7..3e25e0470c 100644 --- a/components/layout/demo/responsive.md +++ b/components/layout/demo/responsive.md @@ -58,7 +58,7 @@ ReactDOM.render(
    - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED
    , diff --git a/components/layout/demo/side.md b/components/layout/demo/side.md index 1c35f6a8d8..bfd165b156 100644 --- a/components/layout/demo/side.md +++ b/components/layout/demo/side.md @@ -18,7 +18,7 @@ Two-columns layout. The sider menu can be collapsed when horizontal space is lim Generally, the mainnav is placed on the left side of the page, and the secondary menu is placed on the top of the working area. Contents will adapt the layout to the viewing area to improve the horizontal space usage, while the layout of the whole page is not stable. -The level of the aisde navigation is scalable. The first, second, and third level navigations could be present more fluently and relevantly, and aside navigation can be fixed, allowing the user to quickly switch and spot the current position, improving the user experience. However, this navigation occupies some horizontal space of the contents +The level of the aside navigation is scalable. The first, second, and third level navigations could be present more fluently and relevantly, and aside navigation can be fixed, allowing the user to quickly switch and spot the current position, improving the user experience. However, this navigation occupies some horizontal space of the contents ````jsx import { Layout, Menu, Breadcrumb, Icon } from 'antd'; @@ -87,7 +87,7 @@ class SiderDemo extends React.Component {
    - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED
    diff --git a/components/layout/demo/top-side.md b/components/layout/demo/top-side.md index 38e69a58b3..7e5a652205 100644 --- a/components/layout/demo/top-side.md +++ b/components/layout/demo/top-side.md @@ -74,7 +74,7 @@ ReactDOM.render(
    - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED
    , mountNode); @@ -84,7 +84,7 @@ ReactDOM.render( #components-layout-demo-top-side .logo { width: 120px; height: 31px; - background: rgba(255,255,255,.2); + background: rgba(255,255,255,.2); margin: 16px 28px 16px 0; float: left; } diff --git a/components/layout/demo/top.md b/components/layout/demo/top.md index 14c3ee89e8..728a35ebc4 100644 --- a/components/layout/demo/top.md +++ b/components/layout/demo/top.md @@ -49,7 +49,7 @@ ReactDOM.render(
    Content
    - Ant Design ©2016 Created by Ant UED + Ant Design ©2018 Created by Ant UED
    , mountNode); @@ -59,7 +59,7 @@ ReactDOM.render( #components-layout-demo-top .logo { width: 120px; height: 31px; - background: rgba(255,255,255,.2); + background: rgba(255,255,255,.2); margin: 16px 24px 16px 0; float: left; } From d0ca9ae05e58042070a9c0558a8aaf2a0202532b Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Sat, 28 Jul 2018 18:57:32 +0200 Subject: [PATCH 26/30] =?UTF-8?q?=F0=9F=92=AC=20input=20component=20blank?= =?UTF-8?q?=20spaces=20remove?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/input/demo/autosize-textarea.md | 1 - components/input/demo/size.md | 2 -- 2 files changed, 3 deletions(-) diff --git a/components/input/demo/autosize-textarea.md b/components/input/demo/autosize-textarea.md index a61544c6c1..009ddf83ef 100644 --- a/components/input/demo/autosize-textarea.md +++ b/components/input/demo/autosize-textarea.md @@ -14,7 +14,6 @@ title: `autosize` prop for a `textarea` type of `Input` makes the height to automatically adjust based on the content. An options object can be provided to `autosize` to specify the minimum and maximum number of lines the textarea will automatically adjust. - ````jsx import { Input } from 'antd'; diff --git a/components/input/demo/size.md b/components/input/demo/size.md index 3787810d50..77d6ef2ed0 100644 --- a/components/input/demo/size.md +++ b/components/input/demo/size.md @@ -9,12 +9,10 @@ title: 我们为 `` 输入框定义了三种尺寸(大、默认、小),高度分别为 `40px`、`32px` 和 `24px`。 - ## en-US There are three sizes of an Input box: `large` (40px)、`default` (32px) and `small` (24px). - ````jsx import { Input } from 'antd'; From 86398d910a2a535a58c0d410255955059a6c529c Mon Sep 17 00:00:00 2001 From: Ilan Hasanov Date: Sat, 28 Jul 2018 18:58:10 +0200 Subject: [PATCH 27/30] =?UTF-8?q?=F0=9F=92=AC=20misc=20typos=20and=20blank?= =?UTF-8?q?=20spaces=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/date-picker/demo/size.md | 1 - components/mention/demo/controlled.md | 2 +- components/modal/demo/position.md | 2 +- components/popconfirm/demo/placement.md | 4 ++-- components/progress/demo/format.md | 2 +- components/select/demo/coordinate.md | 1 - components/table/demo/ajax.md | 2 +- components/time-picker/demo/disabled.md | 1 - 8 files changed, 6 insertions(+), 9 deletions(-) diff --git a/components/date-picker/demo/size.md b/components/date-picker/demo/size.md index 2d7f675620..fea5156c8c 100644 --- a/components/date-picker/demo/size.md +++ b/components/date-picker/demo/size.md @@ -13,7 +13,6 @@ title: The input box comes in three sizes. `default` will be used if `size` is omitted. - ````jsx import { DatePicker, Radio } from 'antd'; diff --git a/components/mention/demo/controlled.md b/components/mention/demo/controlled.md index c71240c919..a1f3830fe5 100644 --- a/components/mention/demo/controlled.md +++ b/components/mention/demo/controlled.md @@ -33,7 +33,7 @@ class App extends React.Component { e.preventDefault(); this.props.form.validateFields((errors, values) => { if (errors) { - console.log('Errors in form!!!'); + console.log('Errors in the form!!!'); return; } console.log('Submit!!!'); diff --git a/components/modal/demo/position.md b/components/modal/demo/position.md index b80e9305d2..6f1af499ec 100644 --- a/components/modal/demo/position.md +++ b/components/modal/demo/position.md @@ -11,7 +11,7 @@ title: ## en-US -After release `1.0`, Modal's `align` prop was removed. You can use `style.top` or other styles to +After release `1.0`, Modal's `align` prop was removed. You can use `style.top` or other styles to set position of modal dialog. ````jsx diff --git a/components/popconfirm/demo/placement.md b/components/popconfirm/demo/placement.md index 443917f5cc..8af84bc6b2 100755 --- a/components/popconfirm/demo/placement.md +++ b/components/popconfirm/demo/placement.md @@ -16,10 +16,10 @@ There are 12 `placement` options available. Use `arrowPointAtCenter` if you want ````jsx import { Popconfirm, message, Button } from 'antd'; -const text = 'Are you sure delete this task?'; +const text = 'Are you sure to delete this task?'; function confirm() { - message.info('Click on Yes.'); + message.info('Clicked on Yes.'); } ReactDOM.render( diff --git a/components/progress/demo/format.md b/components/progress/demo/format.md index ebbbcd0926..1c3df31ed8 100644 --- a/components/progress/demo/format.md +++ b/components/progress/demo/format.md @@ -11,7 +11,7 @@ title: ## en-US -You can custom text format by setting `format`. +You can set a custom text by setting the `format` prop. ````jsx import { Progress } from 'antd'; diff --git a/components/select/demo/coordinate.md b/components/select/demo/coordinate.md index e11dbb5f91..2e69de5d1b 100644 --- a/components/select/demo/coordinate.md +++ b/components/select/demo/coordinate.md @@ -17,7 +17,6 @@ Coordinating the selection of provinces and cities is a common use case and demo Using the [Cascader](/components/cascader) component is strongly recommended instead as it is more flexible and capable. - ````jsx import { Select } from 'antd'; diff --git a/components/table/demo/ajax.md b/components/table/demo/ajax.md index 354166e3ac..e14d73a03b 100644 --- a/components/table/demo/ajax.md +++ b/components/table/demo/ajax.md @@ -15,7 +15,7 @@ title: ## en-US -This example shows how to fetch and present data from remote server, and how to implement filtering and sorting in server side by sending related parameters to server. +This example shows how to fetch and present data from a remote server, and how to implement filtering and sorting in server side by sending related parameters to server. **Note, this example use [Mock API](https://randomuser.me) that you can look up in Network Console.** diff --git a/components/time-picker/demo/disabled.md b/components/time-picker/demo/disabled.md index 4f765f62c8..4879834c4f 100644 --- a/components/time-picker/demo/disabled.md +++ b/components/time-picker/demo/disabled.md @@ -13,7 +13,6 @@ title: A disabled state of the `TimePicker`. - ````jsx import { TimePicker } from 'antd'; import moment from 'moment'; From e75bd0aa5b503e8c6037a9538f7ef44328bfaa60 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 29 Jul 2018 14:54:18 +0800 Subject: [PATCH 28/30] upgrade devDeps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 79e3e88458..889013d1b6 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "eslint-config-airbnb": "^17.0.0", "eslint-plugin-babel": "^5.0.0", "eslint-plugin-import": "^2.2.0", - "eslint-plugin-jsx-a11y": "6.0.2", + "eslint-plugin-jsx-a11y": "6.1.1", "eslint-plugin-markdown": "~1.0.0-beta.4", "eslint-plugin-react": "^7.10.0", "eslint-tinker": "^0.5.0", @@ -134,7 +134,7 @@ "immutability-helper": "^2.5.0", "intersection-observer": "^0.5.0", "jest": "^23.2.0", - "jsdom": "~11.10.0", + "jsdom": "^11.12.0", "jsonml.js": "^0.1.0", "lint-staged": "^7.0.0", "lz-string": "^1.4.4", From af4ed3988a6b1638cecc7a1c02e538101015d514 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 29 Jul 2018 15:02:34 +0800 Subject: [PATCH 29/30] chore DatePicker and TimePicker font style --- components/date-picker/style/Picker.less | 1 + components/time-picker/style/index.less | 1 + 2 files changed, 2 insertions(+) diff --git a/components/date-picker/style/Picker.less b/components/date-picker/style/Picker.less index 9640c3e37e..5f91ce48ed 100644 --- a/components/date-picker/style/Picker.less +++ b/components/date-picker/style/Picker.less @@ -2,6 +2,7 @@ .@{calendar-prefix-cls}-picker-container { .reset-component; + font-family: @font-family-no-number; position: absolute; z-index: @zindex-picker; diff --git a/components/time-picker/style/index.less b/components/time-picker/style/index.less index 0d7f8c591c..bbb26dfa93 100644 --- a/components/time-picker/style/index.less +++ b/components/time-picker/style/index.less @@ -7,6 +7,7 @@ .@{timepicker-prefix-cls}-panel { .reset-component; + font-family: @font-family-no-number; z-index: @zindex-picker; position: absolute; From af03ae67f9d88225dc4eea9d6b04b3127d7104cd Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 29 Jul 2018 15:03:35 +0800 Subject: [PATCH 30/30] Fix TimePanel jump issue of hovering, close #11460 --- components/date-picker/style/TimePicker.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/date-picker/style/TimePicker.less b/components/date-picker/style/TimePicker.less index 42d381b7f5..25e080cdcd 100644 --- a/components/date-picker/style/TimePicker.less +++ b/components/date-picker/style/TimePicker.less @@ -77,7 +77,7 @@ } li { - text-align: center; + padding-left: 32px; list-style: none; box-sizing: content-box; margin: 0;