Skip to content

Commit

Permalink
Merge branch 'master' into feature-2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
nikogu committed Aug 12, 2017
2 parents e633f91 + 258b3d1 commit 7d49cc1
Show file tree
Hide file tree
Showing 48 changed files with 169 additions and 78 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi

---

## 2.12.6

`2017-08-11`

- Fix Collapse arrow position in IE9/10/11. [af9dc73](https://github.com/ant-design/ant-design/commit/af9dc73eef2aac3e68fdfc99f9231153437f5068)
- Fix empty Table scrollBar's position. [#7142](https://github.com/ant-design/ant-design/issues/7142)
- Fix RangePicker Input's style of height. [47c5de2](https://github.com/ant-design/ant-design/commit/47c5de29f370a77fc19a6a8eda8ac57476f312a6)
- Card
- Improve Card.Grid style of collapse border. [807b573](https://github.com/ant-design/ant-design/commit/807b573bff43bc71115afeb086f565561807a32d)
- Fix the `no-animation` type's className. [#7185](https://github.com/ant-design/ant-design/issues/7185)
- Fix Input Safari text align. [#7135](https://github.com/ant-design/ant-design/issues/7135)
- Layout
- Fix stretched layout by content. [500b222](https://github.com/ant-design/ant-design/commit/500b2225567f03397d9faec5f4e60a8f35fc4d28)
- Fix the collapse trigger's position. [f689ede](https://github.com/ant-design/ant-design/commit/f689ede0fa836dd0d99f4e4d96e0c43d0ff19742)
- Upload
- Fix doesn't handle some error scenarios which response is not a string. [#6818](https://github.com/ant-design/ant-design/issues/6818)
- Fix `listType` prop of docs. [#7175](https://github.com/ant-design/ant-design/pull/7175) [@zheeeng](https://github.com/zheeeng)
- Add `onChange` prop of docs. [#7180](https://github.com/ant-design/ant-design/pull/7180) [@hansnow](https://github.com/hansnow)
- Form
- Add `validateFirst` prop of docs. [#6959](https://github.com/ant-design/ant-design/issues/6959)
- Fix `wrappedComponentRef`. [#6545](https://github.com/ant-design/ant-design/issues/6545)
- Add FormCreateOption's generic type. [#7119](https://github.com/ant-design/ant-design/pull/7119) [@djyde](https://github.com/djyde)
- Fix `square` font size to `@form-feedback-icon-size`. [9bcde59](https://github.com/ant-design/ant-design/commit/9bcde590015855a12fdee851cf4e4836d0195cd7)

## 2.12.5

`2017-08-07`

- Fix the `SelectPropTypes not found` issue under es mode. [#7123](https://github.com/ant-design/ant-design/issues/7123)
- Fix Row no wrap issue. [4f73a23](https://github.com/ant-design/ant-design/commit/4f73a23a103733a3c148bb04013493a042f90a8f)
- Fix broken style of InputNumber and RangePicker. [#7117](https://github.com/ant-design/ant-design/issues/7117) [#7126](https://github.com/ant-design/ant-design/issues/7126)

## 2.12.4

`2017-08-06`
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ timeline: true

---

## 2.12.6

`2017-08-11`

- 修复了在 IE9/10/11 下 Collapse 的箭头位置不正确的问题。[af9dc73](https://github.com/ant-design/ant-design/commit/af9dc73eef2aac3e68fdfc99f9231153437f5068)
- 修复了 Table 为空表格时滚动条展示位置不正确的问题。[#7142](https://github.com/ant-design/ant-design/issues/7142)
- 修复了 RangePicker Input 的高度。[47c5de2](https://github.com/ant-design/ant-design/commit/47c5de29f370a77fc19a6a8eda8ac57476f312a6)
- Card
- 优化了 Card.Grid 边框覆盖的样式。[807b573](https://github.com/ant-design/ant-design/commit/807b573bff43bc71115afeb086f565561807a32d)
- 修复了对应 `no-animation` 类型的 className。[#7185](https://github.com/ant-design/ant-design/issues/7185)
- 修复了 Input Safari 下文本对齐的问题。[#7135](https://github.com/ant-design/ant-design/issues/7135)
- Layout
- 修复了组件的拉伸展示问题。[500b222](https://github.com/ant-design/ant-design/commit/500b2225567f03397d9faec5f4e60a8f35fc4d28)
- 修复了折叠箭头的位置。[f689ede](https://github.com/ant-design/ant-design/commit/f689ede0fa836dd0d99f4e4d96e0c43d0ff19742)
- Upload
- 修复了 response 在不是 string 的情况下没有处理错误提示信息的问题。[#6818](https://github.com/ant-design/ant-design/issues/6818)
- 修复了 `listType` 的文档说明。[#7175](https://github.com/ant-design/ant-design/pull/7175) [@zheeeng](https://github.com/zheeeng)
- 调整了文档 `onChange` 的说明。[#7180](https://github.com/ant-design/ant-design/pull/7180) [@hansnow](https://github.com/hansnow)
- Form
- 补充了文档中缺少的 `validateFirst` 属性描述。[#6959](https://github.com/ant-design/ant-design/issues/6959)
- 修复了 `wrappedComponentRef`[#6545](https://github.com/ant-design/ant-design/issues/6545)
- 补充了 FormCreateOption 的 `generic type`[#7119](https://github.com/ant-design/ant-design/pull/7119) [@djyde](https://github.com/djyde)
- 修改了 `square` 的字体大小为 `@form-feedback-icon-size`[9bcde59](https://github.com/ant-design/ant-design/commit/9bcde590015855a12fdee851cf4e4836d0195cd7)

## 2.12.5

`2017-08-07`

- 修复 ES 模式下报 `SelectPropTypes not found` 的问题。[#7123](https://github.com/ant-design/ant-design/issues/7123)
- 修复 Row 在 flex 模式下元素不换行的问题。[4f73a23](https://github.com/ant-design/ant-design/commit/4f73a23a103733a3c148bb04013493a042f90a8f)
- 修复 InputNumber 和 RangePicker 的样式问题。[#7117](https://github.com/ant-design/ant-design/issues/7117) [#7126](https://github.com/ant-design/ant-design/issues/7126)

## 2.12.4

`2017-08-06`
Expand Down
2 changes: 1 addition & 1 deletion components/badge/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
}
&-text {
color: @text-color;
font-size: @badge-font-size;
font-size: @font-size-base;
margin-left: 8px;
}
}
Expand Down
8 changes: 0 additions & 8 deletions components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,6 @@ export default class Button extends React.Component<ButtonProps, any> {
}
}

// Handle auto focus when click button in Chrome
handleMouseUp = (e: React.MouseEvent<HTMLButtonElement>) => {
if (this.props.onMouseUp) {
this.props.onMouseUp(e);
}
}

render() {
const {
type, shape, size = '', className, htmlType, children, icon, prefixCls, ghost, ...others,
Expand Down Expand Up @@ -169,7 +162,6 @@ export default class Button extends React.Component<ButtonProps, any> {
{...omit(others, ['loading', 'clicked'])}
type={htmlType || 'button'}
className={classes}
onMouseUp={this.handleMouseUp}
onClick={this.handleClick}
>
{iconNode}{kids}
Expand Down
16 changes: 8 additions & 8 deletions components/card/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ exports[`renders ./components/card/demo/grid-card.md correctly 1`] = `
<h3
class="ant-card-head-title"
>
卡片标题
Card Title
</h3>
</div>
<div
Expand All @@ -93,43 +93,43 @@ exports[`renders ./components/card/demo/grid-card.md correctly 1`] = `
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
<div
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
<div
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
<div
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
<div
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
<div
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
<div
class="ant-card-grid"
style="width:25%;text-align:center;"
>
卡片内容
Content
</div>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions components/card/demo/grid-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ const gridStyle = {
};

ReactDOM.render(
<Card title="卡片标题" noHovering>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card.Grid style={gridStyle}>卡片内容</Card.Grid>
<Card title="Card Title" noHovering>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
</Card>
, mountNode);
````
4 changes: 2 additions & 2 deletions components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
}

&-contain-grid &-body {
margin: -0.5px;
margin: -1px 0 0 -1px;
padding: 0;
}

&-grid {
border-radius: 0;
border: 0;
box-shadow: 0 0 0 0.5px @border-color-split, 0 0 0 0.5px @border-color-split inset;
box-shadow: 1px 0 0 0 @border-color-split, 0 1px 0 0 @border-color-split, 1px 1px 0 0 @border-color-split, 1px 0 0 0 @border-color-split inset, 0 1px 0 0 @border-color-split inset;
width: 33.33%;
float: left;
padding: @card-padding-base;
Expand Down
4 changes: 0 additions & 4 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
transition: transform 0.24s;
top: 0;
left: 16px;
/* stylelint-disable declaration-block-no-duplicate-properties */
top: ~"16px \9";
left: ~"0 \9";
/* stylelint-enable declaration-block-no-duplicate-properties */
&:before {
content: "\E61F";
}
Expand Down
4 changes: 3 additions & 1 deletion components/date-picker/style/RangePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.@{calendar-prefix-cls}-range-picker-input {
background-color: transparent;
border: 0;
height: 100%;
height: 99%;
outline: 0;
width: 43%;
text-align: center;
Expand All @@ -20,6 +20,8 @@
position: absolute;
top: 50%;
margin-top: -10px;
line-height: 20px;
height: 20px;
}

.@{calendar-prefix-cls}-range {
Expand Down
1 change: 0 additions & 1 deletion components/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default class Dropdown extends React.Component<DropDownProps, any> {
mouseEnterDelay: 0.15,
mouseLeaveDelay: 0.1,
placement: 'bottomLeft',
minOverlayWidthMatchTrigger: false,
};

getTransitionName() {
Expand Down
14 changes: 8 additions & 6 deletions components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import warning from '../_util/warning';
import FormItem from './FormItem';
import { FIELD_META_PROP } from './constants';

export interface FormCreateOption {
onFieldsChange?: (props: any, fields: Array<any>) => void;
onValuesChange?: (props: any, values: any) => void;
mapPropsToFields?: (props: any) => void;
export interface FormCreateOption<T> {
onFieldsChange?: (props: T, fields: Array<any>) => void;
onValuesChange?: (props: T, values: any) => void;
mapPropsToFields?: (props: T) => void;
withRef?: boolean;
}

Expand Down Expand Up @@ -139,7 +139,7 @@ export default class Form extends React.Component<FormProps, any> {

static Item = FormItem;

static create = function<TOwnProps>(options?: FormCreateOption): ComponentDecorator<TOwnProps> {
static create = function<TOwnProps>(options: FormCreateOption<TOwnProps> = {}): ComponentDecorator<TOwnProps> {
const formWrapper = createDOMForm({
fieldNameProp: 'id',
...options,
Expand Down Expand Up @@ -174,8 +174,10 @@ export default class Form extends React.Component<FormProps, any> {
this.props.form.getFieldProps = this.deprecatedGetFieldProps;

const withRef: any = {};
if (options && options.withRef) {
if (options.withRef) {
withRef.ref = 'formWrappedComponent';
} else if (this.props.wrappedComponentRef) {
withRef.ref = this.props.wrappedComponentRef;
}
return <Component {...this.props} {...withRef} />;
},
Expand Down
1 change: 1 addition & 0 deletions components/form/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ After wrapped by `getFieldDecorator`, `value`(or other property defined by `valu
| options.getValueFromEvent | Specify how to get value from event or other onChange arguments | function(..args) | [reference](https://github.com/react-component/form#option-object) |
| options.validateTrigger | When to validate the value of children node. | string\|string[] | 'onChange' |
| options.rules | Includes validation rules. Please refer to "Validation Rules" part for details. | object[] | n/a |
| options.validateFirst | Whether stop validate on first rule of error for this field. | boolean | false |
| options.exclusive | Whether it is exclusive with other controls, particularly for Radio. | boolean | false |
| options.normalize | Normalize value to form component, [a select-all example](https://codepen.io/afc163/pen/JJVXzG?editors=001) | function(value, prevValue, allValues): any | - |

Expand Down
1 change: 1 addition & 0 deletions components/form/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ CustomizedForm = Form.create({})(CustomizedForm);
| options.getValueFromEvent | 可以把 onChange 的参数(如 event)转化为控件的值 | function(..args) | [reference](https://github.com/react-component/form#option-object) |
| options.validateTrigger | 校验子节点值的时机 | string\|string[] | 'onChange' |
| options.rules | 校验规则,参考下方文档 | object[] | |
| options.validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false |
| options.exclusive | 是否和其他控件互斥,特别用于 Radio 单选控件 | boolean | false |
| options.normalize | 转换默认的 value 给控件,[一个选择全部的例子](https://codepen.io/afc163/pen/JJVXzG?editors=001) | function(value, prevValue, allValues): any | - |

Expand Down
3 changes: 2 additions & 1 deletion components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

@form-prefix-cls: ~"@{ant-prefix}-form";
@form-component-height: @input-height-lg;
@form-feedback-icon-size: 14px;

.reset-form();

Expand Down Expand Up @@ -361,7 +362,7 @@ form {
.square(@input-height-lg);
line-height: @input-height-lg;
text-align: center;
font-size: @font-size-lg;
font-size: @form-feedback-icon-size;
animation: zoomIn .3s @ease-out-back;
.iconfont-font("");
z-index: 1;
Expand Down
2 changes: 1 addition & 1 deletion components/grid/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ Ant Design layout component if it can not meet your needs, you can use the excel
| lg | `≥1200px`, could be a `span` value or a object contain above props | number\|object | - |
| xl | `≥1600px`, could be a `span` value or a object contain above props | number\|object | - |

The breakpoints of responsive grid follow [BootStrap 3 media queries rules](http://getbootstrap.com/css/#grid-media-queries)(not contain `occasionally part`).
The breakpoints of responsive grid follow [BootStrap 3 media queries rules](https://getbootstrap.com/docs/3.3/css/#responsive-utilities-classes)(not contain `occasionally part`).
2 changes: 1 addition & 1 deletion components/grid/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ Ant Design 的布局组件若不能满足你的需求,你也可以直接使用
| lg | `≥1200px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number\|object | - |
| xl | `≥1600px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number\|object | - |

响应式栅格的断点遵循了 [BootStrap 3 的规则](http://getbootstrap.com/css/#grid-media-queries)(不包含链接里 `occasionally` 的部分)。
响应式栅格的断点遵循了 [BootStrap 3 的规则](https://getbootstrap.com/docs/3.3/css/#responsive-utilities-classes)(不包含链接里 `occasionally` 的部分)。
2 changes: 1 addition & 1 deletion components/grid/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

.@{ant-prefix}-row-flex {
display: flex;
flex-flow: row nowrap;
flex-flow: row wrap;

&:before,
&:after {
Expand Down
1 change: 1 addition & 0 deletions components/input-number/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
border: 0;
border-radius: @border-radius-base;
padding: 0 7px;
display: block;
.placeholder();

&[disabled] {
Expand Down
1 change: 1 addition & 0 deletions components/input/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
height: @input-height-base;
cursor: text;
font-size: @font-size-base;
line-height: @line-height-base;
color: @input-color;
background-color: @input-bg;
background-image: none;
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Sider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default class Sider extends React.Component<SiderProps, any> {
const triggerDom = (
trigger !== null ?
zeroWidthTrigger || (
<div className={`${prefixCls}-trigger`} onClick={this.toggle}>
<div className={`${prefixCls}-trigger`} onClick={this.toggle} style={{ width: siderWidth }}>
{trigger || defaultTrigger}
</div>
) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ exports[`renders ./components/layout/demo/side.md correctly 1`] = `
</div>
<div
class="ant-layout-sider-trigger"
style="width:200px;"
>
<i
class="anticon anticon-left"
Expand Down
3 changes: 2 additions & 1 deletion components/layout/demo/side.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: 3
iframe: 360
title:
zh-CN: 侧边布局
en-US: Sider
Expand Down Expand Up @@ -65,7 +66,7 @@ class SiderDemo extends React.Component {
<Menu.Item key="6">Team 1</Menu.Item>
<Menu.Item key="8">Team 2</Menu.Item>
</SubMenu>
<Menu.Item key="8">
<Menu.Item key="9">
<Icon type="file" />
<span>File</span>
</Menu.Item>
Expand Down
Loading

0 comments on commit 7d49cc1

Please sign in to comment.