Revert "Merge branch 'master' into feature-3.2"

This reverts commit b7901e541a, reversing
changes made to 7a7933038c.
This commit is contained in:
Abdulhalim Kara 2018-01-22 14:28:28 +03:00
parent b7901e541a
commit ebf5e4c4f0
20 changed files with 24 additions and 121 deletions

View File

@ -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`

View File

@ -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`

View File

@ -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 {

View File

@ -121,10 +121,6 @@ export default class RangePicker extends React.Component<any, RangePickerState>
this.setState({ open });
}
if (open === false) {
this.clearHoverValue();
}
const { onOpenChange } = this.props;
if (onOpenChange) {
onOpenChange(open);

View File

@ -11,7 +11,7 @@ function formatValue(value: moment.Moment | null, format: string): string {
export default class WeekPicker extends React.Component<any, any> {
static defaultProps = {
format: 'YYYY-wo',
format: 'YYYY-Wo',
allowClear: true,
};

View File

@ -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(
<div>
<RangePicker value={[moment(), moment().add(2, 'day')]} />
</div>
);
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();
});
});

View File

@ -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) | - |

View File

@ -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;

View File

@ -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) | - |

View File

@ -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<ColProps, {}> {
md: objectOrNumber,
lg: objectOrNumber,
xl: objectOrNumber,
xxl: objectOrNumber,
};
render() {

View File

@ -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<InputProps, any> {
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,

View File

@ -67,7 +67,6 @@ export default class Item extends React.Component<ListItemProps, any> {
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<ListItemProps, any> {
md={getGrid(grid, 'md')}
lg={getGrid(grid, 'lg')}
xl={getGrid(grid, 'xl')}
xxl={getGrid(grid, 'xxl')}
>
<div {...others} className={classString}>
{extra && extraContent}

View File

@ -446,7 +446,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = `
style="margin-left:-8px;margin-right:-8px"
>
<div
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4 ant-col-xxl-8"
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4"
>
<div
class="ant-list-item"
@ -483,7 +483,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = `
</div>
</div>
<div
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4 ant-col-xxl-8"
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4"
>
<div
class="ant-list-item"
@ -520,7 +520,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = `
</div>
</div>
<div
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4 ant-col-xxl-8"
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4"
>
<div
class="ant-list-item"
@ -557,7 +557,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = `
</div>
</div>
<div
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4 ant-col-xxl-8"
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4"
>
<div
class="ant-list-item"
@ -594,7 +594,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = `
</div>
</div>
<div
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4 ant-col-xxl-8"
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4"
>
<div
class="ant-list-item"
@ -631,7 +631,7 @@ exports[`renders ./components/list/demo/resposive.md correctly 1`] = `
</div>
</div>
<div
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4 ant-col-xxl-8"
class="ant-col-xs-24 ant-col-sm-12 ant-col-md-6 ant-col-lg-6 ant-col-xl-4"
>
<div
class="ant-list-item"

View File

@ -39,7 +39,7 @@ const data = [
ReactDOM.render(
<List
grid={{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: 3 }}
grid={{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6 }}
dataSource={data}
renderItem={item => (
<List.Item>

View File

@ -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';

View File

@ -47,8 +47,6 @@ export interface MenuProps {
multiple?: boolean;
inlineIndent?: number;
inlineCollapsed?: boolean;
subMenuCloseDelay?: number;
subMenuOpenDelay?: number;
}
export interface MenuState {

View File

@ -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;

View File

@ -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

View File

@ -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/",

View File

@ -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();
}