Commit Graph

6772 Commits

Author SHA1 Message Date
afc163
3078819535 jest mock generateRandomKey for ssr test
facebook/draft-js#702
2018-05-22 23:29:09 +08:00
afc163
6471e5d4f0 write snapshot files 2018-05-22 23:29:09 +08:00
afc163
1e585135aa Try test mention to see what the problem is 2018-05-22 23:29:09 +08:00
Ivan Trofimov
33c58a8ef6 Update ru_RU.tsx (#10616)
* Update locale-provider ru_RU and tests

* Update locale-provider ru_RU and tests: patch-2
2018-05-22 16:31:12 +08:00
paranoidjk
b09e03d82a doc(Input): fix wrong desc about input size in form. 2018-05-22 06:50:14 +00:00
偏右
a2e0e40caa
[WIP] Use raf to replace getRequestAnimationFrame (#10614)
* use raf to replace getRequestAnimationFrame

* remove isCssAnimationSupported
2018-05-22 13:01:28 +08:00
Walter Barbagallo
4077ffb58c Enhanced InputNumber props with HTMLInputElement attributes. (#10608)
* Enhanced InputNumber props with HTMLInputElement attributes.

It is possibile to use additional props supported by the inner input
element:

```
const inputEl = <InputNumber autoFocus />
```

Before this commit the type checker did not recognize the `autoFocus`
prop.

Some attributes must be omitted because they conflict with props
defined on `InputNumberProps` interface

* Renamed type

Probably they conflicts with a reserved name?
@see https://travis-ci.org/ant-design/ant-design/jobs/381668406
> components/input-number/index.tsx(9,93): error TS4022: 'extends' clause of exported interface 'InputNumberProps' has or is using private name 'OmitAttributes'.

* Replace InputNumber onKeyDown typing with the typed one.

Extending HTMLInputElement attributes the `onKeyDown` props now have a
better typing.

For example before this commit accessing to the event `key` attribute resulted
in a type error.
@see https://reactjs.org/docs/events.html#keyboard-events

* Exporting type OmitAttrs on InputNumber component.

This is an attempt to solve the ci error:
> components/input-number/index.tsx(9,93): error TS4022: 'extends' clause of exported
> interface 'InputNumberProps' has or is using private name 'OmitAttrs'.

@see https://travis-ci.org/ant-design/ant-design/jobs/381678316
2018-05-22 10:46:20 +08:00
Ezekiel Keator
bb4bc61556 Added missing API documentation (#10611)
* Added missing API documentation

Added missing Divider API documentation.

* Corrected styling

Corrected styling on dash to match other documentation pages.
2018-05-22 10:46:01 +08:00
afc163
0fc5a0ece5 site: add alt to images 2018-05-21 23:47:22 +08:00
afc163
6458280cb3 site: add alt to images 2018-05-21 23:42:57 +08:00
Zheeeng
389c7c4f10 DRY the styles writing for maintenance (#10220) 2018-05-21 21:53:20 +08:00
Zheeeng
59fe98a194 Add position config for List pagination (#10581) 2018-05-21 21:52:18 +08:00
Jamie.LiuMJ
2955600642 fix clearfix (#10563) 2018-05-21 21:52:15 +08:00
sosohime
d4ed303bcd doc: Update DatePicker document about locale (#10598) 2018-05-21 21:51:39 +08:00
Wei Zhu
ff458a2c3f Improve Input type definitions
Close #10166
2018-05-21 21:31:59 +08:00
zombiej
06ffd9ca04 Adjust Tree icon vertical-align, fix #10603 2018-05-21 21:24:16 +08:00
afc163
251d882101 fix dropdown any type 2018-05-21 21:02:03 +08:00
afc163
129baddc44 Remove some typescript any types of cascader 2018-05-21 20:35:14 +08:00
afc163
968488a2fa fix: Cascader showSearch not working bug, close #10599 2018-05-21 18:07:56 +08:00
afc163
00d710cef0 demo: fix select demo order 2018-05-21 17:07:39 +08:00
afc163
ddc242a9cb Merge branch 'master' into feature-3.6.0 2018-05-21 16:11:57 +08:00
jim
d6a554823f Rollback ci modification 2018-05-20 21:38:29 +08:00
jim
fd1d9661c0 update snap fix ci 2018-05-20 15:49:56 +08:00
Zheeeng
8b420c41bb Fix typo (#10582)
* Fix typo: splited -> separated

* Fix typo: splited -> separated
2018-05-20 00:50:19 +08:00
方剑成
96d53aefb8 Remove redundant icons (#10583) 2018-05-20 00:49:48 +08:00
afc163
8e2f72ffe0 tweak dropdown menu item padding 2018-05-19 20:34:19 +08:00
afc163
29229ebee7 fix: input onDoubleClick type, close #10518 2018-05-19 20:01:47 +08:00
Wei Zhu
aa87fcb01e Update snapshot 2018-05-18 18:53:26 +08:00
Wei Zhu
1ed9fed2cf Improve Button and Tag types 2018-05-18 18:22:33 +08:00
afc163
7c4f6e8b2a fix: Revert checkbox z-index
fix #10480

ref #10452

reverted for #10385
2018-05-18 15:36:54 +08:00
qhxin
7404b7f36c fix Affix/index.tsx while offsetTop === 0 and offsetBottom is numberic (#10566)
* Update index.tsx

Fix: if offsetTop === 0, it will get undefined, if offsetBottom is type of number, offsetMode will be { top: false, ... }

* Update index.tsx
2018-05-18 10:18:19 +08:00
Walter Barbagallo
963120f702 Improved Form component typings (#10564)
* Improved Form component typings

With this fix you can use HTMLFormElement attributes on Form component
without getting TypeScript errors.

For example this code does not longer produce error for the additional
`autoComplete` prop:

```
const myForm = (
  <Form autoComplete="off">
    ...
  </Form>
)
```

* Fix onBlur / onChange typings with Input component

This improvement fix a typing issue incompatibility with
`react-final-form`
The incompatibility involve [this
line](https://github.com/final-form/react-final-form/blob/v3.4.2/src/index.d.ts#L20)
where the handler argument is a more specific SyntheticEvent
2018-05-17 23:45:13 +08:00
Wei Zhu
b7d508e166 Fix Row gutter type 2018-05-17 21:47:09 +08:00
afc163
cafeb8e3eb fix button group split border color 2018-05-17 21:36:05 +08:00
afc163
99dca86904 update button disable demo 2018-05-17 21:23:36 +08:00
afc163
09d5e36cfa style: fix hightlight link color in menu item 2018-05-17 21:17:20 +08:00
afc163
6e0865f691 fix less compile error 2018-05-17 17:20:47 +08:00
afc163
eb17aae25c Fix less import error again 2018-05-17 15:21:31 +08:00
afc163
593435ce65 fix import path 2018-05-17 14:39:33 +08:00
afc163
c4f58e7027 fix import path 2018-05-17 11:04:14 +08:00
afc163
b76910f63f fix typo 2018-05-16 11:49:35 +08:00
afc163
12d3046687 style: unify the less vars naming 2018-05-15 17:02:01 +08:00
Wei Zhu
c7c85e3d5d docs: Revert unexpected modify 2018-05-15 12:11:21 +08:00
Wei Zhu
78af67a057 docs: fix table custom search panel demo
close #10494
2018-05-15 11:58:02 +08:00
Reed Sun
604584931e fix text error (#10510)
回掉 => 回调
2018-05-15 11:22:29 +08:00
Andreas Cederström
97c2d58d15 remove bundle size warning in test env (#10363) 2018-05-14 17:13:27 +08:00
Winter Zhong
f09c799bba add the border-right-width to fix the Input.Group component covered box-shadow effect (#10492) 2018-05-14 17:11:11 +08:00
Wei Zhu
bf03d954d4 docs: Fix indent 2018-05-14 12:29:04 +08:00
Xiping.wang
413479a5b9 修改案例title值,原title值容易产生误导
修改案例title值,原title值容易产生误导
2018-05-14 12:08:50 +08:00
afc163
f3545ccdc7 Merge branch 'master' into feature-3.6.0 2018-05-12 13:49:33 +08:00
Oleg Kuzava
71abb96de7 Allow to use any CSS units for layout width (#10479)
* Allow to use any CSS units for layout width

* Fix ts issues

* Fix parseFloat type check

* add tests for width in Sider

* clean up
2018-05-12 02:30:33 +08:00
jiang
9e01b24272 fix 10445 (#10457)
* fix 10445

* re help anim timing

* refactor

* use this.helpShow

* is show no set state

* remove state.helpShow
2018-05-10 21:48:11 +08:00
picodoth
030c745e1b fix: checkbox trigger twice
regression introduced from d93cfde
2018-05-10 19:04:37 +08:00
Christopher Deutsch
dd0d4214d1 Omit 'ref' from ButtonProps otherwise typing conflicts occur. (#10426)
Fixes #10405
2018-05-10 11:21:07 +08:00
afc163
6eef4d0a42 chore: code style 2018-05-10 11:01:58 +08:00
afc163
6e6b1ccdec chore: code style 2018-05-10 10:59:33 +08:00
afc163
bc4143f8a3 Fix Cascader displayRender z-index issue, close #10433 2018-05-09 18:16:08 +08:00
afc163
be31f17bca Change Dropdown.Button default icon to ellipsis 2018-05-09 18:01:07 +08:00
Xiaoming
7f2159e928 Message doc update & change variable statement (#10420)
* eslint disallow use of chained assignment expressions

eslint disallow use of chained assignment expressions

* revert

* message-doc-update

1.If a variable is never reassigned, using the const declaration is
better.
2.Defaultvalue’s type must be ‘number’ depend on type
2018-05-08 21:59:28 +08:00
Wei Zhu
04ee8526ab Revert "Fix table scroll x (#9704)"
This reverts commit 0d9dcb1714.
2018-05-08 16:23:10 +08:00
konakona
6c0d6d302a Add feature: can use type ReactNode for message of rules (#10136) (#10395)
* Add feature: can use type ReactNode for message of rules (#10136)

* fix: Replace React.Fragment to span

* Add unit test for Form (Not passed)

* fix: unit test of Form

* fix: unit test of Form & remove demo

* fix: update unit test for Form

* Refine code for Form

* Add error check for getHelpMessage
2018-05-08 14:00:00 +08:00
afc163
20495dd5ba Fix monospaced number font weight issue
http://codesandbox.io/s/w705jk5wz7
2018-05-07 21:19:16 +08:00
陈帅
d5c5219111 new edit Table demo (#10119)
* new edit Table demo

* fix test error

* fix ci

* typo

* Skip edit-row test for React 15

* Set column width

* Update snapshot
2018-05-07 20:50:43 +08:00
afc163
5e99a93930 Fix collapse focused style 2018-05-07 17:57:49 +08:00
Wei Zhu
8a6d9b92b7 Improve table types
Fix #10374
2018-05-07 12:32:26 +08:00
afc163
d93cfdef09 clean up unnecessary z-index
close #9840

close #10385
2018-05-06 21:50:50 +08:00
afc163
e86f17186b Fix select test snapshot 2018-05-06 14:58:05 +08:00
afc163
6d91a3eb4a Fix select arrow overlap bug, close #10383
introduced by #10092, this commit also fix #10092
2018-05-06 14:54:27 +08:00
afc163
d95379cfa5 Fix broken style of Input with addons, close #10371 2018-05-05 19:50:48 +08:00
afc163
dbde26e560 docs: add disabled prop doc for Button, close #10373 2018-05-05 13:18:50 +08:00
Karol Majewski
1479726932 Use exact type for Breadcrumb.Item (#10372)
Using "any" breaks the build for TSLint users having the "no-unsafe-any" rule enabled.

See https://palantir.github.io/tslint/rules/no-unsafe-any/
2018-05-05 00:47:44 +08:00
愚指导
9368e2df87
Bump 3.5.0 (#10297) 2018-05-04 18:15:28 +08:00
Zheeeng
7f8cb838e3 Remove the side effects in render method (#10357) 2018-05-04 17:37:31 +08:00
愚指导
0f7794946f
upgrade rc-cascader to 1.13.0 for support filedNames (#10365) 2018-05-04 17:27:34 +08:00
Christian
f4b8a58480 fixes #10289 and #10209: lost of user selection on table data updates (#10332)
* fixes #10289 and #10209: lost of user selection on table data updates

* adds shallowequal check
2018-05-04 14:51:15 +08:00
Wu Haotian
6019245365 fix(button): use React.HTMLProps for button's props (#10229) 2018-05-04 14:48:41 +08:00
Wei Zhu
3fd9397174 Keep text align center
Fix prev commit
2018-05-04 14:33:06 +08:00
Wei Zhu
f1e38a1573 Fix table merged header cell border
Fix #10359
2018-05-04 14:30:21 +08:00
愚道
013df45a70 merge https://github.com/ant-design/ant-design/pull/10306 from feature-3.5.0 2018-05-03 16:58:50 +08:00
afc163
5ee4d20e2a should still have padding when card which set padding to 0 is loading 2018-05-03 15:17:04 +08:00
paranoidjk
8e166915a9 fix(Select): value tsd (#10336) 2018-05-03 11:28:30 +08:00
Xiaoming
9c6fef0604 treeSelect doc (#10302)
TreeSelect implement Tree as popup panel which use title as the display
text.
To follow the Select definition (label as display text), TreeSelect
internal convert the prop label into title to the Tree component (but
will follow if title is set).
ref:
https://github.com/react-component/tree-select/blob/master/src/Select.js
x#L44
2018-05-03 11:26:59 +08:00
paranoidjk
b6f8ab89c7 Fix: Form tsd (#10324)
* Fix(form): wrappedComponentRef interface

- ref: https://github.com/react-component/form/blob/master/src/createBaseForm.js#L499

* refactor: use ts conditional type

* fix: merge

* Revert "refactor: use ts conditional type"

This reverts commit ab3035da83.
2018-05-02 18:24:51 +08:00
Wei Zhu
56e3384c6b Revert "MenuItem: avoid rendering Tooltip unless necessary (#9636)"
This reverts commit 0754845aff.

Conditional rendering will break the transition animation,
since React will create new DOM node when inlineCollapsed changges.

Fix https://github.com/react-component/menu/issues/139
2018-05-02 14:49:20 +08:00
afc163
b5a52d26f2 fix snapshot 2018-05-02 14:28:16 +08:00
afc163
70a42545e3 fix fileToObject, close #10319 2018-05-02 13:56:54 +08:00
afc163
fb38e55cc0 more test about button text 2018-05-01 19:36:11 +08:00
afc163
c7471a4653 tweak insert space logic of loading button 2018-05-01 19:33:38 +08:00
afc163
726f0466bc menu should be unfocusable defaultly 2018-05-01 18:53:44 +08:00
Daniel Gomez
3a5fce7256 Fix UploadFile's lastModifiedDate property name (#10315) 2018-05-01 00:11:18 +08:00
Junbin Huang
3a3d550b54 chore: upgrade menu (#10305)
* chore: upgrade menu and select

* Add test case for coverage percent
2018-04-29 23:01:58 +08:00
Ash Kumar
013932e6d3 Feature: (Issue 10213): Column 'sorter' function is passed 'sortOrder' as param (#10306)
* Table Column's sorter prop can now be provided a fn to which 'sortOrder' is passed as param

* head.md: added documentation for new use of 'sorter' prop function
2018-04-29 22:08:28 +08:00
afc163
81dd432e31 update select demo 2018-04-28 23:56:38 +08:00
afc163
4535e9d4f1 Fix Select extra space taken up when arrow disabled
close #10092
2018-04-28 23:38:05 +08:00
愚道
8b64882562 Merge branch 'master' of github.com:ant-design/ant-design 2018-04-28 11:10:54 +08:00
愚道
6682a56922 fix snapshot ci 2018-04-28 11:09:15 +08:00
afc163
e97977b891 Fix upload onChange arg type when beforeUpload return false, close #10293 2018-04-28 11:06:32 +08:00
愚道
b45146486a merge feature-3.5.0 2018-04-28 11:04:10 +08:00
afc163
7f8f89cbff doc: Add mode and onPanelChange in API document, close #9785 2018-04-27 20:17:39 +08:00
Thiebaud Thomas
a1e186b8a3 Fix type for placeholder in select component (#10282) 2018-04-27 18:22:10 +08:00
afc163
3d079af7cd Fix Input.Group align issue in Form, close #10281 2018-04-27 15:57:27 +08:00
afc163
1f6107e94a Fix naming convention, close #10275 2018-04-27 13:21:51 +08:00
afc163
e40c2a7f45 Fix notification icon hover color, close #10272 2018-04-27 10:48:40 +08:00
afc163
d9053a2526 Tweak sort position again 2018-04-26 16:15:04 +08:00
afc163
4b1857d587 fix spin loading 2018-04-26 16:06:18 +08:00
Marcela Bomfim
b1c41c665e Fix typo (#10250)
Fix typo
2018-04-25 21:59:14 +08:00
afc163
c85758fd01 Fix spin container interaction, close #10227 2018-04-25 14:55:16 +08:00
afc163
52c8f34a73 Fix radio border radius 2018-04-25 11:08:21 +08:00
Wu Haotian
4ea20e696c fix(form): fix typing for Form.onValuesChange (#10231) 2018-04-24 23:33:58 +08:00
afc163
a268dc8d62 Fix dashed Divider, close #10216 2018-04-24 20:17:48 +08:00
Samuel Gaus
4bc28ac471 Update jsx.md (#10203)
Made it clear that you can't use components other than Column or ColumnGroup as children to Table.
2018-04-23 21:57:43 +08:00
Zheeeng
6a3e6f55cf Fix typo (#10193) 2018-04-23 16:00:24 +08:00
Zheeeng
4ad5985df7 Prefer using 'truthy' over 'falsyless' (#10191) 2018-04-23 11:23:25 +08:00
Jiabin Peng
bb720aaab9 Fix menu item's clickable region in dark theme (#10187)
* remove redundant style for submenu

* Fix menu item's clickable region in dark theme
2018-04-23 00:31:36 +08:00
Wei Zhu
7ee2eca848 Pass CheckboxGroup/RadioGroup prefixCls down to children (#10002)
Close #9950
2018-04-22 16:35:34 +08:00
afc163
15c6d58796 Table getCheckboxProps should be updated when rerender
close #10133
2018-04-22 15:19:04 +08:00
afc163
b9d94971e4 Add successPercent as Progress[format] argument, close #10096 2018-04-22 14:00:49 +08:00
afc163
2078354bc5 Fix collapsedWidth string bug, close #10140 2018-04-22 13:56:23 +08:00
Jin ZHANG
a95209cf55 scale fallback string (#10184) 2018-04-22 13:09:42 +08:00
niko
d50ec436d5
List integrate pagination functional fixed: #9303 (#10135) 2018-04-20 15:41:40 +08:00
Jin ZHANG
e1c74eb799 add maxCount config to message (#10169) 2018-04-20 15:40:43 +08:00
Zheeeng
d016471638 Feature 3.5.0 time line reverse api (#10057)
* Add reverse api for TimeLine

* Update TimeLine test snapshot

* Add specifications for reverse api and pending api
2018-04-20 11:23:37 +08:00
afc163
f4ae9294c0 Improve card loading style, ref #9862 2018-04-20 11:19:30 +08:00
Zheeeng
572ae5ce14 Bugfix issue.9862 (#10052)
* Fix issue 9862

* Update Card test snapshot
2018-04-20 10:44:33 +08:00
Dmitry Gladkikh
0d0632b2f3 Add getPopupContainer method decl to MenuProps interface (#10158)
* add getPopupContainer to MenuProps

see https://github.com/ant-design/ant-design/issues/10145

* Update getPopupContainer signature of MenuProps

* getPopupContainer prop is optional
2018-04-19 20:33:12 +08:00
Zheeeng
069e9207a9 Swap positions between List.footer and List.pagination (#10045)
* Swap positions between List.footer and List.pagination

* Update List test snapshots
2018-04-19 13:48:55 +08:00
afc163
649d733048 fix snapshot ci 2018-04-19 11:54:44 +08:00
Wu Haotian
7eb2792072 fix typing for Upload.beforeUpload (#10059)
* fix typing for `Upload.beforeUpload`
fix #9775

* add RcFile interface, fix tests

* fix typing of `Upload.onStart`
2018-04-19 11:54:28 +08:00
Zheeeng
d0d69fbf13 Remove useless style (#10054) 2018-04-19 11:50:28 +08:00
Wei Zhu
61e4f8011a Remove sCU from Form (#10029)
Related #9790

Form and Form.Item are not considered as pure components
2018-04-19 11:49:50 +08:00
Zen
d7f9270a6f fix button/demo/disabled.md (#10009)
add `ghost` property to ghost buttons
2018-04-19 11:43:22 +08:00
afc163
a7513bfac1 fix stylelint 2018-04-19 11:40:58 +08:00
davidhatten
74d1c5e6b6 Add collapse styles to default.less (#9943)
* push collapse styling into overridable defaults

* Changes to ensure backwards compatibiliy, switch bg-color to be based on default style

* change background-color to bg in style names

* simplify and consolodate content-padding

* I figured out why the styling is split across content and box like that

The collapse/show animation doesn't work right without the padding set up across the two elements like this. From an end-user point of view, I think this is the easiest thing.

* pushing all padding styling on to the box instead of the content, keeping var name the same because the end user doesn't need to know the difference

* Pushing header-bg-color back up to the top of the component heirarchy

* shorten content padding
2018-04-19 11:36:53 +08:00
afc163
f0660836b7 fix snapshot ci 2018-04-19 11:34:19 +08:00
afc163
61502ef942 Fix form demo error in IE9 2018-04-18 14:08:06 +08:00
afc163
04b3aad451 Fix menu arrow style of disabled, close #10113 2018-04-18 13:47:40 +08:00
afc163
2604623b7e fix showInfo when precent is out of range 2018-04-18 11:10:32 +08:00
afc163
0eb835772d Fix invalid progress like <Progress precent={120} /> 2018-04-18 10:45:07 +08:00
Dmitry Manannikov
c0e60f8097 Fix wrong List property (#10123) (#10128)
This diff excludes `locale` from `rest` variable to
avoid passing to div.

Close #10123
2018-04-18 00:15:22 +08:00
Zheeeng
05a522c343 Update ButtonType (#10129) 2018-04-17 23:54:55 +08:00
刘红
ee4f788ae0 添加BMP的支持 (#10110) 2018-04-17 14:44:43 +08:00
Jin ZHANG
f3f3c63c30 fix class for week date render (#10081) 2018-04-17 13:50:27 +08:00
afc163
3b00cf8971 Fix image when file.url has query or hash
close #10102
2018-04-17 13:49:03 +08:00
何志勇
7e8295769a Markdown error (#10100)
There are six preset values, not five
2018-04-17 10:50:14 +08:00
Pierre
09fec16b6f [TS] AutoComplete : Make dataSource optional (#10077)
When using children :
https://ant.design/components/auto-complete/#components-auto-complete-demo-options
2018-04-16 17:42:31 +08:00
Wei Zhu
1a26268bd5 Remove duplicate SpinSize 2018-04-16 15:02:03 +08:00
诸岳
265770b4e3 Fix incompatible type error for Spin[size] prop, close #10053 (#10055) 2018-04-16 14:44:42 +08:00
Rallets
8157be2f4a Add files via upload (#10068) 2018-04-16 14:16:43 +08:00
Albert 理斯特
b7411febce A: 新增关于 childrenColumnName 的文档,fix #9035 (#10062) 2018-04-16 13:26:33 +08:00
Ed Moore
31e50e50b6 Fix types (#10063)
* Fix types

Fix https://github.com/ant-design/ant-design/issues/8796

* Fix exported types
2018-04-16 10:58:17 +08:00