diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 94d1e05ff6..3aa531edca 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,26 +15,6 @@ timeline: true --- -## 3.1.4 - -`2018-01-21` - -- 🐞 Fix ButtonGroup z-index issue. [#9014](https://github.com/ant-design/ant-design/issues/9014) -- 🐞 Fix Dropdown.Button can not be fully disabled. [#8991](https://github.com/ant-design/ant-design/issues/8991) [@sallen450](https://github.com/sallen450) -- 🐞 Fix Layout error responsive docs. [#8995](https://github.com/ant-design/ant-design/pull/8995) [@ReedSun](https://github.com/ReedSun) -- 🐞 Fix List `grid` do not support xxl. [#9019](https://github.com/ant-design/ant-design/issues/9019) -- 🐞 Fix RangePicker can not cancel selected start date when the panel is closed. [#8839](https://github.com/ant-design/ant-design/issues/8839) -- 🐞 Fix Tabs error margin. [commit/200d6c](https://github.com/ant-design/ant-design/commit/200d6cb11aba12a488510f957353bbd5bd1dcd1b) -- 🐞 Fix WeekPicker shows error weeks. [#9021](https://github.com/ant-design/ant-design/issues/9021) -- 🐞 Fix some TypeScript type definitions. - - Add `subMenuCloseDelay` and `subMenuOpenDelay` for Menu. [#8976](https://github.com/ant-design/ant-design/issues/8976) [@Rohanhacker](https://github.com/Rohanhacker) - - Refactor DatePicker types. [commit/0bb531](https://github.com/ant-design/ant-design/commit/0bb531aca6cb2045d5323196a599c925537a4eb0) - - Fix Input `maxLength` type definitions. [#9046](https://github.com/ant-design/ant-design/pull/9046) [@Riokai](https://github.com/Riokai) -- 🌟 Add some new less variables. - - About Checkbox and Radio: [#9003](https://github.com/ant-design/ant-design/pull/9003) [@mrgeorgegray](https://github.com/mrgeorgegray) - - About Breadcrumb: [#9022](https://github.com/ant-design/ant-design/pull/9022) [@mrgeorgegray](https://github.com/mrgeorgegray) -- 🌟 Add aliyun icon. - ## 3.1.3 `2018-01-14` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 67e72d0da1..6146ef1603 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,26 +15,6 @@ timeline: true --- -## 3.1.4 - -`2018-01-21` - -- 🐞 修复 ButtonGroup 错误 z-index 导致的样式问题。[#9014](https://github.com/ant-design/ant-design/issues/9014) -- 🐞 修复 Dropdown.Button 不能被完全禁用的问题。[#8991](https://github.com/ant-design/ant-design/issues/8991) [@sallen450](https://github.com/sallen450) -- 🐞 修复 Layout 错误的响应式相关文档。[#8995](https://github.com/ant-design/ant-design/pull/8995) [@ReedSun](https://github.com/ReedSun) -- 🐞 修复 List `grid` 不支持 xxl 配置的问题。[#9019](https://github.com/ant-design/ant-design/issues/9019) -- 🐞 修复 RangePicker 关闭选择面板之后无法清空已选开始时间的问题。[#8839](https://github.com/ant-design/ant-design/issues/8839) -- 🐞 修复 Tabs 错误外边距导致的样式问题。[commit/200d6c](https://github.com/ant-design/ant-design/commit/200d6cb11aba12a488510f957353bbd5bd1dcd1b) -- 🐞 修复 WeekPicker 显示错误周数的问题。[#9021](https://github.com/ant-design/ant-design/issues/9021) -- 🐞 修复 TypeScript 定义 - - 补充 Menu 缺失的 `subMenuCloseDelay` 和 `subMenuOpenDelay`。[#8976](https://github.com/ant-design/ant-design/issues/8976) [@Rohanhacker](https://github.com/Rohanhacker) - - 重构了 DatePicker 相关 type 定义。[commit/0bb531](https://github.com/ant-design/ant-design/commit/0bb531aca6cb2045d5323196a599c925537a4eb0) - - 修复了 Input `maxLength` type 定义。[#9046](https://github.com/ant-design/ant-design/pull/9046) [@Riokai](https://github.com/Riokai) -- 🌟 新增 less 变量 - - Checkbox 和 Radio 相关:[#9003](https://github.com/ant-design/ant-design/pull/9003) [@mrgeorgegray](https://github.com/mrgeorgegray) - - Breadcrumb 相关:[#9022](https://github.com/ant-design/ant-design/pull/9022) [@mrgeorgegray](https://github.com/mrgeorgegray) -- 🌟 新增 aliyun 图标。 - ## 3.1.3 `2018-01-14` diff --git a/components/breadcrumb/style/index.less b/components/breadcrumb/style/index.less index 2d73ab20c7..1b56a34724 100644 --- a/components/breadcrumb/style/index.less +++ b/components/breadcrumb/style/index.less @@ -5,23 +5,22 @@ .@{breadcrumb-prefix-cls} { .reset-component; - color: @breadcrumb-base-color; - font-size: @breadcrumb-font-size; + color: @text-color-secondary; .@{iconfont-css-prefix} { - font-size: @breadcrumb-icon-font-size; + font-size: @font-size-sm; } a { - color: @breadcrumb-link-color; + color: @text-color-secondary; transition: color .3s; &:hover { - color: @breadcrumb-link-color-hover; + color: @primary-5; } } & > span:last-child { - color: @breadcrumb-last-item-color; + color: @text-color; } & > span:last-child &-separator { @@ -29,8 +28,8 @@ } &-separator { - margin: @breadcrumb-separator-margin; - color: @breadcrumb-separator-color; + margin: 0 @padding-xs; + color: @text-color-secondary; } &-link { diff --git a/components/date-picker/RangePicker.tsx b/components/date-picker/RangePicker.tsx index 7c58d598c2..15542ecb16 100644 --- a/components/date-picker/RangePicker.tsx +++ b/components/date-picker/RangePicker.tsx @@ -121,10 +121,6 @@ export default class RangePicker extends React.Component this.setState({ open }); } - if (open === false) { - this.clearHoverValue(); - } - const { onOpenChange } = this.props; if (onOpenChange) { onOpenChange(open); diff --git a/components/date-picker/WeekPicker.tsx b/components/date-picker/WeekPicker.tsx index ccec719013..46d7586e39 100644 --- a/components/date-picker/WeekPicker.tsx +++ b/components/date-picker/WeekPicker.tsx @@ -11,7 +11,7 @@ function formatValue(value: moment.Moment | null, format: string): string { export default class WeekPicker extends React.Component { static defaultProps = { - format: 'YYYY-wo', + format: 'YYYY-Wo', allowClear: true, }; diff --git a/components/date-picker/__tests__/RangePicker.test.js b/components/date-picker/__tests__/RangePicker.test.js index ba6d7a66c0..5084ba9659 100644 --- a/components/date-picker/__tests__/RangePicker.test.js +++ b/components/date-picker/__tests__/RangePicker.test.js @@ -2,7 +2,6 @@ import React from 'react'; import { mount, render } from 'enzyme'; import moment from 'moment'; import DatePicker from '../'; -import { setMockDate, resetMockDate } from '../../../tests/utils'; import focusTest from '../../../tests/shared/focusTest'; const { RangePicker } = DatePicker; @@ -113,24 +112,4 @@ describe('RangePicker', () => { expect(() => rangeCalendarWrapper.find('.ant-calendar-cell').at(15).simulate('click').simulate('click')) .not.toThrow(); }); - - it('clear hover value after panel close', () => { - setMockDate(); - jest.useFakeTimers(); - const wrapper = mount( -
- -
- ); - wrapper.find('.ant-calendar-picker-input').simulate('click'); - wrapper.find('.ant-calendar-cell').at(25).simulate('click'); - wrapper.find('.ant-calendar-cell').at(27).simulate('mouseEnter'); - document.dispatchEvent(new MouseEvent('mousedown')); - jest.runAllTimers(); - wrapper.find('.ant-calendar-picker-input').simulate('click'); - expect( - wrapper.find('.ant-calendar-cell').at(23).hasClass('ant-calendar-in-range-cell') - ).toBe(true); - resetMockDate(); - }); }); diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index c81430d88c..a13140e43b 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -90,7 +90,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke | Property | Description | Type | Default | | -------- | ----------- | ---- | ------- | | defaultValue | to set default date | [moment](http://momentjs.com/) | - | -| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-wo" | +| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-Wo" | | value | to set date | [moment](http://momentjs.com/) | - | | onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - | diff --git a/components/date-picker/index.tsx b/components/date-picker/index.tsx index 7c8e6d2b44..020b367358 100755 --- a/components/date-picker/index.tsx +++ b/components/date-picker/index.tsx @@ -14,7 +14,7 @@ const MonthPicker = wrapPicker(createPicker(MonthCalendar), 'YYYY-MM'); Object.assign(DatePicker, { RangePicker: wrapPicker(RangePicker), MonthPicker, - WeekPicker: wrapPicker(WeekPicker, 'YYYY-wo'), + WeekPicker: wrapPicker(WeekPicker, 'YYYY-Wo'), }); export default DatePicker as DatePickerDecorator; diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index 1785ff3d61..bc760d8382 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -90,7 +90,7 @@ subtitle: 日期选择框 | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | defaultValue | 默认日期 | [moment](http://momentjs.com/) | - | -| format | 展示的日期格式,配置参考 [moment.js](http://momentjs.com/) | string | "YYYY-wo" | +| format | 展示的日期格式,配置参考 [moment.js](http://momentjs.com/) | string | "YYYY-Wo" | | value | 日期 | [moment](http://momentjs.com/) | - | | onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: moment, dateString: string) | - | diff --git a/components/grid/col.tsx b/components/grid/col.tsx index 3cb60341d7..7781c24393 100644 --- a/components/grid/col.tsx +++ b/components/grid/col.tsx @@ -25,7 +25,6 @@ export interface ColProps { md?: number | ColSize; lg?: number | ColSize; xl?: number | ColSize; - xxl?: number | ColSize; prefixCls?: string; style?: React.CSSProperties; } @@ -44,7 +43,6 @@ export default class Col extends React.Component { md: objectOrNumber, lg: objectOrNumber, xl: objectOrNumber, - xxl: objectOrNumber, }; render() { diff --git a/components/input/Input.tsx b/components/input/Input.tsx index 4a441872a1..fd9df23a66 100644 --- a/components/input/Input.tsx +++ b/components/input/Input.tsx @@ -28,7 +28,7 @@ export interface InputProps extends AbstractInputProps { id?: number | string; name?: string; size?: 'large' | 'default' | 'small'; - maxLength?: number | string; + maxLength?: number; disabled?: boolean; readOnly?: boolean; addonBefore?: React.ReactNode; @@ -65,10 +65,7 @@ export default class Input extends React.Component { PropTypes.number, ]), size: PropTypes.oneOf(['small', 'default', 'large']), - maxLength: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - ]), + maxLength: PropTypes.string, disabled: PropTypes.bool, value: PropTypes.any, defaultValue: PropTypes.any, diff --git a/components/list/Item.tsx b/components/list/Item.tsx index 4751a84344..0bbb0ba15e 100644 --- a/components/list/Item.tsx +++ b/components/list/Item.tsx @@ -67,7 +67,6 @@ export default class Item extends React.Component { md: PropTypes.oneOf(GridColumns), lg: PropTypes.oneOf(GridColumns), xl: PropTypes.oneOf(GridColumns), - xxl: PropTypes.oneOf(GridColumns), }; static contextTypes = { @@ -132,7 +131,6 @@ export default class Item extends React.Component { md={getGrid(grid, 'md')} lg={getGrid(grid, 'lg')} xl={getGrid(grid, 'xl')} - xxl={getGrid(grid, 'xxl')} >
{extra && extraContent} diff --git a/components/list/__tests__/__snapshots__/demo.test.js.snap b/components/list/__tests__/__snapshots__/demo.test.js.snap index e9f7d6415e..d4cb6f7c1f 100644 --- a/components/list/__tests__/__snapshots__/demo.test.js.snap +++ b/components/list/__tests__/__snapshots__/demo.test.js.snap @@ -446,7 +446,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = ` style="margin-left:-8px;margin-right:-8px" >
( diff --git a/components/list/index.tsx b/components/list/index.tsx index 36e16a5a99..09ca2ecb59 100644 --- a/components/list/index.tsx +++ b/components/list/index.tsx @@ -15,7 +15,7 @@ export { ListItemProps, ListItemMetaProps } from './Item'; export type ColumnCount = 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24; -export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; +export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'; export interface ListGridType { gutter?: number; @@ -25,7 +25,6 @@ export interface ListGridType { md?: ColumnCount; lg?: ColumnCount; xl?: ColumnCount; - xxl?: ColumnCount; } export type ListSize = 'small' | 'default' | 'large'; diff --git a/components/menu/index.tsx b/components/menu/index.tsx index 5e61f902b8..904cfa0032 100644 --- a/components/menu/index.tsx +++ b/components/menu/index.tsx @@ -47,8 +47,6 @@ export interface MenuProps { multiple?: boolean; inlineIndent?: number; inlineCollapsed?: boolean; - subMenuCloseDelay?: number; - subMenuOpenDelay?: number; } export interface MenuState { diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 25f0003148..eb423eeb45 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -403,14 +403,3 @@ // --- @pagination-item-size: 32px; @pagination-item-size-sm: 24px; - -// Breadcrumb -// --- -@breadcrumb-base-color: @text-color-secondary; -@breadcrumb-last-item-color: @text-color; -@breadcrumb-font-size: @font-size-base; -@breadcrumb-icon-font-size: @font-size-sm; -@breadcrumb-link-color: @text-color-secondary; -@breadcrumb-link-color-hover: @primary-5; -@breadcrumb-separator-color: @text-color-secondary; -@breadcrumb-separator-margin: 0 @padding-xs; diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index 7a8b961505..5fdf49d27b 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -77,8 +77,8 @@ const columns = [{ | onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter) | | | onExpand | 点击展开图标时触发 | Function(expanded, record) | | | onExpandedRowsChange | 展开的行变化时触发 | Function(expandedRows) | | -| onHeaderRow | 设置头部行属性 | Function(column, index) | - | -| onRow | 设置行属性 | Function(record, index) | - | +| onHeaderRow | 设置头部列属性 | Function(column, index) | - | +| onRow | 设置列属性 | Function(record, index) | - | ### Column diff --git a/package.json b/package.json index a7b3dc8608..1858b65f81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.1.4", + "version": "3.1.3", "title": "Ant Design", "description": "An enterprise-class UI design language and React-based implementation", "homepage": "http://ant.design/", diff --git a/tests/utils.js b/tests/utils.js deleted file mode 100644 index e730ad95fa..0000000000 --- a/tests/utils.js +++ /dev/null @@ -1,10 +0,0 @@ -import moment from 'moment'; -import MockDate from 'mockdate'; - -export function setMockDate(dateString = '2017-09-18T03:30:07.795Z') { - MockDate.set(moment(dateString).valueOf() + (new Date().getTimezoneOffset() * 60 * 1000)); -} - -export function resetMockDate() { - MockDate.reset(); -}