From 01460c02976cdfe574d1d5726f7bb462664e1111 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 12 Jun 2018 07:13:38 +0000 Subject: [PATCH 1/6] Update rc-tween-one requirement to ^2.0.1 Updates the requirements on [rc-tween-one](https://github.com/react-component/tween-one) to permit the latest version. - [Release notes](https://github.com/react-component/tween-one/releases) - [Changelog](https://github.com/react-component/tween-one/blob/master/HISTORY.md) - [Commits](https://github.com/react-component/tween-one/commits/2.0.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e7a05a511..dacec4ca84 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "rc-drawer-menu": "^0.5.3", "rc-queue-anim": "^1.4.1", "rc-scroll-anim": "^2.2.1", - "rc-tween-one": "^1.7.2", + "rc-tween-one": "^2.0.1", "react": "^16.3.2", "react-color": "^2.11.7", "react-copy-to-clipboard": "^5.0.0", From 37ec04b21a662dd00fb7e729c6df7d53a082b5b1 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jun 2018 17:31:26 +0800 Subject: [PATCH 2/6] Fix InputNumber style when zoom to 90% or below close #10562 --- components/input-number/style/index.less | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/components/input-number/style/index.less b/components/input-number/style/index.less index f865df881c..7e83cf08a7 100644 --- a/components/input-number/style/index.less +++ b/components/input-number/style/index.less @@ -60,7 +60,6 @@ .disabled(); .@{input-number-prefix-cls}-input { cursor: not-allowed; - background-color: @disabled-bg; } .@{input-number-prefix-cls}-handler-wrap { display: none; @@ -74,17 +73,12 @@ -moz-appearance: textfield; height: @input-height-base - 2px; transition: all 0.3s linear; - color: @input-color; - background-color: @input-bg; + background-color: transparent; border: 0; border-radius: @border-radius-base; padding: 0 @control-padding-horizontal - 1px; display: block; .placeholder(); - - &[disabled] { - .disabled(); - } } &-lg { @@ -109,7 +103,7 @@ border-left: @border-width-base @border-style-base @border-color-base; width: 22px; height: 100%; - background: @component-background; + background: transparent; position: absolute; top: 0; right: 0; From 713a0bcdc50353f4ede0eeae80d070046169db64 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Jun 2018 20:21:52 +0800 Subject: [PATCH 3/6] update snapshot --- components/form/__tests__/__snapshots__/demo.test.js.snap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap index 6e3bc61169..4ee960b684 100644 --- a/components/form/__tests__/__snapshots__/demo.test.js.snap +++ b/components/form/__tests__/__snapshots__/demo.test.js.snap @@ -2417,6 +2417,8 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = ` Date: Thu, 14 Jun 2018 10:53:14 +0800 Subject: [PATCH 4/6] Update button signature (#10877) --- components/button/button.tsx | 57 ++++++++++++++++++++----------- components/transfer/operation.tsx | 4 +-- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/components/button/button.tsx b/components/button/button.tsx index bd0eb7b022..3df7700943 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import { findDOMNode } from 'react-dom'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import omit from 'omit.js'; import Icon from '../icon'; import Group from './button-group'; @@ -37,10 +36,10 @@ function insertSpace(child: React.ReactChild, needInserted: boolean) { export type ButtonType = 'default' | 'primary' | 'ghost' | 'dashed' | 'danger'; export type ButtonShape = 'circle' | 'circle-outline'; export type ButtonSize = 'small' | 'default' | 'large'; +export type ButtonHTMLType = 'submit' | 'button' | 'reset'; export interface BaseButtonProps { type?: ButtonType; - htmlType?: string; icon?: string; shape?: ButtonShape; size?: ButtonSize; @@ -50,9 +49,16 @@ export interface BaseButtonProps { ghost?: boolean; } -export type AnchorButtonProps = BaseButtonProps & React.AnchorHTMLAttributes; +export type AnchorButtonProps = { + href: string; + target?: string; + onClick?: React.MouseEventHandler; +} & BaseButtonProps & React.AnchorHTMLAttributes; -export type NativeButtonProps = BaseButtonProps & React.ButtonHTMLAttributes; +export type NativeButtonProps = { + htmlType?: ButtonHTMLType; + onClick?: React.MouseEventHandler; +} & BaseButtonProps & React.ButtonHTMLAttributes; export type ButtonProps = AnchorButtonProps | NativeButtonProps; @@ -138,7 +144,7 @@ export default class Button extends React.Component { } } - handleClick = (e: React.MouseEvent) => { + handleClick: React.MouseEventHandler = e => { // Add click effect this.setState({ clicked: true }); clearTimeout(this.timeout); @@ -146,7 +152,7 @@ export default class Button extends React.Component { const onClick = this.props.onClick; if (onClick) { - (onClick as (e: React.MouseEvent) => void)(e); + (onClick as React.MouseEventHandler)(e); } } @@ -157,7 +163,7 @@ export default class Button extends React.Component { render() { const { - type, shape, size, className, htmlType, children, icon, prefixCls, ghost, ...others + type, shape, size, className, children, icon, prefixCls, ghost, loading: _loadingProp, ...rest } = this.props; const { loading, clicked, hasTwoCNChar } = this.state; @@ -175,8 +181,6 @@ export default class Button extends React.Component { break; } - const ComponentProp = (others as AnchorButtonProps).href ? 'a' : 'button'; - const classes = classNames(prefixCls, className, { [`${prefixCls}-${type}`]: type, [`${prefixCls}-${shape}`]: shape, @@ -193,15 +197,30 @@ export default class Button extends React.Component { const kids = (children || children === 0) ? React.Children.map(children, child => insertSpace(child, this.isNeedInserted())) : null; - return ( - - {iconNode}{kids} - - ); + if ('href' in rest) { + return ( + + {iconNode}{kids} + + ); + } else { + // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`. + const { htmlType, ...otherProps } = rest; + + return ( + + ); + } } } diff --git a/components/transfer/operation.tsx b/components/transfer/operation.tsx index ea39379711..c0acbcbcf0 100644 --- a/components/transfer/operation.tsx +++ b/components/transfer/operation.tsx @@ -5,8 +5,8 @@ export interface TransferOperationProps { className?: string; leftArrowText?: string; rightArrowText?: string; - moveToLeft?: React.FormEventHandler; - moveToRight?: React.FormEventHandler; + moveToLeft?: React.MouseEventHandler; + moveToRight?: React.MouseEventHandler; leftActive?: boolean; rightActive?: boolean; style?: React.CSSProperties; From 07e06709f8bd4b9feb594c7cb03a2901f7449a75 Mon Sep 17 00:00:00 2001 From: hehe Date: Fri, 15 Jun 2018 10:16:37 +0800 Subject: [PATCH 5/6] docs: fix typo --- components/select/index.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/select/index.en-US.md b/components/select/index.en-US.md index fa1f034764..7037a1e1c0 100644 --- a/components/select/index.en-US.md +++ b/components/select/index.en-US.md @@ -29,7 +29,7 @@ Select component to select value from options. | defaultValue | Initial selected option. | string\|number\|string\[]\|number\[] | - | | disabled | Whether disabled select | boolean | false | | dropdownClassName | className of dropdown menu | string | - | -| dropdownMatchSelectWidth | Whether dropdown's with is same with select. | boolean | true | +| dropdownMatchSelectWidth | Whether dropdown's width is same with select. | boolean | true | | dropdownStyle | style of dropdown menu | object | - | | filterOption | If true, filter options by input, if function, filter options against it. The function will receive two arguments, `inputValue` and `option`, if the function returns `true`, the option will be included in the filtered set; Otherwise, it will be excluded. | boolean or function(inputValue, option) | true | | firstActiveValue | Value of action option by default | string\|string\[] | - | From a5ff8e5de024c342959ff19a99603723d0659bd2 Mon Sep 17 00:00:00 2001 From: ryannz Date: Thu, 14 Jun 2018 14:45:46 +0800 Subject: [PATCH 6/6] fix(AutoComplete): add missing backfill prop in type --- components/auto-complete/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/auto-complete/index.tsx b/components/auto-complete/index.tsx index 9fac6d62b4..cc0f567b7b 100755 --- a/components/auto-complete/index.tsx +++ b/components/auto-complete/index.tsx @@ -26,6 +26,7 @@ export interface AutoCompleteProps extends AbstractSelectProps { value?: SelectValue; defaultValue?: SelectValue; dataSource?: DataSourceItemType[]; + backfill?: boolean; optionLabelProp?: string; onChange?: (value: SelectValue) => void; onSelect?: (value: SelectValue, option: Object) => any;