Merge branch 'master' into feature-2.9

This commit is contained in:
afc163 2017-03-20 17:13:36 +08:00
commit 4c8297d39d
11 changed files with 51 additions and 39 deletions

View File

@ -30,7 +30,6 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Fix a style issue of Radio [#5336](https://github.com/ant-design/ant-design/pull/5336).
- Fix a issue that `getContainer` of Message didn't work [#5380](https://github.com/ant-design/ant-design/issues/5380).
- Fix text alignment of Checkbox and Radio [696a3c0](https://github.com/ant-design/ant-design/commit/696a3c0e34156d78e87d629a3f0f8703af1f03ec).
- Fix box shadow of AutoComplete [7bc2b1d](https://github.com/ant-design/ant-design/commit/7bc2b1dbff1e16e7ad92a9b4ea2601b82e3b58b6).
- Tweak animation and blur style of Spin [fa1e031](https://github.com/ant-design/ant-design/commit/fa1e031a7396c61fa9709a0c46fe63200c35d232).
- Tweak some styles of Mention [240a93c](https://github.com/ant-design/ant-design/commit/240a93cee25bc8c6ad4520cd907a14a7b22ed773).

View File

@ -30,7 +30,6 @@ timeline: true
- 修复 Radio 的一个样式问题 [#5336](https://github.com/ant-design/ant-design/pull/5336)。
- 修复 Message 的 getContainer 无法使用的问题 [#5380](https://github.com/ant-design/ant-design/issues/5380)。
- 修复 Checkbox 和 Radio 标签的文字对齐 [696a3c0](https://github.com/ant-design/ant-design/commit/696a3c0e34156d78e87d629a3f0f8703af1f03ec)。
- 修复 AutoComplete 的额外阴影 [7bc2b1d](https://github.com/ant-design/ant-design/commit/7bc2b1dbff1e16e7ad92a9b4ea2601b82e3b58b6)。
- 调整了 Spin 的动画 [fa1e031](https://github.com/ant-design/ant-design/commit/fa1e031a7396c61fa9709a0c46fe63200c35d232)。
- 调整了 Mention 的一些样式 [240a93c](https://github.com/ant-design/ant-design/commit/240a93cee25bc8c6ad4520cd907a14a7b22ed773)。

View File

@ -1614,9 +1614,9 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
>
<label
class=""
title="Nation"
title="Plain Text"
>
Nation
Plain Text
</label>
</div>
<div

View File

@ -49,7 +49,7 @@ class Demo extends React.Component {
<Form onSubmit={this.handleSubmit}>
<FormItem
{...formItemLayout}
label="Nation"
label="Plain Text"
>
<span className="ant-form-text">China</span>
</FormItem>

View File

@ -1,10 +1,13 @@
/* eslint no-console:0 */
// this file is not used if use https://github.com/ant-design/babel-plugin-import
if (process.env.NODE_ENV !== 'production') {
if (typeof console !== 'undefined' && console.warn && typeof window !== 'undefined') {
console.warn(`You are using a whole package of antd,
please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.`);
}
import warning from './_util/warning';
const ENV = process.env.NODE_ENV;
if (ENV !== 'production' && ENV !== 'test') {
warning(
false,
'You are using a whole package of antd,' +
'please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.'
);
}
export { default as Affix } from './affix';

View File

@ -19,6 +19,7 @@ export interface AbstractSelectProps {
disabled?: boolean;
style?: React.CSSProperties;
placeholder?: string;
filterOption?: boolean | ((inputValue: string, option: Object) => any);
}
export interface SelectProps extends AbstractSelectProps {
@ -26,7 +27,6 @@ export interface SelectProps extends AbstractSelectProps {
defaultValue?: SelectValue;
combobox?: boolean;
multiple?: boolean;
filterOption?: boolean | ((inputValue: string, option: Object) => any);
tags?: boolean;
onSelect?: (value: SelectValue, option: Object) => any;
onDeselect?: (value: SelectValue) => any;

View File

@ -1,5 +1,4 @@
import React from 'react';
import { PropTypes } from 'react';
import React, { PropTypes } from 'react';
import RcSwitch from 'rc-switch';
import classNames from 'classnames';
@ -18,12 +17,13 @@ export interface SwitchProps {
export default class Switch extends React.Component<SwitchProps, any> {
static defaultProps = {
prefixCls: 'ant-switch',
size: 'default',
};
static propTypes = {
prefixCls: PropTypes.string,
size: PropTypes.oneOf(['small', 'default']),
// HACK: https://github.com/ant-design/ant-design/issues/5368
// size=default and size=large are the same
size: PropTypes.oneOf(['small', 'default', 'large']),
className: PropTypes.string,
};

View File

@ -7,6 +7,12 @@ import UploadList from './UploadList';
import { UploadProps, UploadLocale } from './interface';
import { T, fileToObject, genPercentAdd, getFileItem, removeFileItem } from './utils';
export interface UploadContext {
antLocale?: {
Upload?: any,
};
}
const defaultLocale: UploadLocale = {
uploading: '文件上传中',
removeFile: '删除文件',
@ -34,6 +40,12 @@ export default class Upload extends React.Component<UploadProps, any> {
supportServerRender: true,
};
static contextTypes = {
antLocale: React.PropTypes.object,
};
context: UploadContext;
recentUploadStatus: boolean | PromiseLike<any>;
progressTimer: any;
refs: {

View File

@ -17,7 +17,7 @@ export default class UploadList extends React.Component<UploadListProps, any> {
static defaultProps = {
listType: 'text', // or picture
progressAttr: {
strokeWidth: 3,
strokeWidth: 2,
showInfo: false,
},
prefixCls: 'ant-upload',
@ -100,7 +100,7 @@ export default class UploadList extends React.Component<UploadListProps, any> {
) : null;
progress = (
<div className={`${prefixCls}-list-item-progress`}>
<div className={`${prefixCls}-list-item-progress`} key="progress">
{loadingProgress}
</div>
);
@ -166,7 +166,9 @@ export default class UploadList extends React.Component<UploadListProps, any> {
{iconAndPreview}
</div>
{actions}
{progress}
<Animate transitionName="fade" component="">
{progress}
</Animate>
</div>
);
});

View File

@ -118,7 +118,7 @@
margin-top: 8px;
font-size: @font-size-base;
position: relative;
height: 24px;
&-name {
overflow: hidden;
text-overflow: ellipsis;
@ -129,8 +129,7 @@
}
&-info {
height: 22px;
line-height: 22px;
line-height: 24px;
padding: 0 12px 0 4px;
transition: background-color .3s;
@ -153,7 +152,7 @@
top: 0;
right: 4px;
color: @text-color-secondary;
line-height: 22px;
line-height: 24px;
&:hover {
color: @text-color;
}
@ -179,13 +178,11 @@
}
&-progress {
padding: 0 6px 0 20px;
margin-top: -2px;
margin-bottom: 1px;
line-height: 0;
font-size: @font-size-base;
.@{ant-prefix}-progress-line-inner {
vertical-align: middle;
}
position: absolute;
width: 100%;
bottom: 0;
}
}

View File

@ -39,7 +39,7 @@
"css-animation": "^1.2.5",
"dom-closest": "^0.2.0",
"lodash.debounce": "^4.0.8",
"moment": "~2.17.0",
"moment": "~2.18.0",
"object-assign": "~4.1.0",
"omit.js": "^0.1.0",
"rc-animate": "~2.3.0",
@ -82,14 +82,14 @@
"antd-tools": "~0.18.0",
"babel-cli": "^6.18.0",
"babel-eslint": "^7.1.0",
"babel-jest": "^17.0.0",
"babel-jest": "^19.0.0",
"babel-plugin-import": "^1.0.0",
"babel-plugin-transform-runtime": "~6.15.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"bezier-easing": "^2.0.3",
"bisheng": "^0.22.0",
"bisheng": "^0.23.0",
"bisheng-plugin-antd": "^0.13.2",
"bisheng-plugin-description": "^0.1.1",
"bisheng-plugin-react": "^0.5.0",
@ -106,8 +106,8 @@
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-import": "^2.1.0",
"eslint-plugin-jsx-a11y": "^3.0.2",
"eslint-plugin-markdown": "1.0.0-beta.3",
"eslint-plugin-react": "^6.1.2",
"eslint-plugin-markdown": "1.0.0-beta.4",
"eslint-plugin-react": "6.10.0",
"eslint-tinker": "^0.4.0",
"fetch-jsonp": "^1.0.3",
"glob": "^7.1.1",
@ -118,9 +118,9 @@
"moment-timezone": "^0.5.5",
"pre-commit": "^1.2.2",
"querystring": "^0.2.0",
"rc-queue-anim": "~0.12.4",
"rc-scroll-anim": "~0.5.0",
"rc-tween-one": "~0.11.0",
"rc-queue-anim": "~0.13.2",
"rc-scroll-anim": "~0.6.5",
"rc-tween-one": "~1.1.2",
"react": "^15.0.0",
"react-addons-test-utils": "^15.0.0",
"react-color-standalone": "^2.4.2-1",
@ -136,7 +136,7 @@
"stylelint": "^7.8.0",
"stylelint-config-standard": "^16.0.0",
"typescript": "~2.2.1",
"typescript-babel-jest": "^0.1.5",
"typescript-babel-jest": "^1.0.2",
"values.js": "^1.0.3",
"xhr2": "^0.1.3"
},