Compare commits

..

920 Commits

Author SHA1 Message Date
afc163
1a505e8fb0 Merge branch 'master' of github.com:ant-design/ant-design 2017-09-30 00:04:50 +08:00
Jeffrey Carl Faden
9ab9e62308 Add inputPrefixCls for Search component (#7770) 2017-09-30 00:04:19 +08:00
afc163
819e55e968 update snap 2017-09-29 23:10:27 +08:00
afc163
22860b9e87 2.13.4 2017-09-29 22:40:43 +08:00
偏右
44da4049f6 Changelog for 2.13.4 (#7785)
* changelog for 2.13.4

* emojis

* Add english changelog

* emojis
2017-09-29 21:47:01 +08:00
niko
9dc4102cdd fix: should trigger onChange before beforeUpload 2017-09-29 03:52:16 -05:00
Graeme Yeates
47e3cedf86 Minor fixes for select and form en docs (#7769)
* Fix headers on form validateFields [ci skip]

* Include default as an option for select sizes [ci skip]
2017-09-29 10:54:37 +08:00
ddcat1115
3b6dc3f3c4 revert wrong code removing fd40643c2d 2017-09-28 17:28:49 +08:00
Wei Zhu
9b68ce020c docs: fix table 2017-09-28 14:26:01 +08:00
Amorites
e17c8e093e Update index.zh-CN.md (#7755) 2017-09-27 21:15:05 +08:00
afc163
caec11c03a Fix snapshot 2017-09-27 20:21:28 +08:00
afc163
ca255cc547 Tweak AutoComplete input line height 2017-09-27 20:13:01 +08:00
jayberg
4acadc47b5 Avoid circular reference with infinite children (#7742)
Because {element} is a child of <InputElement>, we get a circular reference when also adding "element.props" to <InputElement>, as <InputElement> will be cloned to <{element}> within InputElement.tsx. As a consequence, we get an infinitive circular loop of Element->Props->Children->Element->Props->Children->Element->Props->Children->…

React seems to detect and automatically fix this infinitive loop. But when using the smaller and faster Inferno as a replacement library of React, we get a "RangeError: Maximum call stack size exceeded".

This commit fixes this bug by not attaching {...element.props} to <InputElement>.

All tests did pass and I did not notice any changes in the behaviour of the AutoComplete component. But now, AutoComplete works also with Inferno and not only with React.
2017-09-27 20:09:04 +08:00
afc163
d7eca4e151 Fix table's filter dropdown style 2017-09-27 20:03:26 +08:00
delesseps
a8cab96c13 Add maxLength attribute to Input (#7744) 2017-09-27 09:57:23 +08:00
778758944
4e726fdfd7 修复disabledTime interface定义错误 (#7740) 2017-09-26 16:11:28 +08:00
afc163
9f017bc5ae Fix mention error style 2017-09-25 22:53:11 +08:00
afc163
ccf507b603 update mention demos 2017-09-25 22:42:07 +08:00
afc163
f545e52ec5 Fix dropdown menu group title style 2017-09-25 21:28:00 +08:00
afc163
8026020dd4 Fix column sorter icons style 2017-09-25 21:24:43 +08:00
afc163
463a5db9ba Fix transfer checkbox padding 2017-09-25 20:03:04 +08:00
thegatheringstorm
10f6907da4 Fix: Upload Use object destructuring instead of creating temporary references for onRemove. (#7726) 2017-09-25 18:15:36 +08:00
afc163
3118e2898e Fix broken small pagination via #7634's fix 2017-09-25 16:59:56 +08:00
Miaow
6c38ca62c6 update get started doc port (#7729) 2017-09-25 16:59:40 +08:00
偏右
14b44c880e Update utils.jsx 2017-09-25 14:15:06 +08:00
afc163
8bff515287 Merge branch 'master' of github.com:ant-design/ant-design 2017-09-25 11:13:09 +08:00
afc163
fd40643c2d Remove unused code 2017-09-25 11:12:59 +08:00
Guan Yu Pan (Jacky)
c30c156c56 upgrade rc-animate to 2.4.1 (#7724) 2017-09-25 11:06:25 +08:00
Benjy Cui
f433382180 site: fix tnpm run deploy 2017-09-25 10:39:45 +08:00
Wei Zhu
e672f41e1e Use promise 2017-09-25 10:00:19 +08:00
afc163
29c262ab36 Remove iview and atui from antd implementations 2017-09-23 19:59:04 +08:00
afc163
6ded879619 update changelog 2017-09-23 19:28:40 +08:00
Zheeeng
d8c1bdb3ab Fix: setting 'heigh: 100%' on Sider and the wrapped element can't take the desired effects (#7716) 2017-09-23 18:33:26 +08:00
afc163
89a6aa96ed Tweak input placeholder color, close #7365 2017-09-23 18:21:33 +08:00
afc163
df1b1f5a47 Add @checkbox-size, close #7368 2017-09-23 18:18:47 +08:00
afc163
dd22bae0fc Fix button loading style with icon, close #7709 2017-09-23 16:08:30 +08:00
Sanjay Kumar
1dc4e45bce Bugfix: Handle defaultSearchChange when suggestions contain ‘Nav’ items (#7701) 2017-09-22 23:51:59 -05:00
afc163
8b1a4f80a9 Fix TreeSelect extra input text, close #7703 2017-09-23 12:11:17 +08:00
afc163
91bbcd6f2c Fix broken anchor, close #7712 2017-09-23 12:06:23 +08:00
Aske Ertmann
27b8e39666 Make iconfont usable standalone (#7713)
Similar to motion.less, import all dependencies needed to generate iconfont.less by itself.
2017-09-23 12:01:21 +08:00
afc163
7cfd9b2bcb Remove extra update 2017-09-22 21:47:28 +08:00
afc163
c66062edb4 Fix input compact style 2017-09-22 20:35:30 +08:00
afc163
776beaee05 Fix cursor height in safari 2017-09-22 20:17:04 +08:00
Benjy Cui
bdecb4ebd9 bump 2.13.3 2017-09-22 17:49:16 +08:00
Benjy Cui
9ec8f66c4d docs: add changelog for 2.13.3 (#7702) 2017-09-22 04:47:45 -05:00
afc163
c2e9abddc7 Fix Card extra postion when no title 2017-09-22 15:28:27 +08:00
Benjy Cui
e8f61f11ef site: update config syntax 2017-09-22 14:00:04 +08:00
delesseps
c419a1ddef Remove autoComplete restriction to allow more complex auto-filling behaviour (#7699) 2017-09-22 13:35:26 +08:00
Marco Afonso
81435e2798 feat: add Portuguese locale (#7449)
* Add pt_PT Locale

* Adding pt_PT Locale (fix comma)

* Adding pt_PT Locale to docs

* Add pt_PT locale to tests

* Update imports for rc-pagination and rc-calendar

* Add pt_PT Locale

* Adding pt_PT Locale (fix comma)

* Adding pt_PT Locale to docs

* Add pt_PT locale to tests

* Update imports for rc-pagination and rc-calendar

* Add pt_PT to tests
2017-09-21 21:02:01 -05:00
Kirill Stiopin
49080aa01d fix: update for Dutch locale-provider: added missing translations (#7694) 2017-09-21 20:57:52 -05:00
afc163
17044043dc fix conflict 2017-09-21 21:08:57 +08:00
afc163
3d1914f45b Fix valid selector error of form, close #7693 2017-09-21 21:07:21 +08:00
afc163
5d7ef9d889 fix site 2017-09-21 19:03:38 +08:00
paranoidjk
38b889f00c chore: fix site net check img 2017-09-21 18:26:31 +08:00
afc163
27e4f1b658 Fix Tree showLine style 2017-09-21 18:15:10 +08:00
afc163
7c8e55f0db docs: update i18n 2017-09-21 16:50:47 +08:00
afc163
d21e500fab Add some doc for global reset styles, #4331 2017-09-21 16:44:49 +08:00
afc163
afce275d25 refactor code style 2017-09-21 14:16:01 +08:00
Yang Bin
39993fc749 docs: modify "tar bar" to "tab bar" in table Tab API (#7683) 2017-09-20 21:06:53 -05:00
Meow-z
e165b8a705 fix: model (#7675)
add confirmLoading in async model state.
2017-09-20 09:22:53 -05:00
afc163
635a0548de Tweak input compact layout, close #7662 2017-09-20 16:46:37 +08:00
afc163
30abcdf992 Fix table head height, close #7663 2017-09-20 15:42:31 +08:00
偏右
0ffccf8b0f Provide a debug way of preact compatibility (#7670)
* try preact

* Add start:preact to scripts

* fix webpack.config.js
2017-09-20 14:57:48 +08:00
afc163
8904b50720 update changelog 2017-09-19 22:19:58 +08:00
Benjy Cui
f46a87d3e0 fix: should use fixedNode's height to reset placeholder, close: #2349 2017-09-19 16:31:37 +08:00
afc163
5b6b36f5d6 Add map components to recommended list 2017-09-19 11:10:24 +08:00
feng zhi hao
58fd54e978 fix: Table not trigger custom selection onSelect when hideDefaultSelections is true (#7653) 2017-09-18 20:56:19 -05:00
hauwa123
acd3a8f4d2 docs: update Timeline english doc (#7652)
Fixed typos
2017-09-19 00:46:09 +08:00
Wei Zhu
ed2303a5da Change primary color in browser (#7516) 2017-09-18 17:31:48 +08:00
Kaien Liao
b2aea45b4f fix: Checkbox props definition (#7649), close: #7650 2017-09-18 15:40:25 +08:00
Benjy Cui
bd19b0892c docs: add missing Tabs.TabPane[forceRender], ref: #6459 2017-09-18 11:05:43 +08:00
Khalifa Lame
5a8bd0f6d8 docs: update Tooltip english doc (#7642)
Fixed typos.
2017-09-18 10:28:22 +08:00
Khalifa Lame
f3c35941ec docs: update Table english doc (#7643)
Fixed typos.
2017-09-18 10:28:05 +08:00
Khalifa Lame
a3d4b753b9 docs: update Tab english doc (#7644)
Fixed typos.
2017-09-18 10:27:49 +08:00
Khalifa Lame
fab83990c2 docs: update Tag english doc (#7645)
Fixed typos.
2017-09-18 10:27:35 +08:00
afc163
43d14f8517 upgrade rc-slider, improve accessibility 2017-09-17 17:42:24 +08:00
爱but的苍蝇
644891f8f6 add Table scroll typings (#7640) 2017-09-17 15:44:01 +08:00
afc163
c5f56b9db3 optimize TextArea autosize animation 2017-09-17 13:48:16 +08:00
nikogu
b651579c1b update version 2.13.2 2017-09-17 01:15:41 +08:00
nikogu
95245c21a7 bump 2.13.2 2017-09-17 00:56:30 +08:00
Shubham Kanodia
989b2e2041 Added react and react-dom as peerDeps (#7592)
* Added react and react-dom as peerDeps

* Added react ~0.14.0 as a valid peerDependency
2017-09-16 23:44:20 +08:00
afc163
30c437c83e Fix simple pagination style, close #7634 2017-09-16 13:20:35 +08:00
Khalifa Lame
429a9714d5 Update Avatar English doc (#7627)
fixed typos.
2017-09-16 11:29:51 +08:00
Khalifa Lame
81e3429955 Update Badge English doc (#7628)
* Update Badge English doc

Fixed typos.

* Update index.en-US.md

Reverted some changes after studying the component.
2017-09-16 11:29:38 +08:00
Khalifa Lame
05fbdd0959 Update Calendar English doc (#7629)
Fixed typos.
2017-09-16 11:29:05 +08:00
Khalifa Lame
a4637526b9 Update Card English doc (#7630)
Fixed typos.
2017-09-16 11:28:18 +08:00
Khalifa Lame
11c0683baa Update Carousel English doc (#7631)
Fixed typos.
2017-09-16 11:27:46 +08:00
Khalifa Lame
eb663f0084 Update Collapse English doc (#7632)
Fixed typos.
2017-09-16 11:27:15 +08:00
Khalifa Lame
fdfb4ba843 Update Popover English doc (#7633)
Fixed typos.
2017-09-16 11:26:22 +08:00
afc163
ea2c113530 Fix zIndex types, ref #7624 2017-09-15 22:51:03 +08:00
afc163
11a6cd51a2 Fix zIndex types, close #7622 2017-09-15 21:41:32 +08:00
afc163
5f938a6818 update template.html 2017-09-15 21:40:13 +08:00
afc163
641f1ddeeb Add link 2017-09-15 21:37:17 +08:00
afc163
f36bc02ac3 Add next.js demo link 2017-09-15 21:14:29 +08:00
afc163
6236641c74 Fix broken collapsed MenuGroup, close #7109 2017-09-15 20:37:11 +08:00
Wei Zhu
250c7a9c68 Revert "Mock rc-trigger"
This reverts commit 9d2c91598b.
2017-09-15 16:42:25 +08:00
Wei Zhu
9d2c91598b Mock rc-trigger
Ref #5522
2017-09-15 16:14:26 +08:00
afc163
9df6e06d70 fix lint 2017-09-15 11:14:22 +08:00
afc163
5ac468167d Fix title and extra content position of narrow card
close #7604
2017-09-15 10:57:08 +08:00
afc163
b36df9da2b update tree controlled demo 2017-09-15 10:57:07 +08:00
Wei Zhu
6acf6fc643 Use snapshot test for grid 2017-09-15 10:56:00 +08:00
Wei Zhu
2437ca419e Use snapshot test 2017-09-15 10:50:45 +08:00
afc163
eb62c44564 Fix #7587 2017-09-15 09:55:00 +08:00
afc163
9e319990d2 update snapshot 2017-09-14 18:09:30 +08:00
afc163
ae87b663bf Tweak tree demo 2017-09-13 22:18:44 +08:00
afc163
89ce2254af Improve tree node loading icon position, close #7584 2017-09-13 22:17:13 +08:00
afc163
77d64971e5 Refactor tree loadData demo 2017-09-13 22:06:53 +08:00
afc163
461470ebc6 fix demo snapshot 2017-09-13 19:43:05 +08:00
afc163
9b715f0b90 Fix form demo, close #7547 2017-09-13 18:03:56 +08:00
Mitchell Demler
298a60f13b chore: add validateFirst to fieldDecorator options (#7573) 2017-09-13 14:49:59 +08:00
afc163
f321596e04 Revert empty style of table
ref #7142

close https://github.com/react-component/table/issues/163
2017-09-13 14:26:02 +08:00
偏右
e57cf5ff80 Update README.md 2017-09-12 19:00:09 +08:00
jljsj
aea18c3627 add padding !important, restore menu retraction animate
Conflicts:
	components/menu/style/index.less
2017-09-12 16:51:17 +08:00
Wei Zhu
2a4adeef46 Upgrade antd-tools 2017-09-12 11:51:43 +08:00
Bilal Sirazitdinov
5bb45279bb chore: GetFieldDecoratorOptions missing property - normalize (#7562) 2017-09-12 09:08:47 +08:00
afc163
9f484f9bf0 react-codemirror => react-codemirror2 2017-09-11 16:24:09 +08:00
afc163
bb2c2036ba update button size demo 2017-09-11 15:29:23 +08:00
Wei Zhu
1cdf0d9141 Fix issue link 2017-09-11 14:39:38 +08:00
Benjy Cui
eddd1db3e9 site: fix config, ref: a73d0504 2017-09-11 13:55:00 +08:00
Wei Zhu
c2031f701c Document Select[firstActiveValue] 2017-09-11 12:00:15 +08:00
Wei Zhu
8369557322 Add remove warning comment (#7510) 2017-09-11 11:58:38 +08:00
afc163
33a71eb8fb Fix #7555 2017-09-11 11:46:09 +08:00
Wei Zhu
a5b20dcb82 Add missing Select[firstActiveValue] changelog 2017-09-11 11:31:26 +08:00
Khalifa Lame
ed84626f01 docs: update Popconfirm English doc (#7541)
Fixed typos.
2017-09-11 11:08:53 +08:00
Khalifa Lame
aa3458deb6 docs: update Notification English doc (#7539)
Fixed numerous typos and inconsistencies.
2017-09-11 11:08:34 +08:00
Khalifa Lame
b381f1f5ec docs: update Modal English doc (#7537)
Fixed several typos.
2017-09-11 11:08:18 +08:00
Khalifa Lame
643b32d0d3 Update Progress English doc (#7540)
Fixed minor typos.
2017-09-11 10:13:21 +08:00
ddcat1115
d5b6cc70cd 2.13.1 CHANGELOG 2017-09-11 00:02:05 +08:00
Khalifa Lame
b475ac55f6 Update Spin English doc (#7542)
Fixed some typos.
2017-09-10 21:49:37 +08:00
Khalifa Lame
594dce8f87 Update Message English doc (#7538)
Fixed typos.
2017-09-10 21:47:02 +08:00
Khalifa Lame
ac95d1aea4 Update Alert English doc (#7536)
Minor edits.
2017-09-10 21:40:07 +08:00
Xiaohan Lee
d490a027bb Docs: update docs for Table's undocumented apis (#7525)
* onRowMouseEnter
* onRowMouseLeave
2017-09-10 21:38:25 +08:00
ddcat1115
66a89df91f fix #7475 (#7535) 2017-09-10 13:50:21 +08:00
afc163
b216a44b28 Fix Slider typings, close #7532 2017-09-10 02:32:00 +08:00
afc163
37c8c4ed30 Fix @link-hover-decoration not working, close #7531 2017-09-09 13:58:18 +08:00
afc163
35fc427630 Fix inlineCollapsed menu when submenu is opened
close #7524

close #7514

ref #7063
2017-09-09 00:58:15 +08:00
afc163
2feef3358c Fix transfer lazy doc, close #7520 2017-09-09 00:00:24 +08:00
afc163
dbc4e684df Make popover title height more flexible 2017-09-08 16:47:04 +08:00
afc163
e77108c775 site: update page background 2017-09-08 13:44:52 +08:00
afc163
fb8fec6d3a site: remove font smoothing style 2017-09-08 13:36:10 +08:00
Benjy Cui
30745da52e docs: update typo, close: #7427 2017-09-08 10:12:34 +08:00
Khalifa Lame
a2eb54b1ae docs: update Dropdown English doc (#7442)
Fixed typos
2017-09-08 10:09:11 +08:00
chencheng (云谦)
e1efb82dcb docs: update Practical Projects for dva@2 (#7505) 2017-09-08 09:51:31 +08:00
Khalifa Lame
421feb1c84 docs: update Pagination English doc (#7494)
Fixed typos.
2017-09-08 09:45:56 +08:00
Khalifa Lame
fa1547df84 docs: update Menu English doc (#7465)
* Update Menu English doc

Fixed typos.

* Update Menu English doc

Accidentally replaced noop with none in previous commit. Now reverted.
2017-09-08 09:45:01 +08:00
Khalifa Lame
224e65fc27 docs: update Breadcrumb English doc (#7490)
Fixed minor typos.
2017-09-08 09:43:43 +08:00
Khalifa Lame
1746e1f0d7 docs: update Grid English doc (#7487)
Fixed several typos.
2017-09-08 09:42:08 +08:00
Khalifa Lame
0a583afc5c docs: update Affix English doc (#7488)
Fixed minor typos.
2017-09-08 09:40:40 +08:00
afc163
072d860f8a Fix empty style of small table with fixed columns
close #7509
2017-09-07 21:08:05 +08:00
WingGao
ace985afce Update upload/interface.tsx (#7507)
`response` should be `any`
2017-09-07 15:12:13 +08:00
afc163
b8f6185abc Fix simple pagination style, close #7500 2017-09-06 21:44:26 +08:00
afc163
c7d6ce5d3f Fix Card.Grid broken style
https://gw.alipayobjects.com/zos/rmsportal/ZHuiCHkDSxOZZmZSbmXD.png
2017-09-06 21:14:16 +08:00
afc163
bceed31da4 update form demo snap 2017-09-06 20:18:48 +08:00
afc163
94283b730f Fix validateStatus styles of some Form Controls, close #7498 2017-09-06 20:17:20 +08:00
afc163
16b2cc044e validating status should has feedback icon always, #7498 2017-09-06 19:58:04 +08:00
afc163
7d619dfbd7 update snapshot for #7495 2017-09-06 19:39:46 +08:00
afc163
121898001d update snapshot 2017-09-06 14:28:20 +08:00
afc163
e9a592a9c8 Fix inlineCollpasd and openKeys issue 2017-09-06 14:14:34 +08:00
afc163
786f5cd7e0 improve side current menu demo 2017-09-06 13:59:44 +08:00
afc163
696b4252a8 tweak collpse animation easing 2017-09-06 13:46:45 +08:00
Benjy Cui
59193ef34a Revert "Patch 1 (#7471)"
This reverts commit 9667ec17bd.
2017-09-06 09:46:58 +08:00
paranoidjk
a73d0504ca site: dev use uncompressed bundle. close #7383 (#7472) 2017-09-06 09:19:35 +08:00
kuang
9667ec17bd Patch 1 (#7471)
* default value error 

f10a2abbd8/src/Modal.tsx (L53)

* default value error
2017-09-05 19:07:57 +08:00
Khalifa Lame
f48cf1df90 docs: update Steps English doc (#7463)
Added code tags to string values.
2017-09-05 16:50:27 +08:00
Khalifa Lame
112aaed5fb docs: update Layout English doc (#7461)
Fixed typos.
2017-09-05 16:48:23 +08:00
afc163
8cc1943b77 test: update snap 2017-09-05 15:58:49 +08:00
afc163
cb1e0bfe8e Fix table empty data scroll style
close #7457
2017-09-05 15:57:34 +08:00
afc163
6654a4220d Fix submenu hover style 2017-09-05 11:31:00 +08:00
Khalifa Lame
8551b706cf Update Card English doc (#7440)
Fixed typo
2017-09-04 21:02:03 +08:00
Khalifa Lame
ec2322a906 Update Icon English doc (#7441)
Fixed small typo.
2017-09-04 21:01:48 +08:00
Khalifa Lame
5510d12ce8 docs: update Input English doc (#7439)
Fixed some typos
2017-09-04 15:24:08 +08:00
Khalifa Lame
8271b5d069 docs: update Button English doc (#7438)
Fixed some typos. Added ghost button type.
2017-09-04 15:23:42 +08:00
Wei Zhu
c651c7a04f Fix typo 2017-09-04 14:30:27 +08:00
afc163
6cb3ae46a2 site: update color picker position 2017-09-04 12:24:40 +08:00
afc163
24e2af63f2 site: update footer style 2017-09-04 11:55:45 +08:00
Khalifa Lame
99a998afb5 docs: update Table english doc (#7432)
Fixed numerous typos
2017-09-04 10:47:37 +08:00
Wei Zhu
319fa7c82d Bump 2.13.0 2017-09-03 22:55:41 +08:00
Wei Zhu
35229e55b1 Update snapshot for 9423609 2017-09-03 22:38:21 +08:00
Wei Zhu
156c933235 Add 2.13.0 changelog (#7418) 2017-09-03 22:16:54 +08:00
Wei Zhu
471da70c1e site: Add a primary color change button (#7401) 2017-09-03 22:15:33 +08:00
afc163
9423609243 Tweak collapse style 2017-09-03 18:24:22 +08:00
afc163
07dfac18f7 Tweak table small border style 2017-09-01 18:30:47 +08:00
afc163
7b56d7248f Fix conditional rendering of Timeline.Item, ref #6530 2017-09-01 17:06:30 +08:00
afc163
668cec2f9e Fix FormItem focus behavious, close #7351 2017-09-01 15:17:04 +08:00
Wei Zhu
1547b889b7 Revert "Add support for table default sort order" (#7414) 2017-09-01 14:40:29 +08:00
Wei Zhu
bac4d04844 docs: typo 2017-09-01 11:35:30 +08:00
Wei Zhu
ad3e49e397 docs: Add backfill to AutoComplete 2017-09-01 11:33:11 +08:00
afc163
882ae31199 Fix menu inlineCollapsed under uncontrolled Sider, close #7409 2017-09-01 10:38:53 +08:00
LeezQ
6954c3506c docs: add typescript demo (#7330)
* feat: add typescript demo

add form typescript demo code

* Update index.zh-CN.md

* add TypeScript demo code

add TypeScript demo code

* Update index.en-US.md

* Update index.zh-CN.md

* Update index.en-US.md
2017-09-01 10:36:31 +08:00
afc163
a204c0afa2 restore default cursor, close #7410 2017-09-01 10:04:25 +08:00
Ricardo Raphael Joson
bedfb180a8 Update index.en-US.md (#7403) 2017-08-31 17:13:28 +08:00
偏右
81f16cb2e0 Merge pull request #7400 from ant-design/feature-2.13
Feature 2.13
2017-08-31 16:02:04 +08:00
afc163
d8aef384d3 fix doc 2017-08-31 15:50:46 +08:00
afc163
a3e723648b upgrade react-slick to 0.15.0 2017-08-31 12:20:10 +08:00
Manweill
dc1d0af64e 官网首页的搜索框,当按下键盘s的时候,会获取焦点 (#7267)
* 官方首页的搜索框,当按下键盘s的时候,会获取焦点

* use AutoComplete

* 移除 this.state.focused

* bugfix
2017-08-31 11:47:53 +08:00
afc163
a0a1bff7fe Use real count as badge title 2017-08-31 10:55:25 +08:00
afc163
843d82f6bd fix demo sanpshot 2017-08-30 14:24:47 +08:00
afc163
90c1dfc5c0 fix demo sanpshot 2017-08-30 14:22:18 +08:00
afc163
9547fe5bc4 fix demo sanpshot 2017-08-30 14:21:20 +08:00
afc163
81048aafb2 Improve itemRender of Pagination 2017-08-30 14:03:37 +08:00
afc163
96dd7132e8 Merge branch 'master' into feature-2.13 2017-08-30 13:22:38 +08:00
afc163
56b6fc38d7 fix sider layout min height 2017-08-29 23:58:27 +08:00
afc163
3ceda311b6 menu cannot be selectable in dropdown defaultly 2017-08-29 19:55:09 +08:00
afc163
7fed87f835 doc: fix undocumented selectable prop of Menu 2017-08-29 19:45:13 +08:00
John Nguyen
6c509f9712 adds selectable prop to typescript file (#7384) 2017-08-29 19:42:55 +08:00
afc163
c23afb05d0 Fix test case 2017-08-29 19:41:59 +08:00
afc163
fe09eec9aa improve empty cell style 2017-08-29 17:55:50 +08:00
afc163
2bedd6b0e6 Improve spin transition delay 2017-08-29 16:39:29 +08:00
afc163
a5733f5de3 Fix RangePicker text overlap 2017-08-29 15:08:06 +08:00
John Nguyen
3b6ea67115 adds className to DropDown component" (#7378) 2017-08-29 13:27:38 +08:00
Leo
fc8f533e67 fix ts checking (#7355)
* add title prop to Option component(for ts checking)

* fix Checkbox onChange type
2017-08-29 08:58:51 +08:00
XBTop1!
a5b0848efe doc: add disableCheckbox property for TreeSelect (#7370) 2017-08-29 08:35:49 +08:00
afc163
bc3a285e64 update changelog 2017-08-28 00:49:49 +08:00
afc163
1e48ec0c6a Merge branch 'master' into feature-2.13 2017-08-27 19:31:09 +08:00
afc163
eb21c93d3d fix changelog 2017-08-27 19:25:04 +08:00
afc163
62cbe9e064 fix changelog 2017-08-27 19:21:17 +08:00
afc163
65c86e60ce fix hash jump again 2017-08-27 19:03:36 +08:00
偏右
156ce90a8e 2.12.8 (#7346)
* 2.12.8

* use emoji
2017-08-27 18:57:24 +08:00
afc163
a94e3ab3e0 Add test case for empty table 2017-08-27 17:30:29 +08:00
afc163
6527f9cdb0 More elegant empty style for fixed-columns Table
close #7298

close #7142
2017-08-27 17:30:29 +08:00
偏右
742999ff28 Fix matchMedia not present in jest test (#7344)
close #6560

close #3308

close #7341
2017-08-27 16:53:36 +08:00
afc163
d84452e8b8 Fix snapshot generate, close #7318 2017-08-27 16:07:07 +08:00
偏右
a7200c906c Add hideDefaultSelections (#7342)
close #7295
2017-08-27 15:44:22 +08:00
afc163
7e2d456453 Fix ci 2017-08-27 14:43:23 +08:00
afc163
53ffc83d23 Fix snapshot 2017-08-27 14:10:29 +08:00
afc163
ef8beaffde Merge from master 2017-08-25 22:51:14 +08:00
afc163
d9ef06496d typo 2017-08-25 22:50:19 +08:00
偏右
e0699597ca Use create-react-app without ejecting (#7276) 2017-08-25 22:14:34 +08:00
afc163
21f375b7d7 update TreeSelect doc 2017-08-25 17:20:43 +08:00
ddcat1115
83a02a6050 fix demo (#7327) 2017-08-25 16:37:00 +08:00
afc163
6dade37aec update doc 2017-08-25 14:54:54 +08:00
Peter
275bdaef1a Update recommendation.zh-CN.md (#7310) 2017-08-25 12:04:13 +08:00
kdepp
c9b3a50519 doc: optimize compatibility part (#7322) 2017-08-25 10:41:37 +08:00
afc163
3d322a7c04 Tweak tooltip background and fix basic demo 2017-08-25 10:11:22 +08:00
afc163
0d26b4c972 doc: update Upload API description 2017-08-24 18:37:26 +08:00
XuMM_12
35bc4726a9 Fix Checkbox Group disabled status (#7266) (#7296) 2017-08-24 12:56:25 +08:00
afc163
d0d6e10894 Fix node test again 2017-08-24 10:19:13 +08:00
afc163
c355eae6d1 Fix node test 2017-08-24 10:05:55 +08:00
afc163
61aac68028 doc: remove new key way 2017-08-24 09:44:17 +08:00
afc163
44319bec11 active the selected item should be highlighted 2017-08-23 18:16:52 +08:00
afc163
ef43be1c67 remove incompatiable jsdom version 2017-08-23 17:08:45 +08:00
Ziluo
f04f340fa1 doc:update link of react-blocks (#7299) 2017-08-23 16:36:07 +08:00
Ziluo
fc884242d8 doc:update link of react-blocks (#7299) 2017-08-23 16:34:15 +08:00
afc163
036aeb333d fix jsdom in devDeps 2017-08-23 16:31:15 +08:00
afc163
72f7232929 Add test cases for Card and Breadcrumb 2017-08-23 16:29:56 +08:00
afc163
8bdad3d418 update less code style 2017-08-23 13:57:01 +08:00
afc163
640fcc51e8 upgrade rc-pagination, no new API for antd 2017-08-23 13:46:55 +08:00
Tao
62b72d6c51 modify 参数 to 方法 (#7294)
* modify `参数` to `方法`

* modify `Property` to `Method`

* dummy copy-paste
2017-08-23 13:25:44 +08:00
afc163
ac5bdc6983 doc: update select description 2017-08-23 13:17:43 +08:00
Benjy Cui
2268418a97 docs: add docs for validateFields, close: ##7287 2017-08-23 11:13:01 +08:00
afc163
a51a37cbd8 tweak detail of inline collapse menu 2017-08-22 18:37:08 +08:00
afc163
1fdce5db28 Fix tabs snapshots 2017-08-21 21:02:09 +08:00
afc163
50bdbbda40 Add multiple demo for TreeSelect 2017-08-21 18:08:41 +08:00
Benjy Cui
55f58cf59f bump 2.12.7 2017-08-21 10:00:00 +08:00
Benjy Cui
789e45fd52 docs: add change log for 2.12.7 (#7254) 2017-08-21 09:58:02 +08:00
afc163
84e561b237 Fix removing wrong item when uid is 0, close #7269 2017-08-20 15:39:25 +08:00
山客
ac07dcefb0 Update Table Document (#7268)
Fix syntax errors(markdown table).
2017-08-20 15:15:38 +08:00
afc163
d4171badfd Merge from master 2017-08-19 12:40:40 +08:00
afc163
ff7ba0fb6f upgrade antd-tools and use next over beta, ant-design/antd-tools#57 2017-08-19 12:26:25 +08:00
afc163
fcb935b101 improve form doc 2017-08-19 12:12:57 +08:00
lihqi
6624805ad4 Update index.en-US.md (#7259) 2017-08-18 19:19:10 +08:00
lihqi
5bf94956e4 Update index.zh-CN.md (#7258) 2017-08-18 19:19:02 +08:00
Wei Zhu
7b1df54523 Config jest transform ignore path 2017-08-18 18:47:47 +08:00
afc163
f56e1a7de7 Fix InputNumber id ts type, close #7257 2017-08-18 18:17:06 +08:00
Wei Zhu
145ed77c00 fix: form type (#7245) 2017-08-18 17:21:18 +08:00
Benjy Cui
723da5e164 test: fix CI 2017-08-18 17:20:07 +08:00
Benjy Cui
f089d1852d chore: remove useless deps, and close: #4451 2017-08-18 15:00:21 +08:00
afc163
f77c38bddf fix snap 2017-08-18 12:17:07 +08:00
afc163
7b8090d279 upgrade antd-tools 2017-08-18 12:10:53 +08:00
afc163
e00bfdc150 Make Input with addons same default width 100% with Input 2017-08-18 12:09:17 +08:00
afc163
988e12f54b tweak some font weight 2017-08-17 22:10:40 +08:00
afc163
187e9dd85c tweak step number font 2017-08-17 21:51:25 +08:00
afc163
b216597cfd Fix card grid bug 2017-08-17 17:20:28 +08:00
LeezQ
d329d191dd docs: interface define error (#7241)
fix: interface Properties should be separated by semicolons
2017-08-17 16:24:18 +08:00
lvren
a93cb09e15 将sider收起时的宽度变量放到themes中控制 (#7238) 2017-08-17 16:09:04 +08:00
Benjy Cui
e061ada71a test: fix CI 2017-08-17 15:33:26 +08:00
Benjy Cui
9abce572a4 fix: notification.xxx shoud not affect defualtPlacement, close: #5895 2017-08-17 15:23:47 +08:00
Benjy Cui
26d746bd8f fix: should support child.ref in AutoComplete, close: #6814 (#7237) 2017-08-17 13:09:18 +08:00
afc163
f9273bc95a remove repeat hash jump 2017-08-17 11:51:14 +08:00
afc163
01d4acb7a9 Attach more events for Affix display 2017-08-17 11:45:46 +08:00
afc163
fe3af14273 Remove exported SelectPropTypes and fix undefined exports, close #7222 2017-08-17 09:57:23 +08:00
Ramsés Moreno
20ea524ef1 fix: corrections in the Spanish locale (#7234)
* Corrections in the Spanish locale. In Spanish, the only uppercase letter in a sentece is the first letter and not in every word. Some othe minor changes.

* Corrections in the Spanish locale. In Spanish, the only uppercase letter in a sentece is the first letter and not in every word. Some othe minor changes.
2017-08-17 09:36:52 +08:00
afc163
ea92bbf371 fix snap 2017-08-16 22:04:16 +08:00
afc163
f61f811432 Fix sider width transition in IE11
close #6349
2017-08-16 21:46:09 +08:00
afc163
70e10dee59 Fix transition width of sider trigger 2017-08-16 21:46:09 +08:00
jiang
7a5e11c799 fix: tabs show scroll anim and tag anim ease (#7218)
* fix: tabs show scroll anim and tag anim ease

* update snapshot
2017-08-16 21:05:52 +08:00
Benjy Cui
e0bf1cefe7 fix: disabled of Dropdown, ref: #7102 2017-08-16 17:56:07 +08:00
Benjy Cui
1f652bfe4c fix: event.target of Button's click event, close: #7034 2017-08-16 17:43:56 +08:00
Benjy Cui
bee3c43e7a fix: Timeline with only one child should work, close: #7214 2017-08-16 17:31:53 +08:00
afc163
ad6dbcb9c6 Fix button in DatePicker 2017-08-16 15:38:12 +08:00
afc163
53640c3f18 update menu API doc 2017-08-16 14:27:22 +08:00
afc163
33f37debd7 tweak site style 2017-08-16 10:49:54 +08:00
afc163
8e744545ff code style 2017-08-16 10:38:37 +08:00
afc163
f0c6350e0e update select demo 2017-08-16 10:38:03 +08:00
afc163
cf3c0aac43 Fix focused style of disabled Pagination button 2017-08-16 09:54:10 +08:00
afc163
d3ec477f8f Add NG-ZORRO links 2017-08-15 23:00:06 +08:00
afc163
8dfb44ba72 update card snapshot 2017-08-15 22:36:48 +08:00
afc163
f46112d385 refactor card extra style 2017-08-15 22:34:48 +08:00
afc163
5443e79329 improve code expand style 2017-08-15 21:00:31 +08:00
afc163
59b11f3b48 Tweak button insert space logic 2017-08-15 20:08:00 +08:00
afc163
48f7d22929 site: improve code collapse icon design 2017-08-15 17:20:47 +08:00
afc163
1f6bcf963f tweak progress initial style 2017-08-15 16:48:49 +08:00
afc163
749b6e7242 Tweak table sorter style 2017-08-15 15:14:02 +08:00
afc163
dc209c20f9 upgrade rc component version 2017-08-15 14:41:28 +08:00
Benjy Cui
87c8c7ad67 site: fix toc background color, close: #7199 2017-08-15 09:56:43 +08:00
Stefan Paunovic
7d8c7d72b7 feat: add sr_RS locale (Serbian) (#7201) 2017-08-15 09:24:30 +08:00
afc163
57e3be2c32 Fix select popupContainer in site header 2017-08-14 22:57:45 +08:00
Piper Chester
4b38dbd669 README: fix grammatical errors (#7208) 2017-08-14 22:25:12 +08:00
Mitchell Demler
293d63910a Fix type definition for Card Component. (#7196)
React.Component requires two parameters. The second parameter (State) is now optional in a more recent version of @types/react however upgrading to this has several major/breaking changes elsewhere. I would prefer to explicitly define State as `{}` in this case.
2017-08-14 09:44:44 +08:00
comerc
e92ef95f74 Add cra-ts-antd (#7195) 2017-08-14 09:44:25 +08:00
afc163
f6d349731c Fix innerSlider of react-slick, close #7191 2017-08-13 14:52:29 +08:00
LongYinan
f58b1075ac docs: recommend ts-import-plugin in README (#7189) 2017-08-12 17:07:59 +08:00
afc163
32497c35fe update changelog 2017-08-12 14:01:01 +08:00
Zheeeng
754966991b Rename File interface to UploadFile (#7183)
* Fix doc missing info

* Rename File interface to UploadFile
2017-08-12 13:56:57 +08:00
Mars Wong
1e80254059 doc: add missing API for Cascader (#7187) 2017-08-12 13:56:42 +08:00
nikogu
7d49cc18a9 Merge branch 'master' into feature-2.13 2017-08-12 11:16:33 +08:00
Eden Wang
e633f91c27 Disabled Dropdown is showing Menu on hover (#7102)
* disabled dropdown is showing menu on hover

* fix cr error

* update snap

* update document
2017-08-11 23:55:36 +08:00
nikogu
258b3d170c fixed changelog grammar 2017-08-11 23:52:58 +08:00
nikogu
d5d69d4063 optimize changelog lasttime 2017-08-11 23:28:45 +08:00
nikogu
47aa36fb06 optimize changelog 2017-08-11 23:26:29 +08:00
nikogu
1fb7bd7205 fixed changelog grammar again 2017-08-11 22:38:11 +08:00
nikogu
e30116f4bd fixed changelog grammar 2017-08-11 22:30:42 +08:00
nikogu
9a7c369af6 bump 2.12.6 2017-08-11 22:18:16 +08:00
afc163
11f9459738 update snapshot 2017-08-11 22:14:16 +08:00
afc163
1651015688 fix card doc, ref #7185 2017-08-11 20:21:16 +08:00
afc163
592653c2ad fix card type tabs className, close #7185 2017-08-11 19:59:55 +08:00
afc163
711703b91e update bootstrap 3 link 2017-08-11 19:08:09 +08:00
Xiaohan Lee
c23c0a6b16 Update docs for Table.render and Upload.onChange (#7180)
* Docs: fix invalid link in docs of Table.render

* Docs: add link for "onChange" in docs of Upload.onChange
2017-08-11 17:05:58 +08:00
afc163
f689ede0fa The collapse trigger of Sider should be fixed and upon menus
close #7161
2017-08-11 16:10:17 +08:00
Zhang Zhi
30e4fa8a8d Remove Button's redundent code (#7176) 2017-08-11 15:06:35 +08:00
Zheeeng
fdc8d357ef Fix doc missing info (#7175) 2017-08-11 12:39:26 +08:00
afc163
c79592cf05 Fix select demo 2017-08-11 10:44:13 +08:00
afc163
af9dc73eef Fix collapse arrow position in IE9/10/11 2017-08-11 10:32:16 +08:00
Zheeeng
d6dde83247 Fix typo (#7170) 2017-08-11 09:30:19 +08:00
afc163
d98d7a451c Add @tag-font-size 2017-08-10 21:45:19 +08:00
afc163
9f75694c75 Fix link 2017-08-10 16:25:52 +08:00
afc163
9bcde59001 Add @form-feedback-icon-size 2017-08-10 11:34:08 +08:00
afc163
43751c9930 revert eb3c274, close #7162 2017-08-10 10:54:02 +08:00
afc163
1f18c93d7f Fix empty table scrollbar, close #7142 2017-08-09 21:55:38 +08:00
Vemund Santi
b69a6886d7 Locale/nb-NO (#7122)
* locale: Add Norwegian Bokmål locales to Ant Design

* Add Vemund Santi to authors.

* docs: add Norwegian to list of i18n language examples

* test: add tests for Norwegian Bokmål

* Update dependencies. Use locales from rc-pagination.
2017-08-09 20:36:01 +08:00
afc163
47c5de29f3 tweak range picker style 2017-08-09 16:21:18 +08:00
偏右
eb3c274e01 Fix extra space in RangePicker
https://gw.alipayobjects.com/zos/rmsportal/sTMIijZIrTkBDaGrEXmI.png
2017-08-09 15:33:30 +08:00
Randy
df934445c0 add a generic type for FormCreateOption (#7119) 2017-08-09 12:59:31 +08:00
Benjy Cui
87bfe2df87 fix: wrappedComponentRef should work, close: #6545 2017-08-09 10:27:34 +08:00
afc163
3001ca4114 typo 2017-08-08 21:22:09 +08:00
afc163
02c5616250 Update Card demo 2017-08-08 21:21:49 +08:00
afc163
807b573bff Collapse the border or Card.Grid 2017-08-08 21:13:29 +08:00
afc163
b687a32044 Fix safari input text align, close #7135 2017-08-08 20:27:05 +08:00
afc163
a329d3d39b Fix file.response type checking, ref #6818 2017-08-08 17:18:55 +08:00
afc163
8892d85e33 use @font-size-base for Badge[text] 2017-08-08 14:23:50 +08:00
afc163
500b222556 Fix stretched layout by content
523b4360d2 (commitcomment-23527573)
2017-08-08 13:38:10 +08:00
afc163
d339e628ed Fix upload default error message, close #6818 2017-08-08 13:34:24 +08:00
afc163
a033e576fd doc: upgrade node version 2017-08-08 10:43:45 +08:00
Benjy Cui
02daedd67b docs: add missing doc for Form, close: #6959 2017-08-08 10:10:47 +08:00
afc163
53d279eb77 Add antizer 2017-08-07 22:14:48 +08:00
afc163
acf58de807 2.12.5 2017-08-07 21:29:24 +08:00
afc163
4c52ccaff9 Fix Dropdown menu width, close #7124 2017-08-07 21:27:08 +08:00
afc163
4f73a23a10 typo 2017-08-07 17:59:47 +08:00
afc163
29b5f433f8 Fix step title background 2017-08-07 16:11:43 +08:00
afc163
5a33774238 Fix ~ mis-position bug 2017-08-07 15:35:05 +08:00
Dmitry Bolotin
ba0d2598fe Object cloning in flatArray performed only if object has childrenName field. (#7072) 2017-08-07 15:33:18 +08:00
afc163
e3b6430a4b Fix InputNumber border, close #7117 2017-08-07 14:16:28 +08:00
afc163
3570458c31 Fix undefined SelectPropTypes 2017-08-07 11:35:22 +08:00
Yiming
a22a011c49 修改错别字 (#7110)
反应 应为 反映
2017-08-07 10:44:47 +08:00
Michalis Macheras
94d46e4c01 add el_GR locale (Greek) (#6928)
Update index.test.js

Syntactic error corrected
2017-08-07 10:41:38 +08:00
Randy
e4c5ab9c69 Radiogroup with name (#7009)
* Add a name property for RadioGroup

* Add document for RadioGroup's name property

* Add test case for RadioGroup name property
2017-08-07 10:41:38 +08:00
Benjy Cui
456cea652b docs: add zIndex to docs of Modal, ref: 2aa3437 2017-08-07 10:41:38 +08:00
Alex Chao
3727ea2c33 feat: Modal.confirm supports zIndex prop #6722 (#6880)
* Modal.confirm supports zIndex prop #6722

* Fix filename

* Fix the zIndex missing in ModalFuncProps interface
2017-08-07 10:41:38 +08:00
mkermani144
a9430e6748 Add fa_IR to i18n docs 2017-08-07 10:40:34 +08:00
mkermani144
e8ef77b963 Add fa_IR locale 2017-08-07 10:40:34 +08:00
Graeme Yeates
d21523ef8c Use classNames to set ant-column-sort Table attribute 2017-08-07 10:40:34 +08:00
Graeme Yeates
75a6a562a0 Update table head.md snapshot 2017-08-07 10:40:34 +08:00
Graeme Yeates
40e94945d9 Add support for table default sort order (#6449) 2017-08-07 10:40:34 +08:00
yociduo
8016cccd18 rollback basic demo from popconfirm 2017-08-07 10:40:34 +08:00
yociduo
fa0e90f577 remove cancel type 2017-08-07 10:40:34 +08:00
yociduo
528a7645ca remove cancel text 2017-08-07 10:40:33 +08:00
Eden Wang
a5a1458148 add missing trailing commna 2017-08-07 10:40:33 +08:00
Eden Wang
8f1dd9ccda add missing trailing comma 2017-08-07 10:40:33 +08:00
Eden Wang
ee176347ac fix ci compile error 2017-08-07 10:40:33 +08:00
Eden Wang
f7b918add3 update confirm demo 2017-08-07 10:40:33 +08:00
Eden Wang
c712d072eb update okType and cancelType for api docs 2017-08-07 10:40:33 +08:00
Eden Wang
f2b987aaa9 update custom type for modal components 2017-08-07 10:40:32 +08:00
Eden Wang
f5ade936e1 add button type for ok and cancel in popconfirm 2017-08-07 10:40:32 +08:00
乐仪
c8eec8c56f bump 2.12.4 2017-08-06 20:21:57 +08:00
Troy Thompson
18c6860296 Adds onFocus and onBlur to Select properties. (#7082) 2017-08-06 16:45:10 +08:00
Mars Wong
e9b3c36866 fix: correct Notification interface (#7073) (#7088) 2017-08-06 13:29:11 +08:00
乐仪
1dd3e001c5 Update Modal doc, relevant:https://github.com/ant-design/ant-design/pull/7085 2017-08-06 12:44:15 +08:00
tim-soft
fdb943e887 Fix formatter (#7098)
The replace function can only work on a string, this little tweak will make the formatter not crash the page when the value is changed.
2017-08-06 11:57:56 +08:00
Ivan Radeljic
1651682020 Update modal documentation (#7085)
Add another way to destroy state on close modal
2017-08-06 00:04:25 +08:00
偏右
cb8f6a6ef5 Fix tabs extra content (#7090)
* Fix tabBarExtraContent style in vertical tabs

close #6578

* update snap

* fix rc-tabs
2017-08-05 23:01:28 +08:00
afc163
2fdc4ec1e6 doc: update some words 2017-08-04 22:28:22 +08:00
afc163
bcda84141e fix stylelint 2017-08-04 22:25:30 +08:00
afc163
b3979885e4 fix demo snapshot 2017-08-04 21:29:30 +08:00
Tom Gao
9e54bebf33 fix: when menuitem is seleted, but submenu is not seleted (#7042) 2017-08-04 21:24:59 +08:00
D & R
4bfd076cb8 fix: InputGroup demo (#7089) 2017-08-04 21:23:34 +08:00
afc163
6a17efcbf1 upgrade some devDeps and fix stylelint 2017-08-04 18:01:40 +08:00
Zach Guo
da8c82a6e4 translate patterns/list (#7056) 2017-08-04 17:42:14 +08:00
Tengjiao Cai
6e2ace3ba8 Update CollapsePanelProps -> onChange function (#7084)
parameter key should be either an array of string(general) or string(accordion mode), right?
2017-08-04 17:00:36 +08:00
Benjy Cui
4880b6ec16 fix: should not throw error when select after clear, close: #7077 2017-08-04 16:50:05 +08:00
afc163
59e219e138 Fix notification type, close #7073 2017-08-04 16:44:42 +08:00
afc163
5da1403bc0 Fix inlineCollapsed in controlled mode
ref #7063
2017-08-04 16:23:52 +08:00
afc163
1856fbe0df fix noHovering API typo, close #7078 2017-08-04 14:15:17 +08:00
Xiaohan Lee
bb195ee95f Docs: update docs for Dropdown.Button (#7071)
* add "size" api document
2017-08-04 09:42:32 +08:00
afc163
6748221ed3 tweak time-picker style 2017-08-03 22:08:14 +08:00
afc163
0f63c7186e Fix input outline covered by addon again 2017-08-03 21:48:26 +08:00
afc163
483491d0d8 treak input style for text align 2017-08-03 21:45:56 +08:00
afc163
981573037a Add mobile components sketch template 2017-08-03 20:10:43 +08:00
afc163
a0026a5923 Fix dropdown button mis-align, close #7070 2017-08-03 16:16:37 +08:00
ddcat1115
63c3c7c88f fix missing icon (#7064) 2017-08-03 15:52:31 +08:00
afc163
0a9a3887b5 Fix Invalid calling object in IE
with eval-source-map mode of webpack-dev-server

close #7060

ref https://github.com/vuejs/vue/issues/4465
2017-08-03 10:58:55 +08:00
afc163
50b9839bb3 Fix input outline covered by addon 2017-08-02 21:37:15 +08:00
afc163
8618a387da tweak date-picker style 2017-08-02 21:15:03 +08:00
afc163
bb7c580e4b Fix loading card padding 2017-08-02 21:15:02 +08:00
Randy
ecc18ef3a6 remove rc-util declaration (#7043) 2017-08-02 15:08:55 +08:00
afc163
414d3d3a64 Fix showTotal definition, close #7054 2017-08-02 13:03:56 +08:00
afc163
fb70e9d70b code style 2017-08-02 13:02:01 +08:00
afc163
746990b84d tweak alert style, make it adaptive 2017-08-01 22:18:57 +08:00
afc163
4962d19462 tweak steps style 2017-08-01 21:50:38 +08:00
afc163
0cf3600e25 refactor step title style again 2017-08-01 18:34:02 +08:00
Ruslan P
0cdcdfba7b Update picture-style.md (#7051) 2017-08-01 18:22:55 +08:00
afc163
0eefa85b04 refactor step title style 2017-08-01 18:08:08 +08:00
jiang
1a93536a26 fix #7048 (#7050) 2017-08-01 17:41:03 +08:00
jiang
f1110f2bc5 sync menu and layout-sider animate time (#7047) 2017-08-01 17:36:53 +08:00
afc163
eb69e0a0f8 Fix scroll bar flash in TextArea[autosize] 2017-08-01 16:37:57 +08:00
Flynn
8e8c0b4db3 update docoument for #7026 (#7039) 2017-08-01 11:26:18 +08:00
afc163
e8fc686dcf site: add logo for stackoverflow and segmentfault 2017-07-31 21:50:49 +08:00
Randy
b5ad05bc06 fix Card children type (#7030) 2017-07-31 20:29:56 +08:00
afc163
a88f8fcc21 fix badge demo 2017-07-31 18:03:16 +08:00
afc163
330e1f7a4b Fix badge title, close #7024 2017-07-31 18:01:45 +08:00
afc163
8f98ae80bd Tweak CheckableTag style 2017-07-31 17:47:54 +08:00
afc163
2fe4ac1a30 update document for #7023 2017-07-31 16:55:05 +08:00
afc163
50466ed281 Fix ok button style 2017-07-31 16:12:41 +08:00
Amorites
29d2a756b0 site: place 'search...' at the bottom of the search options (#7021) (#7022) 2017-07-31 13:54:31 +08:00
Wei Zhu
401519ec6f Fix types 2017-07-31 01:50:46 +08:00
Wei Zhu
12bf17b166 Bump version 2017-07-31 01:26:28 +08:00
Wei Zhu
3ae966f158 Add 2.12.3 changelog (#7010) 2017-07-31 00:50:34 +08:00
Randy
b2556b4cd5 remove any type in Avatar (#7016) 2017-07-31 00:43:33 +08:00
Randy
35ae41f618 remove any type in Tag (#7015) 2017-07-31 00:42:25 +08:00
Wei Zhu
bef7db465e Revert "Revert "Revert "feat: upgrade rc-slider, support keyboard accessibility"""
This reverts commit 0b8b0d2deb.
2017-07-30 16:07:41 +08:00
Wei Zhu
0b8b0d2deb Revert "Revert "feat: upgrade rc-slider, support keyboard accessibility""
This reverts commit 551807cd91.
2017-07-30 16:06:53 +08:00
Wei Zhu
551807cd91 Revert "feat: upgrade rc-slider, support keyboard accessibility"
This reverts commit ef339a32ac.
2017-07-30 16:05:37 +08:00
afc163
a6037d66c0 Fix button align issue, close #7001 2017-07-30 14:00:32 +08:00
Randy
859761eea7 fix lint error (#7006) 2017-07-30 13:30:12 +08:00
afc163
541a992a56 Add warning for tree-select props 2017-07-29 14:50:11 +08:00
afc163
d00871acdd upgrade snapshot 2017-07-29 14:20:48 +08:00
SHEN Lin
58ec298ded Translation pattern form (#6944)
* 60% finish for translation of form

* finish form translation

* finish form translation and delete form.md

* modified translation

* modify title
2017-07-29 14:17:45 +08:00
Randy
99e4cd6aec add rc-util declaration to custom-typings (#6935) 2017-07-29 14:17:02 +08:00
afc163
b54a70bc8e fix ummount issue, #6976 2017-07-29 14:16:27 +08:00
Neekey
6eff4bd02a check this.container exists updating WiderPadding (#6976)
before doing updating wider padding for Card, always check if the container exists first.
2017-07-29 14:12:53 +08:00
Aleck Landgraf
d6a0b1bd3e [checkbox][docs] fixes doc table extra column cell (#6995) 2017-07-29 14:01:30 +08:00
paranoidjk
ef339a32ac feat: upgrade rc-slider, support keyboard accessibility
https://github.com/react-component/slider/pull/282
2017-07-28 14:02:45 +08:00
afc163
4d5eb5a92f Fix indeterminate checkbox disabled style 2017-07-28 13:10:02 +08:00
afc163
69775dea68 fix grid card padding implementation 2017-07-28 12:50:57 +08:00
Benjy Cui
fff756ff5f deps: upgrade rc-tree 2017-07-28 11:38:39 +08:00
paranoidjk
bcb82a518b feat: upgrade rc-calendar. 2017-07-28 11:18:40 +08:00
Benjy Cui
c63c8b6c04 test: update snapshot 2017-07-28 09:59:30 +08:00
jiang
24f58c20e1 fix menu-anim (#6955)
* fix menu-anim

* fix menu-anim

* update

* remove space

* fix test

* Improve code style

* submeu-title use color transition

* sync motion-collapse time

* snyc padding
2017-07-27 19:43:45 +08:00
afc163
abb2763a66 chore: collapse style 2017-07-27 19:43:40 +08:00
Benjy Cui
7582ab7481 test: update snapshot 2017-07-27 17:51:07 +08:00
Benjy Cui
455ea58b10 deps: upgrade rc-tree 2017-07-27 16:43:11 +08:00
afc163
e1a46cc419 Add less variables for wider card padding, resolve #6973 2017-07-27 12:05:58 +08:00
Wei Zhu
90511c3261 docs: use indexOf instead of search
fix #6962
2017-07-26 13:24:58 +08:00
Benjy Cui
8e496966cf docs: update docs for Form 2017-07-26 09:04:01 +08:00
afc163
dc8be3fcfd Tweak icon position of DatePicker 2017-07-25 19:45:58 +08:00
afc163
acc0c5a216 Add instruction about dropdown menu item highlighted style 2017-07-25 18:00:33 +08:00
afc163
144c67f054 Fix dropdown menu position bug 2017-07-25 17:56:45 +08:00
Benjy Cui
ad92793a47 fix: events shuould work when element appear, close: #6949 2017-07-25 16:56:49 +08:00
afc163
d90e1b2a9e Fix extra ... in firefox 2017-07-25 14:15:13 +08:00
偏右
54eadefeca Merge pull request #6948 from newswim/master
Escape "|" character in Pagination documentation
2017-07-25 11:43:17 +08:00
Dan Minshew
8e2d65298a Escape "|" character 2017-07-24 22:12:46 -05:00
Dan Minshew
e0ab15907f Escape pipe operator in function signature 2017-07-24 22:03:11 -05:00
afc163
4f85be834c Tweak menu text align again 2017-07-25 10:31:05 +08:00
偏右
fa12a715e0 Merge pull request #6945 from confiks/master
Upgrade create-react-class to 15.6.0
2017-07-25 09:29:29 +08:00
Confiks
e93d24021f Upgrade create-react-class to 15.6.0 2017-07-25 01:53:53 +02:00
Zach Guo
9e6bc99816 Translate documentation for Navigation, both Pattern and Guideline (#6911) 2017-07-25 07:45:54 +08:00
Pierre Neter
0c0fc38be6 docs: just need one title like other documents (#6930) 2017-07-24 10:16:13 +08:00
Benjy Cui
f648edacdb docs: explain what it n, close: #6934 2017-07-24 10:12:16 +08:00
Benjy Cui
2ba3a84331 fix: getDefaultTarget only be called in browser, close: #6926 2017-07-24 09:58:56 +08:00
偏右
547745271e Merge pull request #6932 from pierreneter/docs/spec/update
Update Guidelines
2017-07-24 09:37:59 +08:00
Benjy Cui
d2aca99190 refactor: simplify TextArea's code 2017-07-24 09:36:27 +08:00
偏右
499ab69f65 Merge pull request #6929 from pierreneter/patch-1
Remove help translate line
2017-07-24 09:31:53 +08:00
偏右
199d9433d5 Merge pull request #6933 from huzzbuzz/patch-1
update message/index.zh-CN.md
2017-07-24 09:31:08 +08:00
huzzbuzz
568963e894 update duration value from 1.5 to 3
update duration value from 1.5 to 3
2017-07-24 08:28:15 +08:00
Pierre Neter
5c2b03dbfc Update Guidelines
Signed-off-by: Pierre Neter <pierreneter@gmail.com>
2017-07-24 03:15:07 +07:00
Pierre Neter
55d2511608 Remove help translate line 2017-07-24 01:40:21 +07:00
偏右
94e4ddb032 Merge pull request #6925 from djyde/enable-noImplicitAny-Card
remove `any` from Card component #5627
2017-07-22 21:48:10 +08:00
Randy
d28b8f3591 remove any type from Card component #5627 2017-07-22 21:12:55 +08:00
afc163
31c93e2dcc update changelog 2017-07-22 15:47:19 +08:00
afc163
4513019abc 2.12.2 2017-07-22 15:32:37 +08:00
偏右
5fb8cf85ef Merge pull request #6915 from ant-design/changelog-2.12.2
Add changelog for 2.12.2
2017-07-22 15:25:29 +08:00
afc163
896e738fce Fix missing semicolon 2017-07-22 15:25:08 +08:00
afc163
e51a3a6da4 Fix TimePicker disabled style, close #6918 2017-07-22 15:24:04 +08:00
afc163
a5f7dd7192 Add changelog for 2.12.2 2017-07-22 15:23:31 +08:00
偏右
c733f94c33 Merge pull request #6916 from djyde/separate-type
Separate getFieldDecorator options type
2017-07-22 15:16:04 +08:00
偏右
90959aab19 Merge pull request #6917 from bryanberger/add-sider-trigger-background-less
add less variables for layout-trigger background, color
2017-07-22 14:01:38 +08:00
Bryan Berger
91400d54fa add less variables for layout-trigger background, color 2017-07-21 14:21:31 -04:00
afc163
f505ebd188 Add snapshot test for textarea disabled 2017-07-21 20:23:50 +08:00
偏右
42aaeb4f3d Merge pull request #6885 from ant-design/refactor-anchor
refactor: simplify Anchor, and fix #6473
2017-07-21 20:20:38 +08:00
Benjy Cui
f2d4d0a9e4 refactor: simplify Anchor, and fix #6473 2017-07-21 11:58:12 +08:00
afc163
0ad85e2987 Fix #4431 again 2017-07-21 10:07:18 +08:00
偏右
1013339247 Merge pull request #6906 from clinyong/bugfix
change type of radio group value to any
2017-07-20 17:20:05 +08:00
afc163
c2e7d18663 Make tree select item wider 2017-07-20 17:17:56 +08:00
clinyong
6f586ba243 change type of radio group value to any 2017-07-20 17:04:10 +08:00
Randy
a0dc7d3a72 Separate getFieldDecorator options type
Taking getFieldDecorator options type out of WrappedFormUtils
2017-07-20 13:20:15 +08:00
Benjy Cui
983609c009 css: fix disabled style of Slider, close: #6665 2017-07-20 10:39:22 +08:00
afc163
545d171223 Fix tooltip overlay warning, close #6897 2017-07-19 20:38:39 +08:00
afc163
98faa4378c Make action of Upload optional, close #6890 2017-07-19 20:28:18 +08:00
afc163
3d71d980a7 Adjust menu icon and text vertical align 2017-07-19 17:44:02 +08:00
偏右
8a9a8c972f Merge pull request #6894 from infeng/fix-input-onChange
fix onChange ts definition of Input
2017-07-19 14:01:52 +08:00
Benjy Cui
119d498935 chore: replace http with https, close: #6893 2017-07-19 14:00:11 +08:00
infeng
d19bfcbf74 fix onChange ts definition of Input 2017-07-19 13:52:55 +08:00
Benjy Cui
8cfa61f46b test: update snapshot 2017-07-19 10:15:58 +08:00
Benjy Cui
6bdb84a011 docs: update docs, ref: 639e60a 2017-07-19 09:48:07 +08:00
Geoff Holden
639e60af45 docs: added reverseArrow documentation. (#6888) 2017-07-19 09:45:42 +08:00
偏右
72ac2c914f Merge pull request #6884 from newraina/fix-ButtonGroup-type
fix Button.Group type definition
2017-07-18 21:14:34 +08:00
newraina
aa6afd81b5 fix Button.Group type definition 2017-07-18 16:46:19 +08:00
afc163
edf8a4f239 longer default duration of message 2017-07-18 12:50:17 +08:00
偏右
e085b5d25c Merge pull request #6870 from imosapatryk/patch-1
Update pl_PL.tsx
2017-07-17 23:55:51 +08:00
偏右
05473dcd0b Merge pull request #6869 from imosapatryk/patch-2
Update pl_PL.tsx
2017-07-17 23:55:16 +08:00
偏右
fddc92f27d Merge pull request #6871 from imosapatryk/patch-4
Update pl_PL.tsx
2017-07-17 23:54:58 +08:00
imosapatryk
18bf973e94 Update pl_PL.tsx
'Search here' in Polish is just 'Szukaj'. 'Wyszukaj tutaj' sounds bad.
2017-07-17 16:10:51 +02:00
imosapatryk
3ccef11dec Update pl_PL.tsx
Wrong file import
2017-07-17 16:05:58 +02:00
imosapatryk
79afe8ef89 Update pl_PL.tsx
You import wrong files.
2017-07-17 16:02:25 +02:00
偏右
6fe6480bd5 Merge pull request #6854 from Brooooooklyn/issue/modal-func-props-interface
fix: missing maskClosable property in ModalFuncProps interface
2017-07-17 16:07:28 +08:00
Benjy Cui
8173007402 fix: filterOption of Transfer should be optional, close: #6856 2017-07-17 16:01:18 +08:00
偏右
09c8addae1 Merge pull request #6858 from lyz810/master
fix: TextArea disabled style
2017-07-17 15:58:07 +08:00
偏右
b7a1665c97 Merge pull request #6860 from insiight/optimize/use_px_unit_explicitly
add unit `px` to all less values, make them explicit
2017-07-17 15:56:34 +08:00
afc163
255eac9079 Fix vertical tabs arrow style 2017-07-17 15:55:03 +08:00
neekey
7e522291c8 add unit px to all less value, make them explicit 2017-07-17 17:44:40 +10:00
LongYinan
bd5daa939a fix: missing maskClosable property in ModalFuncProps interface 2017-07-17 15:26:37 +08:00
liuyanzhe
bbfdc46aa2 Fix TextArea disabled style 2017-07-17 15:10:53 +08:00
Benjy Cui
02670cb174 bump 2.12.1 2017-07-17 09:36:53 +08:00
Benjy Cui
c394145f41 docs: finish changelog of 2.12.1 2017-07-17 09:27:22 +08:00
偏右
4667a0f6d6 Merge pull request #6839 from shenlin192/translation-specification-layout
Translation of specification layout
2017-07-17 00:43:24 +08:00
shenlin192@gmail.com
a7e37d614a remove translation of form 2017-07-16 18:35:05 +02:00
shenlin192@gmail.com
b0909774c0 capitialized sentences in list 2017-07-16 16:48:24 +02:00
afc163
8a63b39e63 Add test case for arrowPointAtCenter, #6830 2017-07-16 16:00:23 +08:00
afc163
9a85303f79 remove unneccesary size prop 2017-07-16 15:41:51 +08:00
afc163
b112948130 TextArea should be resetable in form, close #6776 2017-07-16 15:39:21 +08:00
afc163
e6554e7edb update form document 2017-07-16 15:05:48 +08:00
shenlin192@gmail.com
f9f93c0c30 Merge branch 'translation-specification-layout' of github.com:shenlin192/ant-design into translation-specification-layout 2017-07-15 13:37:26 +02:00
shenlin192@gmail.com
feed80c8db created layout.zh-CN.md to replace the original file and removed Chinese words from the layout.en-US.md file 2017-07-15 13:35:46 +02:00
shenlin192@gmail.com
9980ce964c created layout.en-CN.md to replace the original file and removed Chinese words from the layout.en-US.md file 2017-07-15 13:28:37 +02:00
afc163
efcc28ed51 header font weight 2017-07-15 14:43:12 +08:00
偏右
81b5d9890a Merge pull request #6837 from newraina/fix-input-search-type
fix SearchProps
2017-07-15 14:17:07 +08:00
newraina
e94b110a46 fix SearchProps 2017-07-14 17:47:11 +08:00
shenlin192@gmail.com
968c932778 finish layout translate 2017-07-14 11:22:00 +02:00
Benjy Cui
5f27e46500 docs: add changelog for 2.12.1 2017-07-14 17:09:59 +08:00
Benjy Cui
b45bf6d814 fix: should show children if src is not exist, close: #6804 2017-07-14 16:12:48 +08:00
afc163
02fa2cd672 test: update snapshot 2017-07-14 16:10:52 +08:00
afc163
65a79b1ded remove -0.5px margin in card body 2017-07-14 16:10:04 +08:00
afc163
35e74f825e first card render without padding transition 2017-07-14 15:57:26 +08:00
afc163
ab41503343 doc: update input demo description 2017-07-14 15:47:07 +08:00
afc163
f9193952ff Add breakpoint width documentation 2017-07-14 15:47:07 +08:00
Benjy Cui
9d39a55604 css: make collapse.panel's header more flexible, close: #6832 2017-07-14 15:44:36 +08:00
陈帅
96722605fd fix: noImplicitAny of back top (#6835) 2017-07-14 15:37:44 +08:00
Benjy Cui
2413c6af61 fix: make loading work with icon only button in button group, close: #6822 2017-07-14 15:26:55 +08:00
Wei Zhu
4960f711c3 docs: Add manual upload demo (#6823) 2017-07-14 15:00:14 +08:00
afc163
44b3dad12f tweak style 2017-07-14 12:18:02 +08:00
afc163
953b84f7d1 tweak style 2017-07-14 12:16:37 +08:00
afc163
d04f9161db fix tsc compile error 2017-07-14 11:55:00 +08:00
afc163
da1bfba781 extra should be wider too 2017-07-14 11:50:35 +08:00
afc163
3ca9be1bf6 Fix missing overflow config, ref #6830 2017-07-14 11:44:11 +08:00
afc163
6ffe39145d Adjust card padding according to card width 2017-07-14 11:37:28 +08:00
afc163
3ad49dd4cc Fix arrowPointAtCenter not working, close #6830 2017-07-14 10:49:51 +08:00
afc163
c20e66f02b hide tooltip demo 2017-07-14 10:42:01 +08:00
afc163
266e458a20 Add modao template links 2017-07-13 20:39:11 +08:00
shenlin192@gmail.com
1b7da8f9c0 finish layout translate 2017-07-13 14:30:50 +02:00
afc163
2b2e962738 tweak menu style 2017-07-13 20:28:23 +08:00
afc163
91707b89d8 test: update snapshot 2017-07-13 15:24:53 +08:00
afc163
22e14970ec Improve fixed sider layout implementation, fix #6817 2017-07-13 15:23:34 +08:00
afc163
ac21152e10 tweak tabs style 2017-07-13 12:14:57 +08:00
shenlin192@gmail.com
277facc8e3 translate 2017-07-12 17:15:44 +02:00
afc163
ca89227568 test: fix snapshot 2017-07-12 21:44:46 +08:00
afc163
81a8d71ec3 Fix Input className to wrapper, close #6809 2017-07-12 21:43:06 +08:00
afc163
39207efa4d Add @badge-font-size and @tabs-title-font-size 2017-07-12 17:32:31 +08:00
afc163
46ffda9c93 fix vertical menu item border radius 2017-07-12 16:43:53 +08:00
Benjy Cui
43bf6c4846 test: fix CI, ref: 27a1742 2017-07-12 15:15:21 +08:00
afc163
19fa96754d Fix snapshot 2017-07-12 15:07:04 +08:00
afc163
f6a1eca7e0 Tweak switch style 2017-07-12 14:51:13 +08:00
Benjy Cui
9c7cec3e39 refactor: remove span[disabled] 2017-07-12 14:23:47 +08:00
Benjy Cui
27a17428de fix: should show correct panel, close: #6764 point 3 2017-07-12 14:00:20 +08:00
afc163
a481134cea no need to import moment locale 2017-07-12 11:54:46 +08:00
afc163
81a010e0ae fix product name 2017-07-11 19:31:06 +08:00
afc163
b4916d45d3 update carousel demo style 2017-07-11 18:20:37 +08:00
afc163
c112abd137 update carousel demo style 2017-07-11 18:19:01 +08:00
afc163
ab4e676b2a update input placeholder color 2017-07-11 16:51:54 +08:00
afc163
4419d4c94c Fix select extra padding, close #6723 2017-07-11 12:14:35 +08:00
afc163
01bbd5a3d3 update form dynamic demo 2017-07-11 11:59:30 +08:00
Ivo Stratev
0bb73534b2 Fixing typos (#6788)
It should be "Добре" instead of "Дибре"
2017-07-11 00:28:34 +08:00
afc163
032d3bea12 Support open demo in riddle 2017-07-10 22:17:52 +08:00
bang
e7013fcb3f fix: miss semicolon 2017-07-08 16:46:18 +07:00
bang
3fb21c0325 chore: keep checkbox's value type consistent close #6768 2017-07-08 16:40:15 +07:00
afc163
384803528f Fix extra error outline of select in input addon 2017-07-08 16:20:01 +08:00
afc163
6c5a11a363 Fix inlineCollapsed Menu styledetails 2017-07-08 16:15:00 +08:00
afc163
516ce2d821 Fix inline menu collapse animation 2017-07-08 15:57:53 +08:00
乐仪
60f9ba5b33 bump 2.12.0 2017-07-08 12:48:43 +08:00
afc163
9eee9f5dcd Add test case for Checkbox 2017-07-07 20:38:52 +08:00
afc163
69b5acb45f More test cases 2017-07-07 20:26:08 +08:00
afc163
fda881cc7a trailing spaces 2017-07-07 19:45:59 +08:00
偏右
7fcfa13c24 Merge pull request #6765 from ant-design/feature-2.12
Feature 2.12
2017-07-07 19:42:57 +08:00
偏右
b653a2c055 Merge branch 'master' into feature-2.12 2017-07-07 19:41:37 +08:00
偏右
631ca1cea2 Merge pull request #6763 from hansnow/fix-table-docs
Update table documents
2017-07-07 18:39:14 +08:00
hansnow
6bc57e450c Update table documents 2017-07-07 18:00:34 +08:00
afc163
f2268c2877 Fix test case for menu 2017-07-07 17:15:29 +08:00
afc163
8945bb5da6 Add test case for menu 2017-07-07 16:51:06 +08:00
afc163
ed070c94ad Fix spin blur z-index, close #6759 2017-07-07 16:34:47 +08:00
afc163
9ebaeb6f4f Add test case for BackTop 2017-07-07 16:29:03 +08:00
afc163
66a731b4c2 site: open demo in codepen with prefill code, close #5140 2017-07-07 16:09:02 +08:00
ddcat1115
7cb5d68211 update Progress doc (#6752) 2017-07-07 14:18:57 +08:00
偏右
a4648fd67f Add noHovering and Card.Grid (#6748)
* Add noHovering prop for Card

* Add Card.Grid

* fix snapshot

* change default card grid percent
2017-07-07 13:36:54 +08:00
afc163
c67d9b2935 Fix nested steps style, close #6754 2017-07-07 11:46:05 +08:00
偏右
2cb0649ea0 Merge pull request #6755 from bugct/master
fix lint
2017-07-07 00:19:54 +08:00
柚子男
6d06f2f4b4 fix lint 2017-07-06 23:06:21 +08:00
偏右
daae971f83 Merge pull request #6753 from koubei-fe/fix-input-reset_nextFrameActionId_when_updated
I guess nextFrameActionId should be reset after textarea resized.
2017-07-06 20:59:47 +08:00
团结
625673486e I guess nextFrameActionId should be reset after textarea resized. 2017-07-06 20:42:54 +08:00
afc163
25a60322e5 Add Pagination[itemRender] 2017-07-06 19:17:36 +08:00
afc163
883f82172e Fix shadowed name ts errors 2017-07-06 15:37:28 +08:00
afc163
36d24a5a40 Tweak card style 2017-07-05 19:21:26 +08:00
偏右
ad4b49f843 Merge pull request #6726 from megawac/select-placeholder
Document select placeholder supporting ReactNode
2017-07-05 09:56:27 +08:00
Graeme Yeates
e1e0b97e57 nit: fix readme typo [ci-skip] (#6727) 2017-07-05 07:23:16 +08:00
Graeme Yeates
0e22ae62bb Document select placeholder supporting ReactNode 2017-07-04 13:07:05 -04:00
paranoidjk
48ec77222f feat: upgrade rc-slider
https://github.com/react-component/slider/pull/292
2017-07-04 18:49:24 +08:00
Sakol Assawasagool
bc7e0bad3e feat: add th_TH translation (#6721) 2017-07-04 17:54:36 +08:00
afc163
2e2d891647 update Changelog 2017-07-04 17:03:19 +08:00
afc163
5ad194143f Fix InputNumber[precision] ts definites, close #6715 2017-07-04 14:03:07 +08:00
afc163
d00d631ef2 change team name 2017-07-04 10:15:24 +08:00
偏右
87932504b4 Merge pull request #6686 from ant-design/feat-collapsed-menu
Better collapsed Sider and Menu
2017-07-04 09:58:02 +08:00
偏右
340cbda2d7 Merge pull request #6138 from ant-design/fix-typescript
refactor: extract Input.Textarea
2017-07-04 09:56:33 +08:00
Wei Zhu
43bb22613b Remove next changelog 2017-07-04 08:12:28 +08:00
Larry Laski
79b20a24a2 Update Avatar Page documentation Fix (#6711)
Quick fix for updating the API property section - currently `type` property but it should be `shape`
2017-07-04 07:02:43 +08:00
Wei Zhu
c825f0108e Run dist before run tests 2017-07-03 18:59:05 +08:00
Wei Zhu
7ba016218c Only run demo tests when using dist files 2017-07-03 18:40:44 +08:00
Wei Zhu
4477726412 Fix travis scripts 2017-07-03 18:01:31 +08:00
Benjy Cui
fe33e76479 refactor: extract Input.TextArea 2017-07-03 17:26:29 +08:00
paranoidjk
ba168b826f refactor: use spread operator replace object-assign (#6677) 2017-07-03 16:57:11 +08:00
afc163
5aebf27ff1 tweak card close x style 2017-07-03 13:34:06 +08:00
afc163
eccaeaea0e Add click animation for checkbox and radio 2017-07-02 19:14:56 +08:00
偏右
c7be13b20e Merge pull request #6643 from ant-design/MentionFocus
fix: mention should support `.focus`, close: #6135
2017-07-02 15:01:16 +08:00
afc163
dbdd5d5126 update table doc 2017-07-01 14:38:11 +08:00
偏右
963560d33b Merge pull request #6667 from yurtaev/patch-1
Add `onRowDoubleClick` into Table documentation
2017-07-01 14:36:32 +08:00
afc163
b6011d7a39 typo 2017-07-01 14:04:26 +08:00
偏右
2659b35382 Merge pull request #6687 from Sowed/patch-2
Update create-react-app.en-US.md
2017-07-01 14:01:46 +08:00
偏右
8119292e6c Merge pull request #6689 from Sowed/patch-1
Update practical-project.en-US.md
2017-07-01 14:01:32 +08:00
afc163
50e37796b8 Add test case 2017-06-30 23:08:11 +08:00
afc163
0b67dc4e12 update warning message 2017-06-30 22:05:53 +08:00
afc163
7d3bc4ebd4 update snapshots 2017-06-30 22:02:19 +08:00
afc163
82afb368c0 Fix context change logic 2017-06-30 22:00:04 +08:00
afc163
89a37da77f Menu will get collapsed status from Layout.Sider 2017-06-30 21:36:23 +08:00
afc163
97fbb20fa8 improve menu doc 2017-06-30 21:10:47 +08:00
afc163
2eb3d55743 Add documentation for inlineCollapsed 2017-06-30 21:09:34 +08:00
afc163
6e145bfad3 Add tooltip for collapsed menu item 2017-06-30 21:07:01 +08:00
afc163
115749e06f inline menu should not trigger handleClick 2017-06-30 20:27:39 +08:00
afc163
63daf8d0a3 Add Menu[inlineCollapsed] prop 2017-06-30 18:08:30 +08:00
D & R
9dcc28e218 feat: support autoAdjustOverflow prop (#6661) 2017-06-30 17:22:01 +08:00
Wei Zhu
1f69de8da4 Run demo test against dist/lib/es dir 2017-06-30 15:30:17 +08:00
Benjy Cui
dc9d4ae795 Merge branch 'master' into feature-2.12 2017-06-30 14:18:05 +08:00
偏右
0ce61df3da Merge pull request #6599 from megawac/table-sort-select-bg
Use background-color-active for table sort and selected backgrounds
2017-06-30 12:00:16 +08:00
偏右
bb9957ff45 Merge pull request #6655 from megawac/date-picker-style
Make -clear and -icon styles consistent at different input sizes
2017-06-30 11:50:00 +08:00
afc163
4f0b3cad2a Fix expanded area background of fixed header table, close #6657 2017-06-30 11:30:27 +08:00
afc163
112231469f tweak tabs prev next button position style 2017-06-30 11:30:27 +08:00
Benjy Cui
1f9b4a7981 refactor: make slider's style more flexible, close: #6665 2017-06-30 11:08:28 +08:00
iamcastelli
ce0fe06c8a Update create-react-app.en-US.md
Fix grammar errors and punctuation
2017-06-29 22:05:48 +03:00
iamcastelli
6bbbeb4a03 Update practical-project.en-US.md
Fix some grammatical errors
2017-06-29 21:33:17 +03:00
Egor Yurtaev
777e4adeb0 Add onRowDoubleClick into Table documentation 2017-06-29 18:30:07 +06:00
Benjy Cui
950c321b25 fix: should generate showHour from format k 2017-06-29 11:22:12 +08:00
Graeme Yeates
9429aedffc Fix tilde placement on rangepickers 2017-06-28 15:23:00 -04:00
Graeme Yeates
974f544713 Make -clear and -icon styles consistent at different input sizes 2017-06-28 15:09:50 -04:00
afc163
c79557b810 improve changelog format 2017-06-28 20:04:59 +08:00
afc163
76e848dc4b fix typo 2017-06-28 20:02:44 +08:00
Benjy Cui
8e9a2eae38 chore: fix ts lint 2017-06-28 16:49:49 +08:00
Benjy Cui
a4a26797ec fix: mention should support .focus, close: #6135 2017-06-28 16:30:01 +08:00
Benjy Cui
00932da89b test: update snapshot for rc-calendar and rc-input-number 2017-06-28 16:29:26 +08:00
Benjy Cui
1a11d7849f deps: unlock rc-animate's minor, close: #6631 2017-06-28 16:13:23 +08:00
newraina
4d002055b5 fix: TypeScript's definition of FormItemColOption (#6611) 2017-06-28 15:03:52 +08:00
newraina
e560cb26c3 fix dataPicker onOk type definition (#6619) 2017-06-28 10:19:53 +08:00
Benjy Cui
1920d9af46 chore: update details for #6584 2017-06-27 15:32:18 +08:00
afc163
e188036606 remove unused code 2017-06-27 14:33:35 +08:00
afc163
48e75e0436 fix hiddenTextarea typo 2017-06-27 14:32:12 +08:00
Alexander
9131a79377 chore: add className prop to DatePicker (#6584)
* Add className to DatePicker

* Add className to MonthPicker and RangePicker
2017-06-27 14:27:02 +08:00
afc163
60373cc363 adjust tree select checkbox position 2017-06-27 14:25:10 +08:00
afc163
dbd6f29c29 Fix form item extra content line height, close #6618 2017-06-27 12:08:16 +08:00
afc163
726541ae08 Improve autosize textarea scrollbar style, close #6609 2017-06-27 12:03:10 +08:00
afc163
3816778b6b Fix select overflow bug, close #6621 2017-06-27 11:01:11 +08:00
afc163
6e583325ea Don't impact select inside input group 2017-06-26 21:44:38 +08:00
afc163
0efd941346 Fix input group extra padding 2017-06-26 21:37:46 +08:00
afc163
fe564335bf Tweak range picker style 2017-06-26 21:25:47 +08:00
afc163
48b63734c6 Tweak date picker icon style 2017-06-26 21:19:23 +08:00
afc163
65adb9984e remove style important 2017-06-26 20:58:03 +08:00
afc163
78c12a03fd fix snapshot 2017-06-26 20:33:13 +08:00
afc163
e977f2435e Tweak tabs style at card top 2017-06-26 20:20:57 +08:00
afc163
e24a8cb5d8 Tweak inline form item margin 2017-06-26 17:05:42 +08:00
afc163
bedadb6b3c tweak alert message line-height 2017-06-26 15:37:27 +08:00
afc163
a65ff1c2df fix site style 2017-06-26 13:33:59 +08:00
afc163
5964e42a9b tweak form label style 2017-06-26 11:51:41 +08:00
偏右
0c11dbb535 Merge pull request #6603 from pmq20/master
Add Enclose.IO link in footer
2017-06-25 20:36:06 +08:00
Minqi Pan
d0bbfd3d2d Add Enclose.IO link in footer 2017-06-25 20:00:06 +08:00
afc163
9f78e71c65 Fix select vertical issue inside input addon 2017-06-25 17:22:07 +08:00
afc163
7dafa985c5 remove colon block of vertical form 2017-06-25 16:48:01 +08:00
RaoHai
890cca119b 2.11.2 2017-06-25 15:08:20 +08:00
偏右
e03670f55a Create CODE_OF_CONDUCT.md 2017-06-24 22:07:16 +08:00
偏右
111a1b100a Merge pull request #6601 from pierreneter/patch-1
Add relative for radio-button-wrapper.
2017-06-24 12:47:44 +08:00
Pierre Neter
f512baeb71 Add relative for radio-button-wrapper.
Fix e585103d4d (commitcomment-22720463)
2017-06-24 01:22:35 +07:00
Graeme Yeates
5d8a3f6f66 Use background-color-active for table sort and selected backgrounds 2017-06-23 12:43:40 -04:00
偏右
c7bbd0735a Merge pull request #6528 from ant-design/table-icons-tweak
Tweak table icons
2017-06-24 00:24:36 +08:00
Wei Zhu
41b79d9c96 Add changelog 2017-06-23 20:53:07 +08:00
Wei Zhu
7be75f59fd Tweak table icons 2017-06-23 20:53:07 +08:00
偏右
a4bf6cd90b Merge pull request #6597 from supra28/master
Update docs for checkbox and radio
2017-06-23 20:02:58 +08:00
Harshit Mehrotra
c7c3625899 Update docs for checkbox and radio
Update docs with prop "disabled" for Radio, RadioGroup, Checkbox and CheckboxGroup.
2017-06-23 16:38:22 +05:30
afc163
7151a4e720 update customize theme doc 2017-06-23 17:16:12 +08:00
afc163
2ba8e6fec6 Fix wrap="off" autosize error
close #6577
2017-06-23 16:40:07 +08:00
Benjy Cui
3ce1680ab7 fix: should not affect nested tabs, close: #6431 2017-06-23 15:02:46 +08:00
afc163
24364e5bf9 update pagination snapshot 2017-06-23 14:35:38 +08:00
Benjy Cui
7ff0573046 fix: broken style of disabled submenu in dropdown, close: #6548 2017-06-22 14:41:18 +08:00
偏右
94b04a81fb Merge pull request #6569 from megawac/fix-calendar-clear-background
Fix calendar clear background color
2017-06-22 10:44:33 +08:00
Graeme Yeates
aaf2a508be Fix calendar clear background color 2017-06-21 12:41:45 -04:00
afc163
5f9b000593 Add medium article link 2017-06-21 20:58:44 +08:00
afc163
0ed75caeac fix dark menu style 2017-06-21 16:44:13 +08:00
afc163
0e18c52b96 heading default text color 2017-06-21 16:08:57 +08:00
Jordan Hornblow
c832975663 refactor: Collapse import in TS (#6536) 2017-06-21 15:39:08 +08:00
偏右
4212103c91 Merge pull request #6556 from sojournerc/master
add ClickEvent to Table.props.onRowClick interface
2017-06-21 10:26:48 +08:00
sojournerc
e2a99f53f7 add ClickEvent to Table.props.onRowClick interface 2017-06-20 17:29:46 -06:00
afc163
2382250d82 Fix snapshot 2017-06-20 22:10:26 +08:00
afc163
78e39a5520 improve table locale text 2017-06-20 21:36:33 +08:00
Wei Zhu
5ede112633 Lowercase 2017-06-20 19:45:09 +08:00
Benjy Cui
39cc78685d style: update code style 2017-06-20 09:46:23 +08:00
blankzust
3c700cd1b7 fix: Dropdown.Button should support getPopupContainer (#6527) 2017-06-20 09:33:15 +08:00
afc163
3a2f6bea18 update menu demo 2017-06-19 16:07:48 +08:00
afc163
fa88477886 tweak vertical menu selected style 2017-06-19 16:07:47 +08:00
afc163
12c6a73878 update jsx code style 2017-06-19 16:07:47 +08:00
afc163
b4c70d2913 upgrade avatar demos 2017-06-19 16:07:47 +08:00
afc163
3afa6faa36 change components type 2017-06-19 16:07:47 +08:00
Benjy Cui
c61bba1020 chore: make disabled today different from other disabled day 2017-06-19 15:14:53 +08:00
Wei Zhu
48709cd583 Update changelog 2017-06-19 11:54:12 +08:00
Benjy Cui
82d1957941 docs: update demo for: #6503 2017-06-19 11:25:30 +08:00
afc163
644e23fac6 Make calendar selects rendered inside header, close #6479 2017-06-19 10:47:22 +08:00
Wei Zhu
02f4e5794c Bump 2.11.1 2017-06-19 00:16:50 +08:00
Wei Zhu
c40bdb9c77 Add 2.11.1 changelog (#6507) 2017-06-18 23:57:43 +08:00
afc163
dd6d643519 update doc 2017-06-17 14:14:30 +08:00
newraina
dde8df5612 fix Dropdown.Button Props (#6482)
* fix DropdownButton Props

* let DropdownButtonProps extends ButtonGroupProps

* remove duplicated props
2017-06-16 20:28:42 +08:00
afc163
9969a3b598 Improve doc 2017-06-16 16:56:03 +08:00
Benjy Cui
88ee7b3e8e docs: add demo for react-router@4, close: #5644 2017-06-16 14:57:14 +08:00
偏右
55d6d420bf Merge pull request #6494 from pierreneter/patch-1
Left border for wrap radio wrapper, small screen.
2017-06-16 11:57:40 +08:00
Benjy Cui
1debb624f3 site: fix build warning for #5646 2017-06-16 10:56:56 +08:00
Pierre Neter
e585103d4d Left border for wrap radio wrapper, small screen.
Fix #6492
2017-06-16 04:53:05 +07:00
偏右
9ed60b3fda Merge pull request #6490 from nvana/master
Fix(Documentation): Fix Menu documentation
2017-06-16 00:49:02 +08:00
Nico
cfccd84f62 Fix(Documentation): Fix Menu documentation 2017-06-15 18:08:01 +02:00
偏右
eeeafef4bb Merge pull request #5646 from ant-design/fix-breadcrumb
Fix: Breadcrumb should work with react-router@4
2017-06-15 19:11:25 +08:00
afc163
e34639a0a8 skip ssr test 2017-06-15 18:08:35 +08:00
Benjy Cui
fbe59e29a3 docs: update docs accoding to 7df0954 2017-06-15 17:50:33 +08:00
Pierre Neter
7df095414c docs: update i18n support 24 language (#6483)
Signed-off-by: Pierre Neter <pierreneter@gmail.com>
2017-06-15 17:34:38 +08:00
Wei Zhu
51f84e82e2 2.12.0-beta1 2017-06-15 16:45:46 +08:00
Wei Zhu
d4fd348114 Uprgade rc-table 2017-06-15 16:36:09 +08:00
afc163
a5cc8b33e3 fix menu border in demo 2017-06-15 15:39:55 +08:00
afc163
e62fa2a403 remove overflow:auto in Content 2017-06-15 15:37:24 +08:00
afc163
d7a29f682b upgrade Col span format in demo 2017-06-15 15:34:47 +08:00
afc163
42d279b691 clean devDeps 2017-06-15 14:33:37 +08:00
afc163
1f3b9e4ee2 fix deps and snapshot 2017-06-15 13:57:07 +08:00
afc163
a644510677 change md file name 2017-06-15 13:41:18 +08:00
偏右
7e2828d4a4 Merge pull request #6370 from loganpowell/translation
advanced search translation
2017-06-15 13:40:01 +08:00
偏右
c140daabc5 Merge branch 'master' into fix-breadcrumb 2017-06-15 13:36:19 +08:00
afc163
9cf1d72e3e remove if lte in IE11, it is not working 2017-06-14 20:14:08 +08:00
afc163
81be11534c fix lint 2017-06-14 13:48:00 +08:00
afc163
64466a79cb update spin demo 2017-06-14 13:31:21 +08:00
afc163
7889832280 Fix changelog 2017-06-13 21:05:56 +08:00
Benjy Cui
3b49abb104 deps: upgrade rc-form to 1.4.0 2017-06-13 17:38:06 +08:00
afc163
e13ffac490 update doc 2017-06-13 17:36:54 +08:00
afc163
22b3a3979a update changelog 2017-06-13 17:35:55 +08:00
afc163
61d67f4563 Fix DatePicker footer extra border 2017-06-13 15:31:47 +08:00
afc163
c90e0b3667 update recommendation links 2017-06-13 15:12:47 +08:00
Jordan Hornblow
51655e2e7c Allow Number type table keys. Make notification success, error, info, warn and warning non-optional (#6434)
* Allow Number type table keys. Make notification success, error, info, warn and warning non-optional

* Fix build error
2017-06-13 14:43:19 +08:00
Benjy Cui
3512dff758 chore: update PR template 2017-06-13 14:40:09 +08:00
Benjy Cui
2cfa7eb978 chore: update PR template 2017-06-13 14:38:34 +08:00
偏右
c0b6f652cc Merge pull request #6441 from sadmark/fix-tabs
修复tabs嵌套bug,issue#6431
2017-06-12 16:41:31 +08:00
sadmark
9be44edf26 修复tabs嵌套bug,issue#6431 2017-06-12 16:28:35 +08:00
Wei Zhu
847153d998 docs: Document Table column[key] can be ignored.
Related #6436
2017-06-12 15:52:13 +08:00
Wei Zhu
baa8e23280 Pass className to table's pagination
fix #6416
2017-06-12 11:35:29 +08:00
Benjy Cui
0bea0f6482 Revert "fix #6426"
This reverts commit f88139396d.
2017-06-12 10:57:12 +08:00
afc163
3202d28cb9 Add mobile.ant.design link in menu, close #3079 2017-06-12 10:41:11 +08:00
afc163
28c7545030 update doc 2017-06-12 10:41:10 +08:00
偏右
cd2ab56a16 Merge pull request #6429 from atomicpages/patch-1
Updating link for react-blocks
2017-06-11 13:32:11 +08:00
Dennis Thompson
d5a4c93e7a Updating link for react-blocks 2017-06-10 17:58:19 -07:00
afc163
f88139396d fix #6426 2017-06-10 13:44:22 +08:00
afc163
4f874c5065 improve demo code 2017-06-09 21:24:40 +08:00
afc163
cccd61114d fix emoji 2017-06-09 20:16:31 +08:00
afc163
602cf0a309 Add test case 2017-06-09 20:00:16 +08:00
afc163
4f5f12d81e update changelog 2017-06-09 19:52:19 +08:00
afc163
e81ac57382 bump to 2.11.0 2017-06-09 19:50:53 +08:00
afc163
25a6fe0287 update changelog 2017-06-09 19:50:53 +08:00
afc163
254c4c40b6 upgrade deps 2017-06-09 19:50:53 +08:00
偏右
ace361e3ab Merge pull request #6424 from newraina/fix-dropdown-button-type
fix Dropdown.Button's type definition
2017-06-09 19:50:18 +08:00
newraina
1d63de1106 fix Dropdown.Button's type definition 2017-06-09 18:37:05 +08:00
偏右
2255275daa Merge pull request #6388 from ant-design/docs-changelog
docs: add change log for 2.11.0
2017-06-09 18:11:22 +08:00
Benjy Cui
97fb038dde docs: add change log for 2.11.0 2017-06-09 18:06:17 +08:00
偏右
053521be39 Merge pull request #6415 from ddcat1115/Avatar
Avatar
2017-06-09 17:36:00 +08:00
Aaron Planell López
de030a0333 update document, ref #6392 (#6420) 2017-06-09 15:21:01 +08:00
乐仪
e6ad9daff8 update snap 2017-06-09 15:11:38 +08:00
乐仪
8749438aed add Badge demo 2017-06-09 15:00:44 +08:00
乐仪
153fb0fc34 improve2 2017-06-09 12:02:25 +08:00
乐仪
7667225b0f improve 2017-06-09 12:02:25 +08:00
乐仪
c30d1b191f add Avatar 2017-06-09 12:02:24 +08:00
Benjy Cui
bac9cee1d8 deps: upgrade rc-tabs 2017-06-09 10:52:59 +08:00
Benjy Cui
4ee2194b45 deps: upgrade rc-notification 2017-06-09 10:17:30 +08:00
Benjy Cui
109afc53ef deps: upgrade deps' patch, close: #6412 2017-06-09 10:07:59 +08:00
afc163
ef79554bd1 AFUX 2017-06-08 18:22:06 +08:00
Benjy Cui
9b025806b8 fix: remove align.offset, ref: 0a1c0712 2017-06-08 17:27:28 +08:00
afc163
1c736c38b3 tweak Input[addon] vertical align, close #6403 2017-06-08 11:32:47 +08:00
afc163
448a3ff4dd Fix operations typo of Transfer, close #6401 2017-06-08 10:37:08 +08:00
偏右
d9c0d10e43 Merge pull request #6400 from megawac/autocomplete-placeholder-margin
Use input-padding-horizontal to control autocomplete placeholder placing
2017-06-08 10:29:22 +08:00
偏右
015dab8cca Merge pull request #6397 from Evgeny81/patch-1
Update es_EE.tsx
2017-06-08 10:28:56 +08:00
Evgeny Kuznetsov
1b79b74bea Update et_EE.tsx 2017-06-07 21:52:08 +03:00
Graeme Yeates
7b916da2ae Use input-padding-horizontal to control autocomplete placeholder placing 2017-06-07 13:40:33 -04:00
Evgeny Kuznetsov
23df258f50 Update es_EE.tsx
Pagination import was ommited, so chinese placeholders appeared.
2017-06-07 17:00:19 +03:00
Benjy Cui
b0040bfc37 test: update snapshot 2017-06-07 17:39:44 +08:00
afc163
d7837da175 Fix icon API documentation 2017-06-07 17:06:21 +08:00
Benjy Cui
1682d2cd14 Merge pull request #6380 from ant-design/feature-2.11
Feature 2.11
2017-06-07 09:14:39 +08:00
偏右
eb901c4bc6 Merge pull request #6385 from hyrijk/master
docs: fix Upload[beforeUpload]
2017-06-06 22:53:23 +08:00
peiming
426a35c248 docs: fix Upload[beforeUpload] 2017-06-06 21:51:27 +08:00
afc163
b991137628 fix spin timer, close #6383 2017-06-06 20:38:44 +08:00
afc163
41f157e596 Fix Select search input width, close #6382 2017-06-06 20:38:44 +08:00
Benjy Cui
14de57c32e test: update snapshot 2017-06-06 17:55:01 +08:00
Benjy Cui
2e313ef8f0 Merge branch 'master' into feature-2.11 2017-06-06 17:26:06 +08:00
Benjy Cui
5e55383796 deps: lock antd-tools to minor, to avoid eslint failed 2017-06-06 17:17:18 +08:00
afc163
df6f75b343 upgrade to rc-switch 1.5.1 2017-06-06 14:36:05 +08:00
afc163
505cc23a74 Improve doc for create-react-app, close #6371 2017-06-06 13:40:51 +08:00
Benjy Cui
8c632ef2cf fix: Modal.method should stop loading when promise throw err, close: #6183 2017-06-06 11:51:50 +08:00
loganpowell
975b25f9d5 adding advanced search 2017-06-05 20:05:42 -04:00
loganpowell
f51d48fb33 testing translation 2017-06-05 17:25:56 -04:00
偏右
920b32e94c Merge pull request #6344 from damiangreen/master
Add en-GB, it-IT, fr-FR + nl_BE locales
2017-06-05 18:05:22 +08:00
Damian Green
ea616e4deb tests 2017-06-05 10:28:45 +01:00
afc163
268336a651 update snapshots 2017-06-05 17:15:41 +08:00
afc163
6790e80f3e Add renderExtraFooter for DatePicker
close #6122, close #5188
2017-06-05 17:11:58 +08:00
afc163
45f5d6cdfe Tweak progress text width, close #6354 2017-06-05 14:13:15 +08:00
paranoidjk
cc5f2edde1 feat: upgrade bisheng.
ref https://github.com/ant-design/ant-design-mobile/issues/1292
2017-06-05 11:54:04 +08:00
afc163
670a4d09a1 Fix Timeline.Item type, close #6356 2017-06-05 11:39:59 +08:00
afc163
d086ee253e update snapshots for #6347 2017-06-03 01:38:26 +08:00
afc163
0a1c0712a2 Fix DatePicker panel position, close #6347 2017-06-03 01:37:02 +08:00
afc163
dc314983b9 fix changelog for 2.10.4 2017-06-03 01:06:24 +08:00
afc163
bd2ad34300 Add changelog for 2.10.4 2017-06-03 01:05:27 +08:00
afc163
920adb9a8a props.style in wrapper for input with addons 2017-06-03 00:55:30 +08:00
Damian Green
5e84b79996 bump rc-pagination@1.9.4 2017-06-02 16:58:42 +01:00
Damian Green
9193c05102 fix lint 2017-06-02 14:58:13 +01:00
afc163
8e8f19e2b5 update snapshot 2017-06-02 21:55:04 +08:00
Damian Green
6d74ea346f Add en-GB, it-IT, fr-FR + nl_BE locales 2017-06-02 14:40:32 +01:00
afc163
c209c45660 fix #6339 2017-06-02 16:33:11 +08:00
afc163
f40be3d7ac Tweak pagination style for vertical align and focused state 2017-06-02 16:32:42 +08:00
Benjy Cui
e01c8c8ff6 fix: should work with ES2015 module, close: #6334 2017-06-02 16:11:30 +08:00
Benjy Cui
ef54b60add docs: add docs for TimePicker[defaultOpenValue], close: #6336 2017-06-02 14:28:56 +08:00
偏右
f36c6933af Merge pull request #6326 from longersson/feature-2.11
Add Polish language support
2017-06-02 10:20:12 +08:00
Patryk
e2be361cd0 Add Polish language support 2017-06-01 22:43:12 +02:00
afc163
9bb7ec0b87 update form demo snapshot 2017-06-01 17:58:06 +08:00
afc163
becb888f6e Fix form demo, close #6323 2017-06-01 17:56:05 +08:00
afc163
b0aef6cad5 Fix Tree and TreeSelect disabled style, close #6320 2017-06-01 16:54:47 +08:00
Wei Zhu
e6ef5b5707 User static variable for element type detection 2017-06-01 15:07:37 +08:00
Wei Zhu
fd7ef2407c Don't need extends from rc-table
Fix #6313
2017-06-01 14:49:25 +08:00
afc163
dd60cf8ca2 Add link 2017-06-01 14:12:26 +08:00
afc163
45dee9e504 animating node should not be accessible, close #6314 2017-06-01 12:11:23 +08:00
slientcloud
e43c8012ad chore: support slider aira (#6301) 2017-06-01 12:08:39 +08:00
Benjy Cui
4e75347d35 deps: upgrade rc-pagination 2017-06-01 10:44:00 +08:00
Adrian Dimitrov
d629086c74 feat: added Bulgarian translation (#6297)
* Added Bulgarian translation

* Update bg_BG.tsx
2017-06-01 10:32:10 +08:00
Leo
f4312895d6 chore: componentDecorator return specific type instead of any (#6308) 2017-06-01 09:25:32 +08:00
Leon
cf8aa16761 docs: change a reference link in docs (#6307)
* 更改链接路径

原文路径不对,页面不存在,更改好可以~

* change reference link

add 'docs/' to make reference link right
2017-06-01 09:24:21 +08:00
Wei Zhu
0080b6ddf5 Bump version 2017-05-31 22:33:33 +08:00
Benjamin Kniffler
47d43e579f Bump rc-util to 4.0.4 (#6311) 2017-05-31 20:56:56 +08:00
乐仪
f03e5549bf Merge branch 'master' of https://github.com/ant-design/ant-design into feature-2.11 2017-05-31 20:01:07 +08:00
afc163
47c58fb0b2 tsc ignore lib and es folders 2017-05-31 18:23:52 +08:00
afc163
fd625ef1a0 upgrade and fix tslint problems 2017-05-31 15:48:35 +08:00
乐仪
af89c14e4a bump 2.10.3 2017-05-31 15:20:11 +08:00
Benjy Cui
35095fc776 test: fix CI 2017-05-31 11:19:17 +08:00
Benjy Cui
a4a6db76de deps: upgrade rc-calendar 2017-05-31 10:45:45 +08:00
afc163
b57047c919 upgrade typescript to 2.3, close #6263 2017-05-30 17:48:07 +08:00
afc163
4417dcf300 fix tsc 2017-05-29 19:06:26 +08:00
偏右
52833f50f5 Merge pull request #6291 from jch254/ts-fixes
Badge and Table TypeScript fixes
2017-05-29 18:24:52 +08:00
Jordan Hornblow
ba65f9429e Add onCellClick prop to ColumnProps interface 2017-05-29 20:17:01 +10:00
Jordan Hornblow
03adcefafd Make count prop optional in BadgeProps interface
E.g. https://ant.design/components/badge/#components-badge-demo-dot
2017-05-29 20:14:16 +10:00
afc163
fa235b7876 Fix RangePicker test case 2017-05-29 16:19:59 +08:00
afc163
709c750c2b Fix InputNumber feedback z-index issue, close #6289 2017-05-29 01:51:13 +08:00
afc163
85d8137506 fix create-react-app doc 2017-05-28 17:03:34 +08:00
afc163
deebe4d973 site: tweak style 2017-05-28 15:35:49 +08:00
afc163
2cde334cd5 update snapshot 2017-05-28 15:30:43 +08:00
afc163
14844eb0e0 Fix AutoComplete and Input Group vertical align issue 2017-05-28 15:27:55 +08:00
偏右
c3159a11e2 Merge pull request #6235 from ant-design/upgrade-rc-tree-select
Upgrade rc-tree-select
2017-05-28 13:08:59 +08:00
偏右
62f4e44ac6 Merge pull request #6286 from panjiesw/layout-types
better typings for layout components
2017-05-28 12:59:01 +08:00
Panjie Setiawan Wicaksono
cc71ab957e better typings for layout components 2017-05-28 02:20:05 +07:00
偏右
0d5fc18db7 Merge pull request #6283 from clinyong/bugfix
Input add autoFocus prop (for ts checking)
2017-05-27 16:45:37 +08:00
clinyong
2202648d6e Input add autoFocus prop (for ts checking) 2017-05-27 16:37:15 +08:00
Wei Zhu
f5247aba61 docs: Add polyfill note
close #6190
2017-05-27 14:18:14 +08:00
Benjy Cui
1b607baddc feat: expose components in ES2015 module 2017-05-27 14:09:07 +08:00
Benjy Cui
d7ac759a22 Revert "test: remove useless config"
This reverts commit eb25e96565.
2017-05-27 11:55:54 +08:00
Benjy Cui
eb25e96565 test: remove useless config 2017-05-27 11:35:19 +08:00
Benjy Cui
b8118bb09c test: update test config 2017-05-27 11:13:52 +08:00
Benjy Cui
81d609c41a test: fix ci 2017-05-27 11:02:06 +08:00
Benjy Cui
addc0ca521 build: update build config 2017-05-27 10:05:07 +08:00
Panjie Setiawan Wicaksono
1abbc1c31b chore: add name props to input-related interfaces (#6276) 2017-05-27 09:31:06 +08:00
Jordan Hornblow
720a3d30b4 fix: Form and Mention TypeScript definition (#6268)
* Add source and options params to Form.ValidationRule.validator function

As per rules section of async-validation readme: https://github.com/yiminghe/async-validator#rules

* Make prefixCls optional in MentionProps interface
2017-05-26 09:16:53 +08:00
Benjy Cui
03504446b5 chore: antd doesn't support IE8 anymore 2017-05-25 17:39:53 +08:00
Benjy Cui
99048fa9bf chore: antd-tools will handle this 2017-05-25 17:09:19 +08:00
Benjy Cui
0e5431d21b deps: upgrade antd-tools and code style 2017-05-25 16:54:15 +08:00
afc163
551b17203c Fix showSearch doc, close #6253 2017-05-25 11:57:45 +08:00
偏右
c50e02dcbf Merge pull request #6255 from jch254/missing-table-column-props
Add filterDropdownVisible and onFilterDropdownVisibleChange to ColumnProps interface
2017-05-24 18:04:42 +08:00
Jordan Hornblow
acdc563a54 Add filterDropdownVisible and onFilterDropdownVisibleChange to ColumnProps interface 2017-05-24 19:38:39 +10:00
afc163
4d645a256f tweak select placeholder text align 2017-05-24 16:48:45 +08:00
afc163
f28c328442 update code style 2017-05-24 16:19:10 +08:00
afc163
55fc44aba4 fix table wrapper node null, #6245 2017-05-24 16:16:42 +08:00
afc163
54c6b63e9f Fix table filter menu overflow issue, close #6245 2017-05-24 12:17:40 +08:00
Benjy Cui
67c38fa3b4 fix: should hide collapsed children, close: #6131 2017-05-24 10:25:43 +08:00
Benjy Cui
977a5a1cc7 docs: add missing API docs for Modal, close: #6239 2017-05-24 10:00:59 +08:00
afc163
d6da30573b Fix inactive tab panel behavious, close #6237 2017-05-23 17:59:27 +08:00
afc163
5ef4828974 Remove default margin-bottom of Alert 2017-05-23 17:51:10 +08:00
afc163
5b4adeb339 tweak spin style 2017-05-23 17:48:13 +08:00
afc163
f414398fae Fix disabledDate of Calendar, close #6074 2017-05-23 17:10:56 +08:00
RaoHai
b83529daf2 append changelog 2017-05-23 15:13:16 +08:00
Wei Zhu
97c75d4ea8 Upgrade rc-tree-select
* Add allowClear to checkable and multiple select.
2017-05-23 14:51:27 +08:00
RaoHai
03fc4f57be supplement changeLog 2017-05-23 11:01:38 +08:00
偏右
61e680875c Merge pull request #6224 from ant-design/feat-input-number-precision
support precision of InputNumber
2017-05-22 21:43:36 +08:00
afc163
861c5b33d1 support precision of InputNumber, close #5998 2017-05-22 17:40:12 +08:00
afc163
584102d085 Merge branch 'master' into feature-2.11 2017-05-18 21:20:03 +08:00
偏右
3f7802bce6 Merge pull request #6175 from ant-design/feat-collapse
feat: Collapse.Panel supports disabled, close: #6119
2017-05-17 14:29:06 +08:00
Benjy Cui
863b777361 feat: Collapse.Panel supports disabled, close: #6119 2017-05-17 14:01:58 +08:00
Benjy Cui
581040fc5d fix: Breadcrumb should work with react-router@4 2017-04-06 14:38:40 +08:00
536 changed files with 13565 additions and 4906 deletions

View File

@@ -1,6 +1,10 @@
{
"presets": ["es2015", "react", "stage-0"],
"plugins": [
"add-module-exports"
]
"env": {
"test": {
"presets": ["es2015", "react", "stage-0"],
"plugins": [
"add-module-exports"
]
}
}
}

View File

@@ -1,5 +1,6 @@
components/**/*.js
components/**/*.jsx
components/*/__tests__/type.tsx
!.eslintrc.js
!components/*/__tests__/*
!components/*/__tests__/**/*.js
!components/*/demo/*

View File

@@ -1,9 +1,22 @@
First of all, thanks for your contribution! :-)
First of all, thank you for your contribution! :-)
Please makes sure these boxes are checked before submitting your PR, thank you!
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
* [ ] Make sure you propose PR to correct branch: bugfix for `master`, feature for latest active branch `feature-x.x`.
* [ ] Make sure you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd).
* [ ] Make sure that you propose PR to right branch: bugfix for `master`, feature for latest active branch `feature-x.x`.
* [ ] Make sure that you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd).
* [ ] Run `npm run lint` and fix those errors before submitting in order to keep consistent code style.
* [ ] Rebase before creating a PR to keep commit history clear.
* [ ] Add some descriptions and refer relative issues for you PR.
Extra checklist:
**if** *isBugFix* **:**
* [ ] Make sure that you add at least one unit test for the bug which you had fixed.
**elif** *isNewFeature* **:**
* [ ] Update API docs for the component.
* [ ] Update/Add demo to demonstrate new feature.
* [ ] Update TypeScript definition for the component.
* [ ] Add unit tests for the feature.

2
.gitignore vendored
View File

@@ -26,6 +26,7 @@ _site
_data
dist
/lib
/es
elasticsearch-*
config/base.yaml
/.vscode/
@@ -35,3 +36,4 @@ components/**/*.js
components/**/*.jsx
!components/**/__tests__/*.js
!components/**/__tests__/*.js.snap
/.history

45
.jest.js Normal file
View File

@@ -0,0 +1,45 @@
const libDir = process.env.LIB_DIR;
const transformIgnorePatterns = [
'/dist/',
'node_modules\/[^/]+?\/(?!(es|node_modules)\/)', // Ignore modules without es dir
];
module.exports = {
setupFiles: [
'./tests/setup.js',
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'md',
],
modulePathIgnorePatterns: [
'/_site/',
],
testPathIgnorePatterns: [
'/node_modules/',
'dekko',
'node',
],
transform: {
'\\.tsx?$': './node_modules/antd-tools/lib/jest/codePreprocessor',
'\\.js$': './node_modules/antd-tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/antd-tools/lib/jest/demoPreprocessor',
},
testRegex: libDir === 'dist' ? 'demo\\.test\\.js$' : '.*\\.test\\.js$',
collectCoverageFrom: [
'components/**/*.{ts,tsx}',
'!components/*/style/index.tsx',
'!components/style/index.tsx',
'!components/*/locale/index.tsx',
'!components/*/__tests__/**/type.tsx',
],
transformIgnorePatterns,
snapshotSerializers: [
'enzyme-to-json/serializer',
],
};

21
.jest.node.js Normal file
View File

@@ -0,0 +1,21 @@
module.exports = {
setupFiles: [
'./tests/setup.js',
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'md',
],
transform: {
'\\.tsx?$': './node_modules/antd-tools/lib/jest/codePreprocessor',
'\\.js$': './node_modules/antd-tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/antd-tools/lib/jest/demoPreprocessor',
},
testRegex: 'demo\\.test\\.js$',
testEnvironment: 'node',
snapshotSerializers: [
'enzyme-to-json/serializer'
],
};

View File

@@ -1,19 +0,0 @@
{
"setupFiles": [
"./tests/setup.js"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"md"
],
"transform": {
"\\.tsx?$": "./node_modules/typescript-babel-jest",
"\\.js$": "./node_modules/babel-jest",
"\\.md$": "./node_modules/antd-demo-jest"
},
"testRegex": "demo\\.test\\.js$",
"testEnvironment": "node",
"snapshotSerializers": ["enzyme-to-json/serializer"]
}

View File

@@ -1,10 +1,7 @@
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-name-space-after": null,
"comment-empty-line-before": null,
"declaration-bang-space-before": null,
"declaration-empty-line-before": null,
"function-comma-newline-after": null,
"function-name-case": null,

View File

@@ -19,14 +19,18 @@ script:
npm run lint
elif [ "$TEST_TYPE" = dist ]; then
npm run dist && \
node ./tests/dekko/dist.test.js
node ./tests/dekko/dist.test.js && \
LIB_DIR=dist npm test -- --coverage -w 2
elif [ "$TEST_TYPE" = compile ]; then
npm run dist && \
npm run compile && \
node ./tests/dekko/lib.test.js
node ./tests/dekko/lib.test.js && \
LIB_DIR=es npm test -- --coverage -w 2 && \
LIB_DIR=lib npm test -- --coverage -w 2
elif [ "$TEST_TYPE" = test:dom ]; then
npm run dist && \
npm test -- --coverage -w 2 && \
bash <(curl -s https://codecov.io/bash)
elif [ "$TEST_TYPE" = test:node ]; then
npm test -- --config .jest.node.json -w 2
npm run test-node -- -w 2
fi

View File

@@ -1,110 +1,249 @@
Aaron Planell López <aaronplanell@gmail.com>
Adrian Dimitrov <dimitrov.adrian@gmail.com>
Albert Zheng <lisong.zheng@gmail.com>
Albert 理斯特 <shuaizhexu@gmail.com>
Alexander <labriko@yandex.ru>
Alexandre Kirszenberg <a.kirszenberg@gmail.com>
Anas Tawfeek <anas.tawfeek@outlook.com>
Andrew Murray <radarhere@gmail.com>
Andrey G <plandem@gmail.com>
Arthur Denner Oliveira Santos <arthurdenner7@gmail.com>
BK Heleth <bon.hoo@hotmail.com>
Babajide Fowotade <jide.b.tade@gmail.com>
Benjamin Kniffler <bkniffler@me.com>
Benjy Cui <benjytrys@gmail.com>
Bernie <bernie.wangbj@gmail.com>
Bill Sheikh <bilawals22@gmail.com>
Bo Chen <bochen2014@yahoo.com>
Bozhao <yubz86@gmail.com>
Brett Lamy <bel423@me.com>
Brook Shi <iwxiaot@gmail.com>
Bruce Mitchener <bruce.mitchener@gmail.com>
Bruno Maia <bruno.mm.maia@gmail.com>
C <4019980@qq.com>
Cam Song <neosoyn@gmail.com>
Catalin Miron <mironcatalin@gmail.com>
Cee Cirno <i@cee.moe>
Chikara Chan <chenhongtu@51xianqu.net>
Chris Kelly <cjke.7777@gmail.com>
ChrisFan <chris.fan.dev@gmail.com>
Cody Chan <int64ago@gmail.com>
Colton Pierson <colton@coltonpierson.com>
Conway Anderson <hello@conwayanderson.com>
Cordaro <elvis07@163.com>
D & R <jdz321@qq.com>
Damian Green <damian.green@microlease.com>
Danny Hoower Antonio Viasus Avila <danjavia@gmail.com>
Daqi Song <dqaria@gmail.com>
Darren Poon <dyhpoon@gmail.com>
DengYun <tdzl2003@gmail.com>
Dorian <dorian@doma.io>
Edd Hannay <accounts@edd.fm>
Eddie Xie <oeddyo@gmail.com>
Eden Wang <yociduo@vip.qq.com>
Egor Yurtaev <yurtaev.egor@gmail.com>
Emma <sima.zhang1990@gmail.com>
Eric <84263800@qq.com>
Erwann Mest <m+github@kud.io>
Evgeny Kuznetsov <jackk@ya.ru>
Eward Song <eward.song@gmail.com>
Graeme Yeates <gyeates@clearpath.ai>
Graeme Yeates <yeatesgraeme@gmail.com>
Gray Choi <gray.choi.1988@gmail.com>
Guan Hao <raptium@gmail.com>
HJin.me <hjin.me@gmail.com>
Hai Phan Nguyen <pnghai@gmail.com>
Haibin Yu <haibin.yu@oceanwing.com>
Hanai <ihanai1991@gmail.com>
Haroen Viaene <fingebimus@me.com>
Harshit Mehrotra <harshitmehrotra@hotmail.com>
Hubert Argasinski <argasinski.hubert@gmail.com>
Hugo LEHMANN <shogi31@gmail.com>
Igor G <i.gaidai4uk@gmail.com>
ImJoeHs <865439601@qq.com>
Inclined.Z <zjq0717@163.com>
Infinity <305870677@qq.com>
Ivo Stratev <ivo.stratev.tues@gmail.com>
James <james@schoolshape.com>
Jerry Bendy <jerry@icewingcc.com>
Jesper We <jesper@journeyman.se>
Jialei <jialeicui@126.com>
Jieraaa <842533841@qq.com>
Joe <qiaolibo@126.com>
Joe Hsu <jhsu.x1@gmail.com>
Jonatas Walker <jonataswalker@gmail.com>
Jordan Hornblow <jordan@jch254.com>
Junyu Zhan <irrigator@yeah.net>
Kenaniah Cerny <kenaniah@gmail.com>
Kenneth Truong <kenneth.e.truong@gmail.com>
Kevin Ivan <info@kevinivan.com>
KgTong <kgtong1992@gmail.com>
Kimmo Saari <kimmo.saari@revolt.fi>
Knacktus <knacktus@gmail.com>
Kyle Rosenberg <kyle.rosenberg@gmail.com>
Larry Laski <larry.laski@gmail.com>
LeeHarlan <709886167@qq.com>
Leo <clinyong@gmail.com>
Leon Shi <superRaytin@163.com>
Leon Shi <superRaytin@gmail.com>
Liu Yang <zation1@gmail.com>
LongYinan <lynweklm@gmail.com>
MG12 <wuzhao.mail@gmail.com>
Ma Tianxiao <matx2215@outlook.com>
Madis Väin <madisvain@gmail.com>
Manjit Kumar <manjit1727@gmail.com>
Marius Ileana <visvadw@gmail.com>
Marshall Chen <Juniors.fei@gmail.com>
Martin Litvaj <kamahl19@gmail.com>
Martin Novák <martinnovak@outlook.com>
Meck <yesmeck@gmail.com>
MeiLin <postget.me@gmail.com>
Min <dicklwm@163.com>
Minqi Pan <pmq2001@gmail.com>
Minsung Ryu <ryums0227@gmail.com>
Mitchell Demler <mitchell.demler@harcourts.net>
Mr.Tone <vector@malubei.com>
Nathan Tavares Nascimento <nathan.tnascimento@gmail.com>
Nathan Wells <nwwells@gmail.com>
Neverland <chenjiahan@buaa.edu.cn>
Nico <nicolas@freddelacompta.com>
Nimo <nimo.jser@gmail.com>
Nishant Arora <na.nishantarora@gmail.com>
OAwan <georgio.wan@gmail.com>
Panjie Setiawan Wicaksono <panjie@panjiesw.com>
Patrick Gidich <patrick.gidich@simnova.com>
Patryk <longer44@gmail.com>
Peter Berg <atticusberg@gmail.com>
Pierre <pierre@bazoge.com>
Piper Chester <piperchester@gmail.com>
Pixy Yuan <pixy.bupt@gmail.com>
Pyiner <lijiuyang1992@gmail.com>
Qiaosen Huang <joesonw@gmail.com>
Qingrong Ke <keqingrong1992@gmail.com>
Rafael Cosman <rafaelcosman@alumni.stanford.edu>
RaoHai <surgesoft@gmail.com>
Rex <zhangzilong.zzl@163.com>
Richard D. Worth <rdworth@gmail.com>
Robert Wilkinson <wilkinson.robert.a@gmail.com>
Rrrandom <emanonhere@gmail.com>
Sakol Assawasagool <koobitor@gmail.com>
Sanjay Kumar <sk@tectusdreamlab.com>
Sean Lin <sean@ejoy.com>
Sean Sun <pinggodstudio@gmail.com>
Sebastian Blade <blade254353074@hotmail.com>
Sergio Crisostomo <sergiosbox@gmail.com>
Shawn Sit <xueqingxiao@gmail.com>
ShiTengFei <shitengfei@goyoo.com>
SimaQ <sima.zhang1990@gmail.com>
Tao Zhang <windse7en@gmail.com>
The Rock <zhoguoxin@126.com>
Tino D <ginodeis@gmail.com>
Tyler <chaotyler@gmail.com>
Vadim Macagon <vadim.macagon@gmail.com>
Valentin Vichnal <valentin@vichnal.com>
Vemund Santi <veund@santi.no>
Vincent Zhang <vxzhong@qq.com>
Walter Barbagallo <turbometalskater@gmail.com>
Warren Seymour <warren@fountainhead.tech>
Wei Zhu <yesmeck@gmail.com>
Will Chen <willchen90@gmail.com>
Xie Guanglei <xieguanglei@hotmail.com>
Yiming <ymjrcc@qq.com>
Yogesh <yogeshkumar180592@gmail.com>
Yusuke Ito <novi.mad@gmail.com>
Yuwei Ba <i@xiaoba.me>
YuyingWu <wuyuying1128@gmail.com>
Zack Craig <zack@zack6849.com>
Zap <a124116186@qq.com>
afc163 <afc163@gmail.com>
ashishg-qburst <ashishg@qburst.com>
bang <sqibang@gmail.com>
bang88 <sqibang@gmail.com>
blankzust <450811238@qq.com>
caoyi <caoyi0905@mail.hfut.edu.cn>
cathayandy <wzm_andy@126.com>
chchen <cc272309126@gmail.com>
chencheng (云谦) <sorrycc@gmail.com>
clinyong <clinyong@gmail.com>
corneyl <cornieljoosse@gmail.com>
ddcat1115 <ddcat1115@gmail.com>
denzw <denzw@21cn.com>
detailyang <detailyang@gmail.com>
devqin <devqin@gmail.com>
djorkaeff <djorkae55@gmail.com>
duzliang <duzliang@gmail.com>
ecofe <150641329@qq.com>
edgji <j.edgji@gmail.com>
elios <elios264@hotmail.com>
elrrrrrrr <elrrrrrrr@gmail.com>
ezpub <ez.foro@gmail.com>
feng zhi hao <fzhihao@outlook.com>
fengmk2 <m@fengmk2.com>
flashback313 <windmark2012@gmail.com>
genie <genie88@163.com>
handycode <lihandi@gmail.com>
hansnow <hansnow2012@gmail.com>
haoxin <coderhaoxin@outlook.com>
hardfist <yangjianzju@gmail.com>
hi-caicai <hi@cai-cai.me>
iamcastelli <sowed@cyberdude.com>
ioldfish <fish.wangl@gmail.com>
jasonslyvia <jasonslyvia@gmail.com>
jiang <155259966@qq.com>
jinouwuque <ee2win@gmail.com>
kacjay <45483388@qq.com>
kagawagao <kingsongao1221@gmail.com>
kaifei <150641329@qq.com>
kasinooya <kasinooya@gmail.com>
kayw <kayw@outlook.com>
kdenz <ksnz93@gmail.com>
keng <keng@renderinghouse.com>
ko <git@yaksok.net>
kossel <lis.yichao@gmail.com>
kun sam <kunsam624@icloud.com>
leadream <857098475@qq.com>
lehug <zcszuo5811@126.com>
leon.shi <superRaytin@163.com>
lgmcolin <gengmin.lgm@gmail.com>
lgmcolin <lgmcolin@gmail.com>
liekkas <zjq0717@163.com>
lixiaochou077 <qi.liqi07@gmail.com>
lixiaoyang <lixiaoyang2345@gmail.com>
lizhaocai <lzc09008@gmail.com>
loganpowell <loganp@tepper.cmu.edu>
mArker <252133226@qq.com>
mitchell.demler <mitchell.demler@harcourts.net>
muzuiget <muzuiget@gmail.com>
natergj <nater_nater@me.com>
paranoidjk <hust2012jiangkai@gmail.com>
parlop <parlop@gmail.com>
pd4d10 <pd4d10@gmail.com>
peiming <hyrijk@gmail.com>
pinggod <pinggodstudio@gmail.com>
pizn <pizner@gmail.com>
plandem <plandem@gmail.com>
popomore <sakura9515@gmail.com>
qubaoming <qubaoming@didichuxing.com>
ryangun <ryangun@foxmail.com>
sadmark <zhoubin@laidian360.com>
shelwin <wxfans@gmail.com>
shenlin192@gmail.com <shenlin192@gmail.com>
shlice <licesh@gmail.com>
shouyong <enlangs@163.com>
simaQ <sima.zhang1990@gmail.com>
slientcloud <rjmuqiang@gmail.com>
snadn <snadn@snadn.cn>
sojournerc <cmeyer@zvelo.com>
sorrycc <sorrycc@gmail.com>
swindme <swindme@163.com>
tianli.zhao <275287902@qq.com>
tom <caolvchong@gmail.com>
ustccjw <317713370@qq.com>
wangtao0101 <yuecjn@gmail.com>
warmhug <hualei5280@gmail.com>
whtang906 <whtang906@gmail.com>
wizawu <wizawu@gmail.com>
wonyun <wy393767068@163.com>
xiaofan2406 <xiaofan2406@gmail.com>
yeliex <yeliex@yeliex.com>
yiminghe <yiminghe@gmail.com>
@@ -112,20 +251,30 @@ yubozhao <yubz86@gmail.com>
yuche <i@yuche.me>
z <haig8@msn.com>
zack <zxyah@126.com>
zerob4wl <zerob4wl@gmail.com>
zhangpc <zhangpc@tenxcloud.com>
zhaocai <lzc09008@gmail.com>
zhujun24 <zhujun87654321@gmail.com>
zilong <jzlxiaohei@163.com>
zinkey <yaya@uloveit.com.cn>
zollero <corona7@163.com>
zuiidea <zuiiidea@gmail.com>
偏右 <afc163@gmail.com>
逸达 <dqaria@gmail.com>
蔡伦 <sliuqin@gmail.com>
陆离 <surgesoft@gmail.com>
一喵呜 <hyb628@gmail.com>
乔奕轩 <qiao_yixuan@163.com>
低位 <zhujun87654321@gmail.com>
广彬-梁 <326741518@qq.com>
闲耘™ <hotoo.cn@gmail.com>
偏右 <afc163@gmail.com>
可乐 <zaxlct@foxmail.com>
吕立青 <jimmy.jinglv@gmail.com>
广彬-梁 <326741518@qq.com>
柚子男 <yozman@sina.com>
白羊座小葛 <abeyuhang@gmail.com>
英布 <chaoren1641@gmail.com>
蔡伦 <sliuqin@gmail.com>
逸达 <dqaria@gmail.com>
邦 <sqibang@gmail.com>
闲耘™ <hotoo.cn@gmail.com>
陆离 <surgesoft@gmail.com>
陈帅 <wasd2144@hotmail.com>
马斯特 <sd4399340@126.com>
马金花儿 <o.o@mug.dog>
白羊座小葛 <abeyuhang@gmail.com>
黄子毅 <576625322@qq.com>

View File

@@ -17,10 +17,383 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
---
## 2.13.4
`2017-09-29`
- 🐞 Fix missing Pagination `size="small"` style.
- 🐞 Fix Anchor missing padding. [#7712](https://github.com/ant-design/ant-design/issues/7712)
- 🐞 Fix TreeSelect extra select below search input. [#7703](https://github.com/ant-design/ant-design/issues/7703)
- 🐞 Fix the jumping problem of Form validate text. [#7730](https://github.com/ant-design/ant-design/issues/7730)
- 🐞 Fix Button Group loading style. [#7709](https://github.com/ant-design/ant-design/issues/7709)
- 🐞 Fix blur placeholder text color. [#7365](https://github.com/ant-design/ant-design/issues/7365)
- 🐞 Fix Mention `suggestion.toLowerCase is not a function` error. [#7696](https://github.com/ant-design/ant-design/issues/7696) [@kappa-gooner](https://github.com/kappa-gooner)
- 🐞 Fix a children height problem of Layout.Sider. [#7716](https://github.com/ant-design/ant-design/pull/7716) [@zheeeng](https://github.com/zheeeng)
- 🐞 Fix Dropdown menu group style.
- 🐞 Fix Table filter icon and dropdown style.
- 🐞 Fix a AutoComplete circular reference bug in Inferno. [#7742](https://github.com/ant-design/ant-design/pull/7742) [@menberg](https://github.com/menberg)
- 🐞 Fix Upload cannot upload file when using `beforeUpload`. [#7762](https://github.com/ant-design/ant-design/issues/7762) [#6983](https://github.com/ant-design/ant-design/issues/6983)
- TypeScript
- 🐞 Fix Input `maxLength` definite. [#7744](https://github.com/ant-design/ant-design/pull/7744) [@delesseps](https://github.com/delesseps)
- 🐞 Fix `disabledTime` definite of DatePicker. [#7740](https://github.com/ant-design/ant-design/pull/7740) [@778758944](https://github.com/778758944)
## 2.13.3
`2017-09-22`
- 🐞 Fix Affix scrolling bug when document's height minus viewport's height is smaller than the height of children of Affix. [#2349](https://github.com/ant-design/ant-design/issues/2349)
- 🐞 Fix broken style of header of Card when `Card[title]` is void and `Card[extra]` is set. [f46112d#commitcomment-24480417](https://github.com/ant-design/ant-design/commit/f46112d38561c89780eb44ecbba82347d2b912da#commitcomment-24480417)
- 🐞 Fix TypeScript definition of `Checkbox[children]`. [#7650](https://github.com/ant-design/ant-design/issues/7650) [@liaokaien](https://github.com/liaokaien)
- 🐞 Fix error when set nested name in `getFieldDecorator` and then click the label of `Form.Item`. [#7693](https://github.com/ant-design/ant-design/issues/7693)
- Input
- 🐞 Fix broken style of `Input.Group[compat]` when it has `Select` as its children. [#7662](https://github.com/ant-design/ant-design/issues/7662)
- 🐞 Fix TypeScript definition of `Input[autoComplete]`. [#7699](https://github.com/ant-design/ant-design/pull/7699) [@delesseps](https://github.com/delesseps)
- LocaleProvider
- 🇵🇹 Support Portuguese. [#7449](https://github.com/ant-design/ant-design/pull/7449) [@taviroquai](https://github.com/taviroquai)
- 🐞 Fix missing translations in Dutch locale. [#7694](https://github.com/ant-design/ant-design/pull/7694) [@kstiopin](https://github.com/kstiopin)
- Table
- 🐞 Fix height of table header when `rowSelection` is set. [#7663](https://github.com/ant-design/ant-design/issues/7663)
- 🐞 Fix bug that click on first two options will not trigger event when `rowSelection.hideDefaultselections` is set. [#7626](https://github.com/ant-design/ant-design/issues/7626) [@infeng](https://github.com/infeng)
- 🐞 Fix TypeScript definition of `Table[scroll]`. [#7640](https://github.com/ant-design/ant-design/pull/7640) [@BlackGanglion](https://github.com/BlackGanglion)
## 2.13.2
`2017-09-15`
- 🐞 Fix title and extra content position of narrow Card. [#7604](https://github.com/ant-design/ant-design/issues/7604)
- 🐞 Fix inlineCollapsed style of MenuItemGroup. [#7109](https://github.com/ant-design/ant-design/issues/7109)
- 🐞 Revert [#7142](https://github.com/ant-design/ant-design/issues/7142) to fix empty data style of Table.
- 🐞 Fix Form `getFieldDecoratorOptions` missing types of `normalize` and `validateFirst`. [#7552](https://github.com/ant-design/ant-design/issues/7552) [@meteor91](https://github.com/meteor91) [@mitchelldemler](https://github.com/mitchelldemler)
- 🐞 Fix Modal `zIndex` type. [#7624](https://github.com/ant-design/ant-design/issues/7624)
- 🌟 Improve tree node loading icon position. [#7584](https://github.com/ant-design/ant-design/issues/7584)
- 🌟 Update a lot of components's English doc. [@khalibloo](https://github.com/khalibloo)
## 2.13.1
`2017-09-10`
- 🐞 Fix Card.Grid broken style. [commit/c7d6ce](https://github.com/ant-design/ant-design/commit/c7d6ce5d3f7bfae1f2252d702fb1bdf04fdc80cb)
- 🐞 Fix Cascader overlaping text. [#7475](https://github.com/ant-design/ant-design/issues/7475)
- 🐞 Fix simple mode Pagination prev and next button missing. [#7500](https://github.com/ant-design/ant-design/issues/7500)
- 🐞 Fix Slider typings. [#7532](https://github.com/ant-design/ant-design/issues/7532)
- Table
- 🐞 Fix empty data scroll style. [#7457](https://github.com/ant-design/ant-design/issues/7457) [#7468](https://github.com/ant-design/ant-design/issues/7468) [#7470](https://github.com/ant-design/ant-design/issues/7470) [#7509](https://github.com/ant-design/ant-design/issues/7509)
- 🌟 Make supplement for API docs. [#7525](https://github.com/ant-design/ant-design/pull/7525) [@hansnow](https://github.com/hansnow)
- 🐞 Fix Upload typings. [#7507](https://github.com/ant-design/ant-design/pull/7507) [@WingGao](https://github.com/WingGao)
- 🐞 Fix inlineCollapsed Menu when Submenu is opened. [#7514](https://github.com/ant-design/ant-design/issues/7514)
- 🐞 Fix validateStatus styles of some Form Controls. [#7498](https://github.com/ant-design/ant-design/issues/7498)
- 🐞 Fix @link-hover-decoration not working. [#7531](https://github.com/ant-design/ant-design/issues/7531)
- 🌟 Optimize the English documentation of some components. [@khalibloo](https://github.com/khalibloo)
## 2.13.0
`2017-09-01`
- 🌟 Add `okType` and `cancelType` prop to Popconfirm and Modal and it's related methods. [#6848](https://github.com/ant-design/ant-design/pull/6848) [@yociduo](https://github.com/yociduo)
- 🌟 Add `zIndex` prop to Modal and it's relatedt methos. [#6880](https://github.com/ant-design/ant-design/pull/6880) [@Alex1990](https://github.com/Alex1990)
- 🌟 Add `name` prop to RadioGroup. [#7009](https://github.com/ant-design/ant-design/pull/7009) [@djyde](https://github.com/djyde)
- 🌟 Add `hideDefaultSelections` props to Table. [#7295](https://github.com/ant-design/ant-design/issues/7295)
- Dropdown
- 🌟 Add `disabled` prop. [#7102](https://github.com/ant-design/ant-design/pull/7102) [@yociduo](https://github.com/yociduo)
- 🌟 Menu can not be selected defaultly now.
- 🌟 Add a third parameter `originalElement` to Pagination's `itemRender`.
- 🌟 Add `backfill` prop to AutoComplete, items are selected by keyborad will be backfilled to the search input. [#5764](https://github.com/ant-design/ant-design/issues/5764)
- 🌟 Add `firstActiveValue` prop to Select to allow specify active item when open select first time. [#6318](https://github.com/ant-design/ant-design/issues/6318) [@L-x-C](https://github.com/ant-design/ant-design/issues/6318)
- LocaleProvider
- 🌟 Add Persian. [#6878](https://github.com/ant-design/ant-design/pull/6878) [@mkermani144](https://github.com/mkermani144)
- 🌟 Add Greek. [#6928](https://github.com/ant-design/ant-design/pull/6928) [@michmach](https://github.com/michmach)
- 🌟 Add Norwegian. [#7122](https://github.com/ant-design/ant-design/pull/7122) [@santi](https://github.com/santi)
- 🌟 Add Serbian. [#7201](https://github.com/ant-design/ant-design/pull/7201) [@paunovic-stefan](https://github.com/paunovic-stefan)
- 🐞 Fix Menu's title can not be hidden when collapsing Sider. [#7409](https://github.com/ant-design/ant-design/issues/7409)
- 🐞 Fix some TypeScript type definitions [#7355](https://github.com/ant-design/ant-design/pull/7355) [#7378](https://github.com/ant-design/ant-design/pull/7378) [#7384](https://github.com/ant-design/ant-design/pull/7384)
- 🐞 Fix some components can not use conditional rendering. [#6530](https://github.com/ant-design/ant-design/issues/6530)
- Website
- 🌟 Add a shortcut `s` to focus the search input.
- 🌟 Add a color picker to the footer to change primary color and preview lively.
## 2.12.8
`2017-08-27`
- 📖 Rewrite the [Use in create-react-app](/docs/react/use-with-create-react-app) documentation without ejecting. [#7276](https://github.com/ant-design/ant-design/pull/7276)
- 🌟 Better empty data style for fixed-columns Table. [#7298](https://github.com/ant-design/ant-design/issues/7298)
- 🐞 Fix `disabled` logic of CheckboxGroup and Checkbox. [#7266](https://github.com/ant-design/ant-design/issues/7266) [@dilidili](https://github.com/dilidili)
- 🐞 Fix errors of rendering Spin and Carousel in react-snapshot or other jsdom environment. [#3308](https://github.com/ant-design/ant-design/issues/3308) [#7318](https://github.com/ant-design/ant-design/issues/7318)
- 🐞 Fix some details of Select, Tooltip and Menu.
## 2.12.7
`2017-08-21`
- antd of Angular@4.0, [ng-zorro-antd](https://ng.ant.design) is open sourcing.
- Affix supports more scenes. [01d4acb](https://github.com/ant-design/ant-design/commit/01d4acb7a9b030be3552b4ca19b4e899dc2bb7c7)
- Fix that AutoComplete children ref doesn't work. [#6814](https://github.com/ant-design/ant-design/issues/6814)
- Button
- Improve the logic to insert space in Chinese characters. [59b11f3](https://github.com/ant-design/ant-design/commit/59b11f3b480d43cb32fb24e351cb4c4dd569243c)
- Fix that `event.target` of click is not `button`. [#7034](https://github.com/ant-design/ant-design/issues/7034)
- Fix that Carousel's `innerSlider` doesn't exist. [#7191](https://github.com/ant-design/ant-design/issues/7191)
- Fix the style of button in DatePicker. [ad6dbcb](https://github.com/ant-design/ant-design/commit/ad6dbcb9c6dac407a38f2391d3e5fa1d8ae1cfab)
- Fix TypeScript definition of Form.[#7245](https://github.com/ant-design/ant-design/pull/7245)
- Fix TypeScript definition of InputNumber. [#7257](https://github.com/ant-design/ant-design/issues/7257)
- Fix missing collapse animation of `Layout.Sider` in IE11. [#6349](https://github.com/ant-design/ant-design/issues/6349)
- Fix typo of Spanish locale of LocaleProvider. [#7234](https://github.com/ant-design/ant-design/pull/7234) [@ramsesmoreno](https://github.com/ramsesmoreno)
- Fix that notification's default placement should not be overrided. [#5895](https://github.com/ant-design/ant-design/issues/5895)
- Fix disabled style of button in Pagination. [cf3c0aa](https://github.com/ant-design/ant-design/commit/cf3c0aac43e2825bfd85ca3b8abbf4742e504260)
- Fix that wrong exports of Select which cause webpack build error. [#7222](https://github.com/ant-design/ant-design/issues/7222)
- Fix that Tabs should show arrow buttons while resize its container. [#7231](https://github.com/ant-design/ant-design/issues/7231) [#7210](https://github.com/ant-design/ant-design/issues/7210)
- Fix style of Timeline which has only one `Timeline.Item`. [#7214](https://github.com/ant-design/ant-design/issues/7214)
- Fix wrong behavior of Upload when uid is 0. [#7269](https://github.com/ant-design/ant-design/issues/7269)
## 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)
- Fix Upload doesn't handle some error scenarios which response is not a string. [#6818](https://github.com/ant-design/ant-design/issues/6818)
- 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`
- Fix Affix throw invalid calling object in IE. [#7060](https://github.com/ant-design/ant-design/issues/7060)
- Make optimization for title display behavior of Badge. [#7024](https://github.com/ant-design/ant-design/issues/7024)
- Card
- Fix `noHovering` API typo. [#7078](https://github.com/ant-design/ant-design/issues/7078)
- Fix `children` type definitions. [pull/7030](https://github.com/ant-design/ant-design/pull/7030) [@djyde](https://github.com/djyde)
- Fix Collapse `onChange` parameter type definitions. [pull/7084](https://github.com/ant-design/ant-design/pull/7084) [@davidctj](https://github.com/davidctj)
- Dropdown
- Fix Dropdown.Button align issue. [#7070](https://github.com/ant-design/ant-design/issues/7070)
- Add `size` prop for docs. [pull/7071](https://github.com/ant-design/ant-design/pull/7071) [@hansnow](https://github.com/hansnow)
- Input
- Fix outline covered by addon. [commit/0f63c7](https://github.com/ant-design/ant-design/commit/0f63c7186ef3a5db36c01df9d9ebde9d5b3871ef)
- Fix InputGroup demo. [pull/7089](https://github.com/ant-design/ant-design/pull/7089) [@jdz321](https://github.com/jdz321)
- Fix InputNumber Formatter demo issue. [pull/7098](https://github.com/ant-design/ant-design/pull/7098) [@tim-soft](https://github.com/tim-soft)
- Menu
- Fix abnormal performance of inlineCollapsed Menu. [#7048](https://github.com/ant-design/ant-design/issues/7048) [#7063](https://github.com/ant-design/ant-design/issues/7063)
- Fix SubMenu can't be highlighted if its children are selected. [pull/7042](https://github.com/ant-design/ant-design/pull/7042) [@atomgao](https://github.com/atomgao)
- Fix notification `type` type definitions. [#7073](https://github.com/ant-design/ant-design/issues/7073) [@marswong](https://github.com/marswong)
- Fix Pagination `showTotal` type definitions. [#7054](https://github.com/ant-design/ant-design/issues/7054)
- Fix RangePicker throw error after clear. [#7077](https://github.com/ant-design/ant-design/issues/7077)
- Adds `onFocus` and `onBlur` type definitions for Select. [pull/7082](https://github.com/ant-design/ant-design/pull/7082) [@troynt](https://github.com/troynt)
- Fix Tabs `tabBarExtraContent` style issue in vertical mode. Upgrade rc-tabs to 9.0.2, refactor the dom structure of TabBar `extraContent`. [#6578](https://github.com/ant-design/ant-design/issues/6578)
- Fix missing icon issue for TreeSelect. [#7020](https://github.com/ant-design/ant-design/issues/7020)
- Fix `error TS7016: Could not find a declaration file for module 'rc-util/lib/Dom/addEventListener'`. [#7033](https://github.com/ant-design/ant-design/issues/7033) [@djyde](https://github.com/djyde)
- Translate patterns/list. [list](https://ant.design/docs/pattern/list) [@zachguo](https://github.com/zachguo)
## 2.12.3
`2017-07-30`
- Fix indeterminate Checkbox style when it's disabled.
- Fix Card `this.container` may not exists issue. [#6976](https://github.com/ant-design/ant-design/pull/6976) [@neekey](https://github.com/neekey)
- Fix Button align issue when set base font to `14px`. [#7001](https://github.com/ant-design/ant-design/issues/7001)
- Dropdown
- Fix Menu can be multiple cicked. [#6314](https://github.com/ant-design/ant-design/issues/6314)
- Fix Menu dispears if it's hovered before it's shown. [#6949](https://github.com/ant-design/ant-design/issues/6949)
- Fix align issue.
- Fix Grid Card padding.
- Improve Menu animation.[#6955](https://github.com/ant-design/ant-design/pull/6955)
- Twrak DatePicker icon position.
- Add new less variables.[e1a46cc](https://github.com/ant-design/ant-design/commit/e1a46cc419fb4975ae1782ba793b378c8e584057)
- Fix some issues of TypeScript definitions.
## 2.12.2
`2017-07-22`
- Longer message duration (1.5s to 3s).
- Fix Anchor links not highlighted. [#6473](https://github.com/ant-design/ant-design/issues/6473)
- Fix disabled style of Input.TextArea. [#6858](https://github.com/ant-design/ant-design/pull/6858) [@lyz810](https://github.com/lyz810)
- Fix disabled style of TimePicker. [#6918](https://github.com/ant-design/ant-design/issues/6918)
- Fix overlaped issue of form feedback icon and select arrow which is introduced in `2.12.1` again. [#4431](https://github.com/ant-design/ant-design/issues/4431)
- Fix vertical Tabs arrow style. [255eac9](https://github.com/ant-design/ant-design/commit/255eac907949ded5b79f216a29831dcf4afa9362)
- Update Polish locale. [#6869](https://github.com/ant-design/ant-design/pull/6869) [#6870](https://github.com/ant-design/ant-design/pull/6870) [#6871](https://github.com/ant-design/ant-design/pull/6871) [@imosapatryk](https://github.com/imosapatryk)
- Fix that `http` url incluced in source code. [#6893](https://github.com/ant-design/ant-design/issues/6893)
- Adjust vertical align of Menu icon and text.
- Fix `overlay is marked as required` warning of Tooltip. [#6897](https://github.com/ant-design/ant-design/issues/6897)
- Fix disabled style of Slider under colored background. [#6665](https://github.com/ant-design/ant-design/issues/6665)
- Adjust click area of TreeSelect item.
- Fix some issues of TypeScript definitions.
## 2.12.1
`2017-07-17`
- Fix typo in Bulgarian locales. [#6788](https://github.com/ant-design/ant-design/pull/6788) [@NoHomey](https://github.com/NoHomey)
- Fix broken style of `<Avatar src="..." />` when image cannot be loaded. [#6804](https://github.com/ant-design/ant-design/issues/6804)
- Fix broken style of loading icon button in `Button.Group`. [#6822](https://github.com/ant-design/ant-design/issues/6822)
- Fix TypeScript's definition of Checkbox. [#6768](https://github.com/ant-design/ant-design/issues/6768)
- Fix broken style of `Collapse.Panel[header]` when content is too long. [#6832](https://github.com/ant-design/ant-design/issues/6832)
- Input
- Fix that `className` should be added to wrapper. [#6809](https://github.com/ant-design/ant-design/issues/6809)
- Fix TypeScript's definition of `Input.Search`. [#6837](https://github.com/ant-design/ant-design/pull/6837) [@newraina](https://github.com/newraina)
- Fix that value of `Input.TextArea` cannot be reset. [#6776](https://github.com/ant-design/ant-design/issues/6776)
- Fix broken style of error status of Select in `Input.Group`.
<img src="https://user-images.githubusercontent.com/507615/27983847-551ffe0a-63f9-11e7-81ba-8c3336ddafd0.png" />
- Fix that the implementation of Layout should not affect Anchor and BackTop. [#6817](https://github.com/ant-design/ant-design/issues/6817)
- Menu
- Fix animation of inline menu.
- Fix style of border of `Menu.Item`. [46ffda9](https://github.com/ant-design/ant-design/commit/46ffda9c9385ec54e0c78594ed6c280d40ef035d)
- Fix that RangePicker should show correct months in panels when `value|defaultValue` is set. [#6764 point 3](https://github.com/ant-design/ant-design/issues/6764)
- Fix alignment of Tooltip. [#6830](https://github.com/ant-design/ant-design/issues/6830)
## 2.12.0
`2017-07-08`
- Add Card `noHovering` and Card.Grid. [pull/6748](https://github.com/ant-design/ant-design/pull/6748)
- DatePicker, MonthPicker, RangePicker now support `className` prop. [pull/6584](https://github.com/ant-design/ant-design/pull/6584) [@EnrikoLabriko](https://github.com/EnrikoLabriko)
- Add Input.Textarea, Input[type='textArea'] will be deprecated. [pull/6138](https://github.com/ant-design/ant-design/pull/6138)
- LocaleProvider supporting Thai. [pull/6721](https://github.com/ant-design/ant-design/pull/6721) [@koobitor](https://github.com/koobitor)
- Mention support `focus` function. [#6135](https://github.com/ant-design/ant-design/issues/6135)
- Menu inline mode could be collapsed by `inlineCollapsed`, and use `context` to pass `collapsed` prop from Layout.Sider to Menu, don't need customized css code anymore. [pull/6686](https://github.com/ant-design/ant-design/pull/6686)
- Add Pagination `itemRender`, now you can customize the structure of page number. [25a603](https://github.com/ant-design/ant-design/commit/25a60322e5c6649522fb9f0d34919eba0ccb1f65)
- Add Tooltip `autoAdjustOverflow` prop, now the auto adjust feature can be disabled. [pull/6661](https://github.com/ant-design/ant-design/pull/6661) [@jdz321](https://github.com/jdz321)
- Fix errors in docs of Avatar. [pull/6711](https://github.com/ant-design/ant-design/pull/6711) [@llaski](https://github.com/llaski)
- DatePicker
- Fix `onOk` type definitions. [pull/6619](https://github.com/ant-design/ant-design/pull/6619) [@newraina](https://github.com/newraina)
- Improve icon style. [pull/6655](https://github.com/ant-design/ant-design/pull/6655) [@megawac](https://github.com/megawac)
- Form
- Fix formItem `extra` content line height. [#6618](https://github.com/ant-design/ant-design/issues/6618)
- Fix FormItem `labelCol` `wrapperCol` type definitions. [pull/6611](https://github.com/ant-design/ant-design/pull/6611) [@newraina](https://github.com/newraina)
- Fix autosize Input.Textarea scrollbar style issue. [#6609](https://github.com/ant-design/ant-design/issues/6609)
- Add missing TypeScript definition of `precision` in InputNumber. [#6715](https://github.com/ant-design/ant-design/issues/6715)
- Fix Select overflow issue. [#6621](https://github.com/ant-design/ant-design/issues/6621)
- Slider
- Improve styles. [#6665](https://github.com/ant-design/ant-design/issues/6665)
- Upgrade rc-slider to 8.2.0, add `dotStyle`, `activeDotStyle` props. [rc-slider/pull/292](https://github.com/react-component/slider/pull/292)
- Fix Spin z-index issue. [#6759](https://github.com/ant-design/ant-design/issues/6759)
- Fix nested Steps style issue. [#6754](https://github.com/ant-design/ant-design/issues/6754)
- Table
- Fix expanded area background of fixed header Table. [#6657](https://github.com/ant-design/ant-design/issues/6657)
- Add `onRowDoubleClick` prop for docs. [pull/6667](https://github.com/ant-design/ant-design/pull/6667) [@yurtaev](https://github.com/yurtaev)
- Make supplement for `loading` docs. [pull/6763](https://github.com/ant-design/ant-design/pull/6763) [@hansnow](https://github.com/hansnow)
- Upgrade rc-table to 5.4.0, support `onRowMouseEnter` and `onRowMouseLeave`. [rc-table/0db582](https://github.com/react-component/table/commit/0db582a75dfa119715eb4db8a59eacfca744c5a0)
- Improve TimePicker format support. [950c32](https://github.com/ant-design/ant-design/commit/950c321b25091ef31b130b83674478974590d7f3)
- Make style improvement or tweaking for many components, includes [Checkbox](https://ant.design/components/checkbox/), [Radio](https://ant.design/components/radio/), [Tabs](https://ant.design/components/tabs/), [Card](https://ant.design/components/card/) and etc.
- Now you can open demo in codepen. [#5140](https://github.com/ant-design/ant-design/issues/5140)
## 2.11.2
`2017-06-25`
- Dropdown.Button now support `getPopupContainer` function. [#6527](https://github.com/ant-design/ant-design/pull/6527)
- Fix disabled dropdown submenu style error. [#6548](https://github.com/ant-design/ant-design/issues/6548)
- Fix background color error of Calendar. [aaf2a50](https://github.com/ant-design/ant-design/commit/aaf2a508bef96f81faf556036649b2a2fe5b635b)
- Select of Calendar now take place in header. [#6479](https://github.com/ant-design/ant-design/pull/6479)
- Fix horia horizontal scroll error of Input and Textarea. [#6577](https://github.com/ant-design/ant-design/issues/6577)
- Improve document of `disabled` attribute of Checkbox and Radio. [#6597](https://github.com/ant-design/ant-design/pull/6597)
- Increase click area of Table's sort and filter icon. [#6528](https://github.com/ant-design/ant-design/pull/6528)
- Add `event:Event` parameter of Table.props.onRowClick. [e2a99f5](https://github.com/ant-design/ant-design/commit/e2a99f53f7a27bd7de4adf99d0e1ee755b537c72)
## 2.11.1
`2017-06-18`
- Fix setting `className` of Table's pagination not working issue. [#6416](https://github.com/ant-design/ant-design/issues/6416)
- Fix nested Tabs style issue.[#6431](https://github.com/ant-design/ant-design/issues/6431) [@sadmark](https://github.com/sadmark)
- Fix RadioButton wrapping leaves off the left border on small screen.[#6492](https://github.com/ant-design/ant-design/issues/6492) [@pierreneter](https://github.com/pierreneter)
- Fix RangePicker footer border.
- Improve Dropdown.Button's type definitions. [#6482](https://github.com/ant-design/ant-design/pull/6482) [@newraina](https://github.com/newraina)
## 2.11.0
`2017-06-07`
- New component [Avatar](https://ant.design/components/avatar/). 🌝
- LocaleProvider
- Supporting Bulgarian. [#6297](https://github.com/ant-design/ant-design/pull/6297) [@dimitrov-adrian](https://github.com/dimitrov-adrian)
- Supporting Polish. [#6326](https://github.com/ant-design/ant-design/pull/6326) [@longersson](https://github.com/longersson)
- Supporting Britain English. [#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- Supporting Italian. [#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- Supporting French. [#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- Supporting Belgian. [#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- Collapse.Panel can be disabled now, which makes users cannot toggle panel with mouse/keyboard. [#6119](https://github.com/ant-design/ant-design/issues/6119) [demo](https://ant.design/components/collapse/#components-collapse-demo-basic)
- DatePicker and RangePicker support customized footer. [#6122](https://github.com/ant-design/ant-design/issues/6122) [#5188](https://github.com/ant-design/ant-design/issues/5188) [demo](https://ant.design/components/date-picker/#components-date-picker-demo-extra-footer)
- InputNumber can set precision with property `precision`, this means that precision need not to follow `step`. [#5998](https://github.com/ant-design/ant-design/issues/5998)
- TreeSelect supports `allowClear` in multiple mode.
- Improve keyboard support of Pagination. [rc-pagination#83](https://github.com/react-component/pagination/pull/83) [@geramirez](https://github.com/geramirez)
- Improve style of Progress. [#6354](https://github.com/ant-design/ant-design/issues/6354)
- Improve ARIA support of Slider. [#6301](https://github.com/ant-design/ant-design/pull/6301)
- Fix that animating elements should not be clickable. [#6314](https://github.com/ant-design/ant-design/issues/6314)
- Fix `Cannot read property '0' of undefined` issue of DatePicker, TimePicker, and RangePicker. [#6334](https://github.com/ant-design/ant-design/issues/6334)
- DatePicker
- Fix misplaced popup. [#6347](https://github.com/ant-design/ant-design/issues/6347)
- Fix wrong format of tooltip of date cell. [#5724](https://github.com/ant-design/ant-design/issues/5724) [@zefj](https://github.com/zefj)
- Fix that disabled date is selectable while using keyboard. [#6345](https://github.com/ant-design/ant-design/issues/6345)
- Fix nested fields support of Form `validateFieldsAndScroll`. [#5410](https://github.com/ant-design/ant-design/issues/5410)
- Input[addon]
- Fix that style doesn't work. [#6379](https://github.com/ant-design/ant-design/issues/6379)
- Fix vertical align issue. [#6403](https://github.com/ant-design/ant-design/issues/6403)
- Fix that confirm button not clickable when the returned promise of Modal.confirm is rejected. [#6183](https://github.com/ant-design/ant-design/issues/6183)
- Fix style of input of Pagination. [#6339](https://github.com/ant-design/ant-design/issues/6339)
- Fix that user input of Select should not be trimed in search mode. [#6382](https://github.com/ant-design/ant-design/issues/6382)
- Fix that timers of Spin should be removed correctly. [#6383](https://github.com/ant-design/ant-design/issues/6383)
- Fix onClick support of Switch. [#6373](https://github.com/ant-design/ant-design/issues/6373)
- Fix wrong TypeScript definition of Table.Column which will cause `error TS2304: Cannot find name 'T'`. [#6313](https://github.com/ant-design/ant-design/issues/6313)
- Fix error TypeScript definition of Timeline.Item and Dropdown.Button. [#6356](https://github.com/ant-design/ant-design/issues/6356)
- Fix broken style of disabled Tree and TreeSelect. [#6320](https://github.com/ant-design/ant-design/issues/6320)
## 2.10.4
`2017-06-01`
- Fix `rc-util` dependency. [#6310](https://github.com/ant-design/ant-design/pull/6311) [@bkniffler](https://github.com/bkniffler)
- Fix syntax error in es build. [#6310](https://github.com/ant-design/ant-design/issues/6310#issuecomment-305176273)
## 2.10.3
`2017-05-31`
- **Calendar**
- Fix disabledDate not be supported, and make supplement for the types and documentation. [#6074](https://github.com/ant-design/ant-design/issues/6074)
- Upgrade rc-calendar to 8.4.0, support Bulgarian, and user can select end date first. [commit/a4a6db](https://github.com/ant-design/ant-design/commit/a4a6db76de57ac2559a2be80208121ab5e168fbf)
- **Alert** Remove default margin-bottom. [commit/5ef482](https://github.com/ant-design/ant-design/commit/5ef48289747409b6d962f75627ddb11e2765f965)
- **Tabs** Fix inactive tab panel behavious. [#6237](https://github.com/ant-design/ant-design/issues/6237)
- **Layout** Fix children in the collapsed Sider not be hidden. [#6131](https://github.com/ant-design/ant-design/issues/6131)
- **Table** Fix table filter menu overflow issue. [#6245](https://github.com/ant-design/ant-design/issues/6245)
- **InputNumber** Fix hasFeedback misplaced validated icon. [#6289](https://github.com/ant-design/ant-design/issues/6289)
- **Typescript**
- Upgrade TypeScript to 2.3.x. [#6263](https://github.com/ant-design/ant-design/issues/6263)
- Add missing props in Table. [commit/acdc56](https://github.com/ant-design/ant-design/commit/acdc563a547c49960521b2b48cd5c707ac1e4cf2) [pull/6291](https://github.com/ant-design/ant-design/pull/6291) [@jch254](https://github.com/jch254)
- Fix wrong type in Mention and Form. [pull/6268](https://github.com/ant-design/ant-design/pull/6268) [@jch254](https://github.com/jch254)
- Fix wrong type in Badge. [pull/6291](https://github.com/ant-design/ant-design/pull/6291) [@jch254](https://github.com/jch254)
- Add missing props in Input related Components. [pull/6276](https://github.com/ant-design/ant-design/pull/6276/commits/94901de2e8c0a2ed6f62f5aa50c98994aad71844) [@panjiesw](https://github.com/panjiesw) [commit/220264](https://github.com/ant-design/ant-design/commit/2202648d6e1c53409ade2141955232922b0040d6#diff-26cb6da96d10397e18e7dbd6c5d8f7a1L265) [@clinyong](https://github.com/clinyong)
## 2.10.2
`2017-05-23`
- Fix `prop-types` warnings which due to upgrading React. [#5678](https://github.com/ant-design/ant-design/issues/5678)
- Fix `defaultValue` issue of DatePicker and RangePicker in showTime mode. [#6160](https://github.com/ant-design/ant-design/pull/6160)
- Fix style issue of TreeSelect. [#6137](https://github.com/ant-design/ant-design/issues/6137)
- Fix style issue of Input with prefix and addon. [#6144](https://github.com/ant-design/ant-design/issues/6144)
- Fix some bugs of `notification.destroy`. [#6161](https://github.com/ant-design/ant-design/issues/6161)
@@ -56,7 +429,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Checkbox.Group can support more flexible layout with nested Checkbox. [demo](http://ant.design/components/checkbox-cn/#components-checkbox-demo-layout)
- Notification's inline style and className can be customized now. [#5893](https://github.com/ant-design/ant-design/issues/5893) [@lixiaoyang1992](https://github.com/lixiaoyang1992)
- TimePicker's open status can be controlled by `open` property. [#5913](https://github.com/ant-design/ant-design/pull/5913)
- The returned value of Upload[onRemove] could be a promise to control remove logic asynchronously. [#5973](https://github.com/ant-design/ant-design/issues/5973) [@shlice](https://github.com/shlice)
- The returned value of Upload `onRemove` could be a Promise to control remove logic asynchronously. [#5973](https://github.com/ant-design/ant-design/issues/5973) [@shlice](https://github.com/shlice)
- Adjust padding of popup of Dropdown. [#5088](https://github.com/ant-design/ant-design/issues/5088)
- AutoComplete
- Fix inconsistent behavior between `dataSource: Object[]` and `dataSource: String[]`. [#5860](https://github.com/ant-design/ant-design/issues/5860)
@@ -97,7 +470,6 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Improve user experience of RangePicker, rc-calendar upgrade to `~8.0.0`. [#4985](https://github.com/ant-design/ant-design/issues/4985)
- Fix RangePicker not aligned after customizing the size of input. [pull/5718](https://github.com/ant-design/ant-design/pull/5718) [@leadream](https://github.com/leadream)
- **Form** Add a less variable to opt out of form item colons. [pull/5855](https://github.com/ant-design/ant-design/pull/5855) [@megawac](https://github.com/megawac)
- **Icon** Add displayName. [pull/5643](https://github.com/ant-design/ant-design/pull/5643) [@handycode](https://github.com/handycode)
- **Input**
- Fix Input.Search style issue when be used in Input.Group. [#5743](https://github.com/ant-design/ant-design/issues/5743)
- Fix AutoComplete style issue when be used in Input.Group. [#5832](https://github.com/ant-design/ant-design/issues/5832)
@@ -192,7 +564,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Fixed missing locales of Russian. [#5406](https://github.com/ant-design/ant-design/pull/5406) [@plandem](https://github.com/plandem)
- Fixed it doesn't work with Upload. [#5388](https://github.com/ant-design/ant-design/pull/5388) [@natergj](https://github.com/natergj)
- Fixed inconsistet animation of Menu Icon and text. [#5495](https://github.com/ant-design/ant-design/issues/5495)
- Fixed `Modale[footer]` cannot be set to `null`. [#5462](https://github.com/ant-design/ant-design/issues/5462)
- Fixed `Modal[footer]` cannot be set to `null`. [#5462](https://github.com/ant-design/ant-design/issues/5462)
- Fixed Pagination will lost styles in `IE<=10` which is introduced in `2.8.2`. [#5484](https://github.com/ant-design/ant-design/issues/5484)
- Fixed Popover will be closed by mistake while using Table in it. [#5407](https://github.com/ant-design/ant-design/issues/5407)
- Remove restriction that Radio can only be direct chidlren of Radio.Group. [#5443](https://github.com/ant-design/ant-design/issues/5443)
@@ -207,16 +579,16 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
`2017-03-11`
- New [design specification documentation](https://ant.design/docs/spec/colors).
- Fix error of Modal.confirm [#5269](https://github.com/ant-design/ant-design/issues/5269).
- Fix mask style of Upload [#5275](https://github.com/ant-design/ant-design/issues/5275).
- Fix progress not showing of Upload [#5323](https://github.com/ant-design/ant-design/issues/5323).
- Fix a pagination showTotal wrong data issue of Table [#5259](https://github.com/ant-design/ant-design/issues/5259).
- Fix a style issue while using Popconfirm and Button together [5301](https://github.com/ant-design/ant-design/issues/5301).
- 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).
- 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).
- Fix error of Modal.confirm. [#5269](https://github.com/ant-design/ant-design/issues/5269)
- Fix mask style of Upload. [#5275](https://github.com/ant-design/ant-design/issues/5275)
- Fix progress not showing of Upload. [#5323](https://github.com/ant-design/ant-design/issues/5323)
- Fix a pagination showTotal wrong data issue of Table. [#5259](https://github.com/ant-design/ant-design/issues/5259)
- Fix a style issue while using Popconfirm and Button together. [#5301](https://github.com/ant-design/ant-design/issues/5301)
- 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)
- 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)
## 2.8.1
@@ -270,7 +642,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Added a new `Fixed Header` demo. [demo](https://ant.design/components/layout-cn/#components-layout-demo-fixed)
- Added `Sider[breakpoint]` to allow config responsive breakpoint. [#4931](https://github.com/ant-design/ant-design/pull/4931)
- Form
- Added `layout` to replace the original `horizontal``vertical``inline`. [#5056](https://github.com/ant-design/ant-design/issues/5056)
- Added `layout` to replace the original `horizontal`, `vertical`, `inline`. [#5056](https://github.com/ant-design/ant-design/issues/5056)
- Calendar
- Added `dateFullCellRender` and `monthFullCellRender` to allow override the content of cell. [#5138](https://github.com/ant-design/ant-design/pull/5138) [@wonyun](https://github.com/wonyun)
- Added `onSelect` for date selection. [demo](https://ant.design/components/calendar-cn/#components-calendar-demo-select)
@@ -315,7 +687,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- Fix that `Cannot find module '../../package.json'` error. [#4935](https://github.com/ant-design/ant-design/issues/4935)
- Fix definitions of Table, RangePicker and Upload.
- Fix lack of event argument for Modal `onOk` `afterClose` and Popconfirm `onConfirm` `onCancel`. [#4787](https://github.com/ant-design/ant-design/issues/4787)
- Improve animation of Menu[inline] and Collapse.
- Improve animation of Menu inline mode and Collapse.
- Improve Checkbox and Radio vertical align style.
- Table
- Fix misplace header when fix column. [#4936](https://github.com/ant-design/ant-design/issues/4936)
@@ -394,7 +766,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
- **Tabs** Fix content missing problem since the second tab pane under IE9. [#4795](https://github.com/ant-design/ant-design/issues/4795)
- **rc-pagination** Upgrade to ~1.7.0, add pageSize as onChange's second argument.
- **Global optimization**
- Make some bugfixes and optimizations about documentationlink and style.
- Make some bugfixes and optimizations about documentation, link and style.
- Use stylelint instead of lesslint, and fix some lint issues. [#2179](https://github.com/ant-design/ant-design/issues/2179)
- Unify border radius to 4px. [#4772](https://github.com/ant-design/ant-design/issues/4772)
- Support `import { version } from 'antd'`. [#4751](https://github.com/ant-design/ant-design/pull/4751)
@@ -439,7 +811,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
* Fixed Badge misplace issue when browser zoom above 100%. [#4747](https://github.com/ant-design/ant-design/issues/4747) [#4290](https://github.com/ant-design/ant-design/issues/4290)
* Fixed a mis-align issue of fixed header Table. [#4750](https://github.com/ant-design/ant-design/issues/4750)
* Fixed Table scrolling lag issue in IE. [#4522](https://github.com/ant-design/ant-design/issues/4522)
* Add icon aliases: `addfile` => `file-add``addfolder` => `folder-open`, and the old type names are still working. [#4758](https://github.com/ant-design/ant-design/issues/4758)
* Add icon aliases: `addfile` => `file-add`, `addfolder` => `folder-open`, and the old type names are still working. [#4758](https://github.com/ant-design/ant-design/issues/4758)
## 2.6.4
@@ -452,7 +824,7 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
* Table
* Improve Table fixed header's scrollbar style.[#4637](https://github.com/ant-design/ant-design/issues/4637)
* Fix issue resulting in Table's header flashes when `loading` is true in Safari.[#4622](https://github.com/ant-design/ant-design/issues/4622)
* Fix multiple border issues. [#4647](https://github.com/ant-design/ant-design/issues/4647)[#4635](https://github.com/ant-design/ant-design/issues/4635)
* Fix multiple border issues. [#4647](https://github.com/ant-design/ant-design/issues/4647), [#4635](https://github.com/ant-design/ant-design/issues/4635)
* Fix `showHeader`'s default value.[#4658](https://github.com/ant-design/ant-design/issues/4658)
* Fix missing `TableColumnConfig` type.[#4660](https://github.com/ant-design/ant-design/issues/4660)

View File

@@ -17,10 +17,381 @@ timeline: true
---
## 2.13.4
`2017-09-29`
- 🐞 修复 Pagination 小号样式失效的问题。
- 🐞 修复 Anchor 的样式错位。[#7712](https://github.com/ant-design/ant-design/issues/7712)
- 🐞 修复 TreeSelect 搜索框下多余文字的问题。[#7703](https://github.com/ant-design/ant-design/issues/7703)
- 🐞 修复 Form 校验文字跳动的问题。[#7730](https://github.com/ant-design/ant-design/issues/7730)
- 🐞 修复各类型 Button Group 的 loading 样式。 [#7709](https://github.com/ant-design/ant-design/issues/7709)
- 🐞 修复 placeholder 文本在某些情况下无法看清的问题。[#7365](https://github.com/ant-design/ant-design/issues/7365)
- 🐞 修复一个 Mention 的 `suggestion.toLowerCase is not a function` 报错问题。 [#7696](https://github.com/ant-design/ant-design/issues/7696) [@kappa-gooner](https://github.com/kappa-gooner)
- 🐞 修复一个 Layout.Sider 子元素的高度问题。[#7716](https://github.com/ant-design/ant-design/pull/7716) [@zheeeng](https://github.com/zheeeng)
- 🐞 修复 Dropdown 菜单分组的样式。
- 🐞 修复 Table 筛选图标和菜单样式错位。
- 🐞 修复一个 AutoComplete 在 Inferno 下循环引用的问题。[#7742](https://github.com/ant-design/ant-design/pull/7742) [@menberg](https://github.com/menberg)
- 🐞 修复 Upload 使用 `beforeUpload` 验证文件类型失败后无法再次上传的问题。[#7762](https://github.com/ant-design/ant-design/issues/7762) [#6983](https://github.com/ant-design/ant-design/issues/6983)
- TypeScript
- 🐞 修复 Input 的 `maxLength` 定义。[#7744](https://github.com/ant-design/ant-design/pull/7744) [@delesseps](https://github.com/delesseps)
- 🐞 修复 DatePicker 等组件的 `disabledTime` 的返回值定义。[#7740](https://github.com/ant-design/ant-design/pull/7740) [@778758944](https://github.com/778758944)
## 2.13.3
`2017-09-22`
- 🐞 修复 Affix 在内容与视口高度差小于 children 高度时触发的滚动抖动问题。[#2349](https://github.com/ant-design/ant-design/issues/2349)
- 🐞 修复 `Card[title]` 为空且设置 `Card[extra]` 时样式错乱的问题。[f46112d#commitcomment-24480417](https://github.com/ant-design/ant-design/commit/f46112d38561c89780eb44ecbba82347d2b912da#commitcomment-24480417)
- 🐞 修复 `Checkbox[children]` TypeScript definition。[#7650](https://github.com/ant-design/ant-design/issues/7650) [@liaokaien](https://github.com/liaokaien)
- 🐞 修复 `getFieldDecorator` 内使用嵌套 id 后点击 `Form.Item` label 报错的问题。[#7693](https://github.com/ant-design/ant-design/issues/7693)
- Input
- 🐞 修复 `Input.Group[compat]` 内嵌 `Select` 等控件时的样式问题。[#7662](https://github.com/ant-design/ant-design/issues/7662)
- 🐞 优化 `Input[autoComplete]` TypeScript 定义。[#7699](https://github.com/ant-design/ant-design/pull/7699) [@delesseps](https://github.com/delesseps)
- LocaleProvider
- 🇵🇹 新增葡萄牙语。[#7449](https://github.com/ant-design/ant-design/pull/7449) [@taviroquai](https://github.com/taviroquai)
- 🐞 修复荷兰语 locale 缺少文案的问题。[#7694](https://github.com/ant-design/ant-design/pull/7694) [@kstiopin](https://github.com/kstiopin)
- Table
- 🐞 修复 `rowSelection` 导致的表头高度问题。[#7663](https://github.com/ant-design/ant-design/issues/7663)
- 🐞 修复使用 `rowSelection.hideDefaultselections` 时导致自定义选项点击没反应的问题。[#7626](https://github.com/ant-design/ant-design/issues/7626) [@infeng](https://github.com/infeng)
- 🐞 优化 `Table[scroll]` TypeScript definition。[#7640](https://github.com/ant-design/ant-design/pull/7640) [@BlackGanglion](https://github.com/BlackGanglion)
## 2.13.2
`2017-09-15`
- 🐞 修复了 Card Extra 内容过多样式错乱的问题。[#7604](https://github.com/ant-design/ant-design/issues/7604)
- 🐞 修复了分组 Menu 收缩时的错位问题。[#7109](https://github.com/ant-design/ant-design/issues/7109)
- 🐞 回滚 [#7142](https://github.com/ant-design/ant-design/issues/7142) 里对固定列表格空数据的样式优化,修复带来的一系列样式问题。
- 🐞 修复了 Form `getFieldDecoratorOptions` 缺失 `normalize` 以及 `validateFirst` 属性定义的问题。[#7552](https://github.com/ant-design/ant-design/issues/7552) [@meteor91](https://github.com/meteor91) [@mitchelldemler](https://github.com/mitchelldemler)
- 🐞 修复了 Modal 的 `zIndex` 属性定义。[#7624](https://github.com/ant-design/ant-design/issues/7624)
- 🌟 优化了 Tree 加载中图标的显示位置。[#7584](https://github.com/ant-design/ant-design/issues/7584)
- 🌟 优化了大量组件的英文文档。[@khalibloo](https://github.com/khalibloo)
## 2.13.1
`2017-09-10`
- 🐞 修复了 Card.Grid 的样式问题。[commit/c7d6ce](https://github.com/ant-design/ant-design/commit/c7d6ce5d3f7bfae1f2252d702fb1bdf04fdc80cb)
- 🐞 修复了 Cascader 指针图标与文字重叠的问题。[#7475](https://github.com/ant-design/ant-design/issues/7475)
- 🐞 修复了 Pagination 在简洁模式下前后按钮未展示的问题。[#7500](https://github.com/ant-design/ant-design/issues/7500)
- 🐞 修复了 Slider 的 type 定义。[#7532](https://github.com/ant-design/ant-design/issues/7532)
- Table
- 🐞 修复了在空数据情况下包含固定列时的一些样式问题。[#7457](https://github.com/ant-design/ant-design/issues/7457) [#7468](https://github.com/ant-design/ant-design/issues/7468) [#7470](https://github.com/ant-design/ant-design/issues/7470) [#7509](https://github.com/ant-design/ant-design/issues/7509)
- 🌟 补充了 API 文档。[#7525](https://github.com/ant-design/ant-design/pull/7525) [@hansnow](https://github.com/hansnow)
- 🐞 修复了 Upload 的 type 定义。 [#7507](https://github.com/ant-design/ant-design/pull/7507) [@WingGao](https://github.com/WingGao)
- 🐞 修复了 Submenu 展开时 inlineCollapsed Menu 的样式问题。[#7514](https://github.com/ant-design/ant-design/issues/7514)
- 🐞 修复了一些表单控件的校验样式问题。[#7498](https://github.com/ant-design/ant-design/issues/7498)
- 🐞 修复了 @link-hover-decoration 无效的问题。[#7531](https://github.com/ant-design/ant-design/issues/7531)
- 🌟 优化了部分组件的英文文档。[@khalibloo](https://github.com/khalibloo)
## 2.13.0
`2017-09-01`
- 🌟 Popconfirm 和 Modal 及其相关方法新增 `okType``cancelType` 用以指定按钮类型。[#6848](https://github.com/ant-design/ant-design/pull/6848) [@yociduo](https://github.com/yociduo)
- 🌟 Modal 及其相关方法新增 `zIndex`。[#6880](https://github.com/ant-design/ant-design/pull/6880) [@Alex1990](https://github.com/Alex1990)
- 🌟 RadioGroup 新增 `name` 属性。[#7009](https://github.com/ant-design/ant-design/pull/7009) [@djyde](https://github.com/djyde)
- 🌟 Table 新增 `hideDefaultSelections` 属性。[#7295](https://github.com/ant-design/ant-design/issues/7295)
- Dropdown
- 🌟 新增 `disabled` 属性。[#7102](https://github.com/ant-design/ant-design/pull/7102) [@yociduo](https://github.com/yociduo)
- 🌟 Menu 默认调整为不能选中。
- 🌟 Pagination 的 `itemRender` 新增第三个参数 `originalElement`
- 🌟 AutoComplete 新增 `backfill` 属性,键盘选择时能回填选中项到输入框中。[#5764](https://github.com/ant-design/ant-design/issues/5764)
- 🌟 Select 新增 `firstActiveValue` 属性,允许指定首次打开时默认选中的项。[#6318](https://github.com/ant-design/ant-design/issues/6318) [@L-x-C](https://github.com/ant-design/ant-design/issues/6318)
- LocaleProvider
- 🌟 新增波斯语。[#6878](https://github.com/ant-design/ant-design/pull/6878) [@mkermani144](https://github.com/mkermani144)
- 🌟 新增希腊语。[#6928](https://github.com/ant-design/ant-design/pull/6928) [@michmach](https://github.com/michmach)
- 🌟 新增挪威语。[#7122](https://github.com/ant-design/ant-design/pull/7122) [@santi](https://github.com/santi)
- 🌟 新增塞尔维亚语。[#7201](https://github.com/ant-design/ant-design/pull/7201) [@paunovic-stefan](https://github.com/paunovic-stefan)
- 🐞 修复 Sider 隐藏时 Menu 的标题不会隐藏的问题。[#7409](https://github.com/ant-design/ant-design/issues/7409)
- 🐞 修复 TypeScript 定义 [#7355](https://github.com/ant-design/ant-design/pull/7355) [#7378](https://github.com/ant-design/ant-design/pull/7378) [#7384](https://github.com/ant-design/ant-design/pull/7384)
- 🐞 修复一些组件不能使用条件渲染的问题。[#6530](https://github.com/ant-design/ant-design/issues/6530)
- 网站
- 🌟 新增快捷键 `s` 聚焦搜索框。
- 🌟 页脚新增主色修改预览功能。
## 2.12.8
`2017-08-27`
- 📖 重写了 [《在 create-react-app 中使用》](/docs/react/use-with-create-react-app) 文档,现在不再需要 eject。[#7276](https://github.com/ant-design/ant-design/pull/7276)
- 🌟 优化了固定列的空表格样式。[#7298](https://github.com/ant-design/ant-design/issues/7298)
- 🐞 修复了 CheckboxGroup 和 Checkbox 的 `disabled` 属性逻辑。[#7266](https://github.com/ant-design/ant-design/issues/7266) [@dilidili](https://github.com/dilidili)
- 🐞 修复在 react-snapshot 或 jsdom 环境下测试 Spin 和 Carousel 时报错的问题。[#3308](https://github.com/ant-design/ant-design/issues/3308) [#7318](https://github.com/ant-design/ant-design/issues/7318)
- 🐞 修复 Select、Tooltip、Menu 的一些细节样式问题。
## 2.12.7
`2017-08-21`
- Angular@4.0 版 antd [ng-zorro-antd](https://ng.ant.design) 开源。
- 优化 Affix 支持的场景。[01d4acb](https://github.com/ant-design/ant-design/commit/01d4acb7a9b030be3552b4ca19b4e899dc2bb7c7)
- 修复 AutoComplete children ref 失效的问题。[#6814](https://github.com/ant-design/ant-design/issues/6814)
- Button
- 优化自动在中文字符中间插入空格的逻辑。[59b11f3](https://github.com/ant-design/ant-design/commit/59b11f3b480d43cb32fb24e351cb4c4dd569243c)
- 修复点击事件的 `event.target` 不是 button 的问题。[#7034](https://github.com/ant-design/ant-design/issues/7034)
- 修复 Carousel 的 `innerSlider` 引用问题。[#7191](https://github.com/ant-design/ant-design/issues/7191)
- 修复 DatePicker 中的按钮样式。[ad6dbcb](https://github.com/ant-design/ant-design/commit/ad6dbcb9c6dac407a38f2391d3e5fa1d8ae1cfab)
- 修复 Form TypeScript definition。[#7245](https://github.com/ant-design/ant-design/pull/7245)
- 修复 InputNumber 的 TypeScript definition。[#7257](https://github.com/ant-design/ant-design/issues/7257)
- 修复 `Layout.Sider` 在 IE11 下没有折叠动画的问题。[#6349](https://github.com/ant-design/ant-design/issues/6349)
- 修复 LocaleProvider 西班牙语的拼写问题。[#7234](https://github.com/ant-design/ant-design/pull/7234) [@ramsesmoreno](https://github.com/ramsesmoreno)
- 修复 notification 默认 placement 会被覆盖的问题。[#5895](https://github.com/ant-design/ant-design/issues/5895)
- 修复 Pagination 按钮的 disabled 样式。[cf3c0aa](https://github.com/ant-design/ant-design/commit/cf3c0aac43e2825bfd85ca3b8abbf4742e504260)
- 修复 Select exports 导致的 webpack 构建错误的问题。[#7222](https://github.com/ant-design/ant-design/issues/7222)
- 修复 Tabs 在父容器宽度动态变化时切换按钮没有出现的问题。[#7231](https://github.com/ant-design/ant-design/issues/7231) [#7210](https://github.com/ant-design/ant-design/issues/7210)
- 修复 Timeline 在只有一个 `Timeline.Item` 时的样式问题。[#7214](https://github.com/ant-design/ant-design/issues/7214)
- 修复 Upload 在 uid 为 0 时的错误行为。[#7269](https://github.com/ant-design/ant-design/issues/7269)
## 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)
- 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`
- 修复了 Affix 在 IE 下调用对象无效的报错。[#7060](https://github.com/ant-design/ant-design/issues/7060)
- 对 Badge 默认 title 的出现条件进行了优化。[#7024](https://github.com/ant-design/ant-design/issues/7024)
- Card
- 修改了文档中 `onHovering` 属性的错误描述。[#7078](https://github.com/ant-design/ant-design/issues/7078)
- 修复了 `children` 的类型定义。[pull/7030](https://github.com/ant-design/ant-design/pull/7030) [@djyde](https://github.com/djyde)
- 修复了 Collapse `onChange` 属性参数的类型定义。[pull/7084](https://github.com/ant-design/ant-design/pull/7084) [@davidctj](https://github.com/davidctj)
- Dropdown
- 修复了 Dropdown.Button 的对齐问题。[#7070](https://github.com/ant-design/ant-design/issues/7070)
- 补充了文档中缺失的 `size` 属性。[pull/7071](https://github.com/ant-design/ant-design/pull/7071) [@hansnow](https://github.com/hansnow)
- Input
- 修复了 outline 被 addon 遮盖的问题。[commit/0f63c7](https://github.com/ant-design/ant-design/commit/0f63c7186ef3a5db36c01df9d9ebde9d5b3871ef)
- 修复了 InputGroup 的示例问题。[pull/7089](https://github.com/ant-design/ant-design/pull/7089) [@jdz321](https://github.com/jdz321)
- 修复了 InputNumber 格式化示例的报错问题。[pull/7098](https://github.com/ant-design/ant-design/pull/7098) [@tim-soft](https://github.com/tim-soft)
- Menu
- 修复了 Menu 折叠并缩起时的不正常表现。[#7048](https://github.com/ant-design/ant-design/issues/7048) [#7063](https://github.com/ant-design/ant-design/issues/7063)
- 修复了子菜单被选中时 SubMenu 没有高亮的问题。[pull/7042](https://github.com/ant-design/ant-design/pull/7042) [@atomgao](https://github.com/atomgao)
- 修复了 notification `type` 的类型定义。[#7073](https://github.com/ant-design/ant-design/issues/7073) [@marswong](https://github.com/marswong)
- 修复了 Pagination `showTotal` 的类型定义。[#7054](https://github.com/ant-design/ant-design/issues/7054)
- 修复了 RangePicker 在清空后的报错问题。[#7077](https://github.com/ant-design/ant-design/issues/7077)
- 补充了 Select 缺失的 `onFocus` `onBlur` 类型定义。[pull/7082](https://github.com/ant-design/ant-design/pull/7082) [@troynt](https://github.com/troynt)
- 修复了 Tabs 垂直模式下 `tabBarExtraContent` 样式错乱的问题。rc-tabs 升级到 9.0.2,对 TabBar 的 `extraContent` 的结构进行了重构。[#6578](https://github.com/ant-design/ant-design/issues/6578)
- 修复了 TreeSelect 图标不能正常展示的问题。[#7020](https://github.com/ant-design/ant-design/issues/7020)
- 修复了 `error TS7016: Could not find a declaration file for module 'rc-util/lib/Dom/addEventListener'` 的报错。[#7033](https://github.com/ant-design/ant-design/issues/7033) [@djyde](https://github.com/djyde)
- 完成了『模式-列表』的文档翻译。[list](https://ant.design/docs/pattern/list) [@zachguo](https://github.com/zachguo)
## 2.12.3
`2017-07-30`
- 修复 Checkbox 半选状态禁用时的样式。
- 修复 Card 会出现 `this.container` 不存在的问题。[#6976](https://github.com/ant-design/ant-design/pull/6976) [@neekey](https://github.com/neekey)
- 修复基础字体改为 `14px` 时 Button 的对齐问题。[#7001](https://github.com/ant-design/ant-design/issues/7001)
- 修复 Grid Card 的内边距。
- Dropdown
- 修复菜单可能被多次点击的问题。[#6314](https://github.com/ant-design/ant-design/issues/6314)
- 修复在菜单显示前 hover 会导致菜单消失的问题。[#6949](https://github.com/ant-design/ant-design/issues/6949)
- 修复菜单的错位问题。
- 改进了 Menu 的动画效果。[#6955](https://github.com/ant-design/ant-design/pull/6955)
- 调整了 DatePicker 中图标的位置。
- 新增 less 变量。[e1a46cc](https://github.com/ant-design/ant-design/commit/e1a46cc419fb4975ae1782ba793b378c8e584057)
- 修复了一些 TypeScript 定义问题。
## 2.12.2
`2017-07-22`
- 将 message 默认出现的时长从 1.5s 调整为 3s。
- 重构了 Anchor修复未滚动时链接没有高亮的问题。[#6473](https://github.com/ant-design/ant-design/issues/6473)
- 修复 Input.TextArea 的失效样式。[#6858](https://github.com/ant-design/ant-design/pull/6858) [@lyz810](https://github.com/lyz810)
- 修复 TimePicker 的失效样式。[#6918](https://github.com/ant-design/ant-design/issues/6918)
- 修复 2.12.1 里再次出现的表单反馈图标和下拉图标重叠的问题。[#4431](https://github.com/ant-design/ant-design/issues/4431)
- 修复垂直 Tabs 的切换箭头样式。[255eac9](https://github.com/ant-design/ant-design/commit/255eac907949ded5b79f216a29831dcf4afa9362)
- 调整波兰语的文案。[#6869](https://github.com/ant-design/ant-design/pull/6869) [#6870](https://github.com/ant-design/ant-design/pull/6870) [#6871](https://github.com/ant-design/ant-design/pull/6871) [@imosapatryk](https://github.com/imosapatryk)
- 修复源码中含有 http 的链接而被集团安全扫描工具报错的问题。[#6893](https://github.com/ant-design/ant-design/issues/6893)
- 调整 Menu 的图标和文字对齐问题。
- 修复一个 Tooltip 的 `overlay is marked as required` 的警告问题。[#6897](https://github.com/ant-design/ant-design/issues/6897)
- 修复 Slider 在有色背景下的失效样式。[#6665](https://github.com/ant-design/ant-design/issues/6665)
- 调整了 TreeSelect 选项的点击范围。
- 修复了一些 TypeScript 定义问题。
## 2.12.1
`2017-07-17`
- 修复保加利亚语中的拼写错误。[#6788](https://github.com/ant-design/ant-design/pull/6788) [@NoHomey](https://github.com/NoHomey)
- 修复 `<Avatar src="..." />` 无法加载图片时的样式问题。[#6804](https://github.com/ant-design/ant-design/issues/6804)
- 修复 `Button.Group` 内使用 loading 状态的图标按钮时的样式问题。[#6822](https://github.com/ant-design/ant-design/issues/6822)
- 修复 Checkbox TypeScript 定义问题。[#6768](https://github.com/ant-design/ant-design/issues/6768)
- 修复 `Collapse.Panel[header]` 内容过长时的样式问题。[#6832](https://github.com/ant-design/ant-design/issues/6832)
- Input
- 修复 `className` 没有添加到 wrapper 上的问题。[#6809](https://github.com/ant-design/ant-design/issues/6809)
- 修复 `Input.Search` 的 TypeScript 定义。[#6837](https://github.com/ant-design/ant-design/pull/6837) [@newraina](https://github.com/newraina)
- 修复 `Input.TextArea` 的 value 无法被重置的问题。[#6776](https://github.com/ant-design/ant-design/issues/6776)
- 修复 `Input.Group` 内使用 Select 组件时的 error 样式问题。
<img src="https://user-images.githubusercontent.com/507615/27983847-551ffe0a-63f9-11e7-81ba-8c3336ddafd0.png" />
- 修复 Layout 实现影响 Anchor、BackTop 的功能的问题。[#6817](https://github.com/ant-design/ant-design/issues/6817)
- Menu
- 修复折叠动画失效问题。
- 修复 `Menu.Item` 边框样式问题。[46ffda9](https://github.com/ant-design/ant-design/commit/46ffda9c9385ec54e0c78594ed6c280d40ef035d)
- 修复 RangePicker 设置了 `value|defaultValue` 后,浮层中的月份展示不对的问题。[#6764 point 3](https://github.com/ant-design/ant-design/issues/6764)
- 修复 Tooltip 对齐问题。[#6830](https://github.com/ant-design/ant-design/issues/6830)
## 2.12.0
`2017-07-08`
- 新增 Card `noHovering` 属性以及 Card.Grid 组件。[pull/6748](https://github.com/ant-design/ant-design/pull/6748)
- DatePicker、MonthPicker、RangePicker 支持 `className` 属性。[pull/6584](https://github.com/ant-design/ant-design/pull/6584) [@EnrikoLabriko](https://github.com/EnrikoLabriko)
- 新增 Input.TextArea原 Input[type='textArea'] 将被废弃。[pull/6138](https://github.com/ant-design/ant-design/pull/6138)
- LocaleProvider 新增泰语支持。[pull/6721](https://github.com/ant-design/ant-design/pull/6721) [@koobitor](https://github.com/koobitor)
- Mention 支持 `focus` 方法。[#6135](https://github.com/ant-design/ant-design/issues/6135)
- Menu `inline` 模式下支持用 `inlineCollapsed` 属性缩起/展开,同时 Layout.Sider 使用 `context` 向 Menu 传递 `collapsed` 属性,无需再自己定制样式。[pull/6686](https://github.com/ant-design/ant-design/pull/6686)
- 新增 Pagination `itemRender` 属性,用于自定义页码的结构。[25a603](https://github.com/ant-design/ant-design/commit/25a60322e5c6649522fb9f0d34919eba0ccb1f65)
- 新增 Tooltip `autoAdjustOverflow` 属性,支持关闭自动调整位置的功能。[pull/6661](https://github.com/ant-design/ant-design/pull/6661) [@jdz321](https://github.com/jdz321)
- 修复了 Avatar 错误的文档。[pull/6711](https://github.com/ant-design/ant-design/pull/6711) [@llaski](https://github.com/llaski)
- DatePicker
- 修复 `onOk` 类型定义。[pull/6619](https://github.com/ant-design/ant-design/pull/6619) [@newraina](https://github.com/newraina)
- 优化了图标样式。[pull/6655](https://github.com/ant-design/ant-design/pull/6655) [@megawac](https://github.com/megawac)
- Form
- 修复 FormItem `extra` 文案的行高问题。[#6618](https://github.com/ant-design/ant-design/issues/6618)
- 修复 FormItem `labelCol` `wrapperCol` 类型定义。[pull/6611](https://github.com/ant-design/ant-design/pull/6611) [@newraina](https://github.com/newraina)
- 修复自适应高度的 Input 文本域出现滚动条的问题。[#6609](https://github.com/ant-design/ant-design/issues/6609)
- 补充了 InputNumber 中缺失的 `precision` 类型定义。[#6715](https://github.com/ant-design/ant-design/issues/6715)
- 修复 Select 样式溢出的问题。[#6621](https://github.com/ant-design/ant-design/issues/6621)
- Slider
- 优化了样式。[#6665](https://github.com/ant-design/ant-design/issues/6665)
- rc-slider 升级至 8.2.0,新增 `dotStyle``activeDotStyle` 属性。[rc-slider/pull/292](https://github.com/react-component/slider/pull/292)
- 修复 Spin 遮罩层被穿透的样式问题。[#6759](https://github.com/ant-design/ant-design/issues/6759)
- 修复嵌套 Steps 的样式问题。[#6754](https://github.com/ant-design/ant-design/issues/6754)
- Table
- 修复了固定头部 Table 中展开区域的背景色样式问题。[#6657](https://github.com/ant-design/ant-design/issues/6657)
- 补充了 Table 文档中缺失的 `onRowDoubleClick` 属性。[pull/6667](https://github.com/ant-design/ant-design/pull/6667) [@yurtaev](https://github.com/yurtaev)
- 补充了 Table 文档中 `loading` 属性的说明。[pull/6763](https://github.com/ant-design/ant-design/pull/6763) [@hansnow](https://github.com/hansnow)
- rc-table 升级至 5.4.0,新增对 `onRowMouseEnter``onRowMouseLeave` 的支持。[rc-table/0db582](https://github.com/react-component/table/commit/0db582a75dfa119715eb4db8a59eacfca744c5a0)
- 优化了 TimePicker 的格式支持。[950c32](https://github.com/ant-design/ant-design/commit/950c321b25091ef31b130b83674478974590d7f3)
- 对大量组件的样式进行了优化或微调,包括 [Checkbox](https://ant.design/components/checkbox/)[Radio](https://ant.design/components/radio/)[Tabs](https://ant.design/components/tabs/)[Card](https://ant.design/components/card/) 等等。
- Demo 现在可以在 codepen 中打开。[#5140](https://github.com/ant-design/ant-design/issues/5140)
## 2.11.2
`2017-06-25`
- 修复 Dropdown.Button 不支持 `getPopupContainer` 方法的问题。[#6527](https://github.com/ant-design/ant-design/pull/6527)
- 修复 Dropdown 子菜单 disabled 时的样式错误问题。[#6548](https://github.com/ant-design/ant-design/issues/6548)
- 修复 Calendar 的背景颜色问题。 [aaf2a50](https://github.com/ant-design/ant-design/commit/aaf2a508bef96f81faf556036649b2a2fe5b635b)
- Calender 的下拉菜单现在在 header 中显示。[#6479](https://github.com/ant-design/ant-design/pull/6479)
- 修复 Input 和 Textarea 横向滚动的问题。[#6577](https://github.com/ant-design/ant-design/issues/6577)
- 补充了 Checkbox 和 Radio 的 `disabled` 属性文档。[#6597](https://github.com/ant-design/ant-design/pull/6597)
- 增大了 Table 的排序和过滤图标的可点击区域。[#6528](https://github.com/ant-design/ant-design/pull/6528)
- 为 Table.props.onRowClick 函数增加了 event: Event 参数。[e2a99f5](https://github.com/ant-design/ant-design/commit/e2a99f53f7a27bd7de4adf99d0e1ee755b537c72)
## 2.11.1
`2017-06-18`
- 修复 Table 的分页设置 `className` 无效的问题。[#6416](https://github.com/ant-design/ant-design/issues/6416)
- 修复 Tabs 嵌套使用时的样式问题。[#6431](https://github.com/ant-design/ant-design/issues/6431) [@sadmark](https://github.com/sadmark)
- 修复 RadioButton 在小屏幕下会没有左侧边框的问题。[#6492](https://github.com/ant-design/ant-design/issues/6492) [@pierreneter](https://github.com/pierreneter)
- 修复 RangePicker 底部会多一条边框的问题。
- 完善 Dropdown.Button 类型定义。[#6482](https://github.com/ant-design/ant-design/pull/6482) [@newraina](https://github.com/newraina)
## 2.11.0
`2017-06-07`
- 新增头像组件 [Avatar](https://ant.design/components/avatar/)。🌝
- LocaleProvider
- 新增保加利亚语支持。[#6297](https://github.com/ant-design/ant-design/pull/6297) [@dimitrov-adrian](https://github.com/dimitrov-adrian)
- 新增波兰语支持。[#6326](https://github.com/ant-design/ant-design/pull/6326) [@longersson](https://github.com/longersson)
- 新增英式英语支持。[#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- 新增意大利语支持。[#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- 新增法语支持。[#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- 新增比利时语支持。[#6344](https://github.com/ant-design/ant-design/pull/6344) [@damiangreen](https://github.com/damiangreen)
- Collapse.Panel 现在可以被禁用,禁用时无法通过用户交互改变面板打开/关闭状态。[#6119](https://github.com/ant-design/ant-design/issues/6119) [demo](https://ant.design/components/collapse/#components-collapse-demo-basic)
- DatePicker 与 RangePicker 现在支持在弹层中渲染自定义 footer。[#6122](https://github.com/ant-design/ant-design/issues/6122) [#5188](https://github.com/ant-design/ant-design/issues/5188) [demo](https://ant.design/components/date-picker/#components-date-picker-demo-extra-footer)
- InputNumber 现在可以通过 `precision` 单独设置精度,即精度与 `step` 可以不再绑定。[#5998](https://github.com/ant-design/ant-design/issues/5998)
- TreeSelect 多选模式支持 `allowClear` 展示清除按钮。
- 优化 Pagination 对键盘操作的支持。[rc-pagination#83](https://github.com/react-component/pagination/pull/83) [@geramirez](https://github.com/geramirez)
- 优化 Progress 样式。[#6354](https://github.com/ant-design/ant-design/issues/6354)
- 优化 Slider 的可访问性支持。[#6301](https://github.com/ant-design/ant-design/pull/6301)
- 修复正在执行动画的元素可点击的问题。[#6314](https://github.com/ant-design/ant-design/issues/6314)
- 修复时间类组件的 `Cannot read property '0' of undefined` 报错问题。[#6334](https://github.com/ant-design/ant-design/issues/6334)
- DatePicker
- 修复弹层错位的问题。[#6347](https://github.com/ant-design/ant-design/issues/6347)
- 修复日期单元格 tooltip 的内容格式问题。[#5724](https://github.com/ant-design/ant-design/issues/5724) [@zefj](https://github.com/zefj)
- 修复能通过键盘操作选择 disabled 日期的问题。[#6345](https://github.com/ant-design/ant-design/issues/6345)
- 修复 Form `validateFieldsAndScroll` 不支持 nested fields 的问题。[#5410](https://github.com/ant-design/ant-design/issues/5410)
- Input[addon]
- 修复 style 属性失效的问题。[#6379](https://github.com/ant-design/ant-design/issues/6379)
- 修复垂直对齐的问题。[#6403](https://github.com/ant-design/ant-design/issues/6403)
- 修复 Modal.confirm onOk 返回的 Promise rejected 后用户无法重试的问题。[#6183](https://github.com/ant-design/ant-design/issues/6183)
- 修复 Pagination 简单模式下输入框过小的问题。[#6339](https://github.com/ant-design/ant-design/issues/6339)
- 修复 Select 在搜索模式下用户输入的内容被截断的问题。[#6382](https://github.com/ant-design/ant-design/issues/6382)
- 修复 Spin 定时器没有被正确移除的问题。[#6383](https://github.com/ant-design/ant-design/issues/6383)
- 修复 Switch 对 onClick 的支持。[#6373](https://github.com/ant-design/ant-design/issues/6373)
- 修复 Table.Column TypeScript definition 导致 `error TS2304: Cannot find name 'T'` 的问题。[#6313](https://github.com/ant-design/ant-design/issues/6313)
- 修复 Timeline.Item 和 Dropdown.Button 在 TypeScript 报 `does not have any construct or call signatures` 错中的问题。[#6356](https://github.com/ant-design/ant-design/issues/6356)
- 修复 Tree、TreeSelect disabled 样式问题。[#6320](https://github.com/ant-design/ant-design/issues/6320)
## 2.10.4
`2017-06-01`
- 修正 `rc-util` 依赖。[#6310](https://github.com/ant-design/ant-design/pull/6311) [@bkniffler](https://github.com/bkniffler)
- 修正 `es` 版本的语法错误。[#6310](https://github.com/ant-design/ant-design/issues/6310#issuecomment-305176273)
## 2.10.3
`2017-05-31`
- **Calendar**
- 修复了样式问题以支持 disabledDate补充了 Type 定义及文档。[#6074](https://github.com/ant-design/ant-design/issues/6074)
- rc-calendar 依赖升级至 8.4.0,支持保加利亚语,支持首先选择结束日期。[commit/a4a6db](https://github.com/ant-design/ant-design/commit/a4a6db76de57ac2559a2be80208121ab5e168fbf)
- **Alert** 去掉了默认的下边距。[commit/5ef482](https://github.com/ant-design/ant-design/commit/5ef48289747409b6d962f75627ddb11e2765f965)
- **Tabs** 修复了隐藏标签下内容的表现问题。[#6237](https://github.com/ant-design/ant-design/issues/6237)
- **Layout** 修复了折叠侧边栏中的内容不能自动隐藏的问题。[#6131](https://github.com/ant-design/ant-design/issues/6131)
- **Table** 修复了 filter 被 Table 截断的问题。[#6245](https://github.com/ant-design/ant-design/issues/6245)
- **InputNumber** 修复了配置 hasFeedback 时校验结果图标位置有误的问题。[#6289](https://github.com/ant-design/ant-design/issues/6289)
- **Typescript**
- typescript 升级至 2.3.x。[#6263](https://github.com/ant-design/ant-design/issues/6263)
- 补充了 Table 的 type 定义. [commit/acdc56](https://github.com/ant-design/ant-design/commit/acdc563a547c49960521b2b48cd5c707ac1e4cf2) [pull/6291](https://github.com/ant-design/ant-design/pull/6291) [@jch254](https://github.com/jch254)
- 修复了 Mention、Form 组件中错误的 type 定义. [pull/6268](https://github.com/ant-design/ant-design/pull/6268) [@jch254](https://github.com/jch254)
- 修复了 Badge 组件中错误的 type 定义. [pull/6291](https://github.com/ant-design/ant-design/pull/6291) [@jch254](https://github.com/jch254)
- 补充了 Input 相关组件的 type 定义。[pull/6276](https://github.com/ant-design/ant-design/pull/6276/commits/94901de2e8c0a2ed6f62f5aa50c98994aad71844) [@panjiesw](https://github.com/panjiesw) [commit/220264](https://github.com/ant-design/ant-design/commit/2202648d6e1c53409ade2141955232922b0040d6#diff-26cb6da96d10397e18e7dbd6c5d8f7a1L265) [@clinyong](https://github.com/clinyong)
## 2.10.2
`2017-05-23`
- 修复了 React 升级引起的 `prop-types` 相关的 warning 问题。[#5678](https://github.com/ant-design/ant-design/issues/5678)
- 修复 DatePicker 和 RangePicker showTime 模式下 defaultValue 的问题。[#6160](https://github.com/ant-design/ant-design/pull/6160)
- 修复 TreeSelect 的样式问题。[#6137](https://github.com/ant-design/ant-design/issues/6137)
- 修复 包含 prefix 和 addon 的 Input 的样式问题。[#6144](https://github.com/ant-design/ant-design/issues/6144)
- 修复 `notification.destroy` 的 Bug。[#6161](https://github.com/ant-design/ant-design/issues/6161)
@@ -56,7 +427,7 @@ timeline: true
- Checkbox.Group 可以内嵌 Checkbox以支持更灵活的布局。[demo](http://ant.design/components/checkbox-cn/#components-checkbox-demo-layout)
- Notification 现在可以自定义弹出框的样式和 className。[#5893](https://github.com/ant-design/ant-design/issues/5893) [@lixiaoyang1992](https://github.com/lixiaoyang1992)
- TimePicker 的展开状态可以通过受控属性 `open` 控制。[#5913](https://github.com/ant-design/ant-design/pull/5913)
- Upload[onRemove] 可以返回一个 promise 异步控制移除逻辑。[#5973](https://github.com/ant-design/ant-design/issues/5973) [@shlice](https://github.com/shlice)
- Upload `onRemove` 方法可以返回一个 Promise 用于异步控制移除逻辑。[#5973](https://github.com/ant-design/ant-design/issues/5973) [@shlice](https://github.com/shlice)
- 调整 Dropdown 弹出层的边距。[#5088](https://github.com/ant-design/ant-design/issues/5088)
- AutoComplete
- 修复 dataSource 为 `Object[]` 时行为与 `String[]` 不一致的问题。[#5860](https://github.com/ant-design/ant-design/issues/5860)
@@ -97,7 +468,6 @@ timeline: true
- 优化了 RangePicker 的体验rc-calendar 升级至 `~8.0.0`。[#4985](https://github.com/ant-design/ant-design/issues/4985)
- 修复了 RangePicker 自定义高度后文字不能上下居中的问题。[pull/5718](https://github.com/ant-design/ant-design/pull/5718) [@leadream](https://github.com/leadream)
- **Form** 增加样式变量来控制表单项标题冒号的展示。[pull/5855](https://github.com/ant-design/ant-design/pull/5855) [@megawac](https://github.com/megawac)
- **Icon** 增加 displayName 属性。[pull/5643](https://github.com/ant-design/ant-design/pull/5643) [@handycode](https://github.com/handycode)
- **Input**
- 修复了 Input.Search 在 Input.Group 下的样式问题。[#5743](https://github.com/ant-design/ant-design/issues/5743)
- 修复了 AutoComplete 在 Input.Group 下的样式问题。[#5832](https://github.com/ant-design/ant-design/issues/5832)
@@ -192,7 +562,7 @@ timeline: true
- 修复对俄语支持不完善的问题。[#5406](https://github.com/ant-design/ant-design/pull/5406) [@plandem](https://github.com/plandem)
- 修复不支持 Upload 的问题。[#5388](https://github.com/ant-design/ant-design/pull/5388) [@natergj](https://github.com/natergj)
- 修复 Menu 内 Icon 动画效果与文字不一致的问题。[#5495](https://github.com/ant-design/ant-design/issues/5495)
- 修复 `Modale[footer]` 无法置空的问题。[#5462](https://github.com/ant-design/ant-design/issues/5462)
- 修复 `Modal[footer]` 无法置空的问题。[#5462](https://github.com/ant-design/ant-design/issues/5462)
- 修复 `2.8.2` 引入的 Pagination 在 `IE<=10` 下样式丢失的问题。[#5484](https://github.com/ant-design/ant-design/issues/5484)
- 修复 Popover 内使用 Table 时会意外关闭的问题。[#5407](https://github.com/ant-design/ant-design/issues/5407)
- 去掉 Radio 只能作为 Radio.Group 的直接后代的限制。[#5443](https://github.com/ant-design/ant-design/issues/5443)
@@ -207,16 +577,16 @@ timeline: true
`2017-03-19`
- 发布了新的 [设计基础文档](https://ant.design/docs/spec/colors-cn)。
- 修复使用 Modal.confirm 时报错的问题。[#5269](https://github.com/ant-design/ant-design/issues/5269)
- 修复 Upload 的蒙层样式 [#5275](https://github.com/ant-design/ant-design/issues/5275)
- 修复 Upload 上传进度条不显示的问题 [#5323](https://github.com/ant-design/ant-design/issues/5323)
- 修复 Table 的分页的 showTotal 数据错误的问题 [#5259](https://github.com/ant-design/ant-design/issues/5259)
- 修复了 Popconfirm 与 Button 同时使用时的样式问题 [5301](https://github.com/ant-design/ant-design/issues/5301)
- 修复 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)
- 调整了 Spin 的动画 [fa1e031](https://github.com/ant-design/ant-design/commit/fa1e031a7396c61fa9709a0c46fe63200c35d232)
- 调整了 Mention 的一些样式 [240a93c](https://github.com/ant-design/ant-design/commit/240a93cee25bc8c6ad4520cd907a14a7b22ed773)
- 修复使用 Modal.confirm 时报错的问题。[#5269](https://github.com/ant-design/ant-design/issues/5269)
- 修复 Upload 的蒙层样式[#5275](https://github.com/ant-design/ant-design/issues/5275)
- 修复 Upload 上传进度条不显示的问题[#5323](https://github.com/ant-design/ant-design/issues/5323)
- 修复 Table 的分页的 showTotal 数据错误的问题[#5259](https://github.com/ant-design/ant-design/issues/5259)
- 修复了 Popconfirm 与 Button 同时使用时的样式问题[#5301](https://github.com/ant-design/ant-design/issues/5301)
- 修复 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)
- 调整了 Spin 的动画[fa1e031](https://github.com/ant-design/ant-design/commit/fa1e031a7396c61fa9709a0c46fe63200c35d232)
- 调整了 Mention 的一些样式[240a93c](https://github.com/ant-design/ant-design/commit/240a93cee25bc8c6ad4520cd907a14a7b22ed773)
## 2.8.1
@@ -315,7 +685,7 @@ timeline: true
- 修复 `Cannot find module '../../package.json'` 的问题。[#4935](https://github.com/ant-design/ant-design/issues/4935)
- 补充了 Table、RangePicker 和 Upload 的部分属性定义。
- 修复了 Modal `onOk` `afterClose` 和 Popconfirm `onConfirm` `onCancel` 缺少点击 event 参数的问题。 [#4787](https://github.com/ant-design/ant-design/issues/4787)
- 优化 Menu[inline] 和 Collapse 的折叠动画效果。
- 优化 Menu inline 模式和 Collapse 的折叠动画效果。
- 优化了 Checkbox 和 Radio 的垂直对齐样式。
- Table
- 修复固定列时列头样式错位的问题。[#4936](https://github.com/ant-design/ant-design/issues/4936)

46
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at xingmin.zhu@alipay.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -56,7 +56,7 @@ ReactDOM.render(<DatePicker />, mountNode);
import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
```
按需加载可通过此写法 `import DatePicker from 'antd/lib/date-picker'` 或使用插件 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)。
按需加载可通过此写法 `import DatePicker from 'antd/lib/date-picker'` 或使用 Babel 插件 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import),或使用 TypeScript 插件 [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin)
## TypeScript
@@ -112,7 +112,7 @@ $ npm start
在任何形式的参与前,请先阅读 [贡献者文档](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md)。如果你希望参与贡献,欢迎 [Pull Request](https://github.com/ant-design/ant-design/pulls),或给我们 [报告 Bug](http://new-issue.ant.design/)。
> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html),更好的问题更容易获得帮助。
> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html)、[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。
## 社区互助

View File

@@ -29,13 +29,13 @@ An enterprise-class UI design language and React-based implementation.
## Environment Support
* Browser: Modern browsers and Internet Explorer 9+
* Modern browsers and Internet Explorer 9+ (with [polyfills](https://ant.design/docs/react/getting-started#Compatibility))
* Server-side Rendering
* [Electron](http://electron.atom.io/)
## Let's build a better antd together [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
`antd` is an open source project, improvements are welcomed. If you are interested in contributing to `antd`, you can watch this repository, join in [discussion](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3ADiscussion), or try to implement some [features which have been accepted](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3A%22PR+welcome%22). Actually, there are [many ways](https://opensource.guide/how-to-contribute/) to contribute. And we are always happy to [offer collaborator permission](https://github.com/ant-design/ant-design/issues/3222) for some active contributors.
`antd` is an open source project; improvements are welcomed. If you are interested in contributing to `antd`, you can watch this repository, join in [discussion](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3ADiscussion), or try to implement some [features which have been accepted](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3A%22PR+welcome%22). Actually, there are [many ways](https://opensource.guide/how-to-contribute/) to contribute. And we are always happy to [offer collaborator permission](https://github.com/ant-design/ant-design/issues/3222) for some active contributors.
## Install
@@ -58,7 +58,15 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
### Use modularized antd
- Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
- Manually import
```jsx
import DatePicker from 'antd/lib/date-picker'; // for js
import 'antd/lib/date-picker/style/css'; // for css
// import 'antd/lib/date-picker/style'; // that will import less
```
- Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
```js
// .babelrc or babel-loader option
@@ -76,14 +84,6 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
import { DatePicker } from 'antd';
```
- Manually import
```jsx
import DatePicker from 'antd/lib/date-picker'; // for js
import 'antd/lib/date-picker/style/css'; // for css
// import 'antd/lib/date-picker/style'; // that will import less
```
### TypeScript
```js
@@ -101,6 +101,19 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
> - set `allowSyntheticDefaultImports` to prevent `error TS1192: Module 'react' has no default export`.
> - Don't use @types/antd, antd provide a built-in ts definition already.
#### Use [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) with modularized antd
```js
{
loader: "ts-loader", // or awesome-typescript-loader
options {
getCustomTransformers: () => ({
before: [ tsImportPluginFactory({ libraryName: "antd", style: "css" }) ]
})
}
}
```
## Internationalization
See [i18n](http://ant.design/docs/react/i18n).
@@ -110,7 +123,7 @@ See [i18n](http://ant.design/docs/react/i18n).
- [Home page](http://ant.design/)
- [UI library](http://ant.design/docs/react/introduce)
- [Change Log](CHANGELOG.en-US.md)
- [Offcial Scaffold Tool](https://github.com/dvajs/dva-cli/)
- [Official Scaffold Tool](https://github.com/dvajs/dva-cli/)
- [Development Tool](http://ant-tool.github.io/)
- [Scaffold Market](http://scaffold.ant.design)
- [rc-components](http://react-component.github.io/)
@@ -135,4 +148,4 @@ Open your browser and visit http://127.0.0.1:8001 , see more at https://github.c
## Contributing
We welcome all contributions, please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as [GitHub issues](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :)
We welcome all contributions. Please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as [GitHub issues](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :)

View File

@@ -6,6 +6,7 @@ Array [
"Anchor",
"AutoComplete",
"Alert",
"Avatar",
"BackTop",
"Badge",
"Breadcrumb",

View File

@@ -1,11 +1,22 @@
import assign from 'object-assign';
export function getComponentLocale(props, context, componentName, getDefaultLocale) {
const locale = context && context.antLocale && context.antLocale[componentName] ?
context.antLocale[componentName] : getDefaultLocale();
let locale: any = {};
if (context && context.antLocale && context.antLocale[componentName]) {
locale = context.antLocale[componentName];
} else {
const defaultLocale = getDefaultLocale();
// TODO: make default lang of antd be English
// https://github.com/ant-design/ant-design/issues/6334
locale = defaultLocale.default || defaultLocale;
}
const result = assign({}, locale, props.locale);
result.lang = assign({}, locale.lang, props.locale.lang);
const result = {
...locale,
...props.locale,
};
result.lang = {
...locale.lang,
...props.locale.lang,
};
return result;
}

View File

@@ -16,7 +16,8 @@ export default function getRequestAnimationFrame() {
return () => {};
}
if (window.requestAnimationFrame) {
return window.requestAnimationFrame;
// https://github.com/vuejs/vue/issues/4465
return window.requestAnimationFrame.bind(window);
}
const prefix = availablePrefixs.filter(key => `${key}RequestAnimationFrame` in window)[0];

View File

@@ -4,7 +4,7 @@ type: Navigation
title: Affix
---
Make an element sticky to viewport.
Make an element stick to viewport.
## When To Use
@@ -19,7 +19,7 @@ Please note that Affix should not cover other content on the page, especially wh
| offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 |
| offsetBottom | Pixels to offset from bottom when calculating position of scroll | number | - |
| target | specifies the scrollable area dom node | () => HTMLElement | () => window |
| onChange | Callback when affix state is changed | Function(affixed) | - |
| onChange | Callback for when affix state is changed | Function(affixed) | - |
**Note:** Children of `Affix` can not be `position: absolute`, but you can set `Affix` as `position: absolute`:

View File

@@ -40,7 +40,7 @@ function noop() {}
function getDefaultTarget() {
return typeof window !== 'undefined' ?
window : null;
};
}
// Affix
export interface AffixProps {
@@ -73,6 +73,18 @@ export default class Affix extends React.Component<AffixProps, any> {
fixedNode: HTMLElement;
};
events = [
'resize',
'scroll',
'touchstart',
'touchmove',
'touchend',
'pageshow',
'load',
];
eventHandlers = {};
constructor(props) {
super(props);
this.state = {
@@ -150,7 +162,7 @@ export default class Affix extends React.Component<AffixProps, any> {
});
this.setPlaceholderStyle({
width,
height: affixNode.offsetHeight,
height: elemSize.height,
});
} else if (
scrollTop < elemOffset.top + elemSize.height + (offsetBottom as number) - targetInnerHeight &&
@@ -167,7 +179,7 @@ export default class Affix extends React.Component<AffixProps, any> {
});
this.setPlaceholderStyle({
width,
height: affixNode.offsetHeight,
height: elemOffset.height,
});
} else {
const { affixStyle } = this.state;
@@ -190,7 +202,7 @@ export default class Affix extends React.Component<AffixProps, any> {
componentWillReceiveProps(nextProps) {
if (this.props.target !== nextProps.target) {
this.clearScrollEventListeners();
this.clearEventListeners();
this.setTargetEventListeners(nextProps.target);
// Mock Event object.
@@ -199,7 +211,7 @@ export default class Affix extends React.Component<AffixProps, any> {
}
componentWillUnmount() {
this.clearScrollEventListeners();
this.clearEventListeners();
clearTimeout(this.timeout);
(this.updatePosition as any).cancel();
}
@@ -209,15 +221,18 @@ export default class Affix extends React.Component<AffixProps, any> {
if (!target) {
return;
}
this.clearScrollEventListeners();
this.scrollEvent = addEventListener(target, 'scroll', this.updatePosition);
this.resizeEvent = addEventListener(target, 'resize', this.updatePosition);
this.clearEventListeners();
this.events.forEach(eventName => {
this.eventHandlers[eventName] = addEventListener(target, eventName, this.updatePosition);
});
}
clearScrollEventListeners() {
['scrollEvent', 'resizeEvent'].forEach((name) => {
if (this[name]) {
this[name].remove();
clearEventListeners() {
this.events.forEach(eventName => {
const handler = this.eventHandlers[eventName];
if (handler && handler.remove) {
handler.remove();
}
});
}

View File

@@ -20,3 +20,9 @@ ReactDOM.render(
<Alert message="Success Text" type="success" />
, mountNode);
````
<style>
.ant-alert {
margin-bottom: 16px;
}
</style>

View File

@@ -8,18 +8,18 @@ Alert component for feedback.
## When To Use
- When you need to show alert messages for users.
- When you need to show alert messages to users.
- When you need a persistent static container which is closable by user actions.
## API
| Property | Description | Type | Default |
|----------- |--------------------------------------------------------- | ---------- |-------|
| type | Type of Alert styles, options:`success`, `info`, `warning`, `error` | string | `info`, in `banner` mode it's `warning` |
| type | Type of Alert styles, options: `success`, `info`, `warning`, `error` | string | `info`, in `banner` mode default is `warning` |
| closable | Whether Alert can be closed | boolean | - |
| closeText | Close text to show | string\|ReactNode | - |
| message | Content of Alert | string\|ReactNode | - |
| description | Additional content of Alert | string\|ReactNode | - |
| onClose | Callback when close Alert | Function | - |
| showIcon | Whether to show icon | boolean | false, in `banner` mode it's true |
| onClose | Callback when Alert is closed | Function | - |
| showIcon | Whether to show icon | boolean | false, in `banner` mode default is true |
| banner | Whether to show as banner | boolean | false |

View File

@@ -24,4 +24,3 @@ title: Alert
| onClose | 关闭时触发的回调函数 | Function | 无 |
| showIcon | 是否显示辅助图标 | boolean | false`banner` 模式下默认值为 true |
| banner | 是否用作顶部公告 | boolean | false |

View File

@@ -11,8 +11,7 @@
border-radius: @border-radius-base;
color: @alert-text-color;
font-size: @font-size-base;
line-height: 16px;
margin-bottom: 10px;
line-height: @line-height-base;
&&-no-icon {
padding: 8px 48px 8px 16px;
@@ -20,7 +19,7 @@
&-icon {
font-size: @font-size-lg;
top: 9.5px;
top: 8px + @font-size-base * @line-height-base / 2 - @font-size-lg / 2;
left: 16px;
position: absolute;
}
@@ -91,7 +90,6 @@
padding: 16px 16px 16px 60px;
position: relative;
border-radius: @border-radius-base;
margin-bottom: 10px;
color: @text-color;
line-height: 1.5;
}

View File

@@ -0,0 +1,244 @@
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import Affix from '../affix';
import AnchorLink from './AnchorLink';
import getScroll from '../_util/getScroll';
import getRequestAnimationFrame from '../_util/getRequestAnimationFrame';
function getDefaultTarget() {
return window;
}
function getOffsetTop(element: HTMLElement): number {
if (!element) {
return 0;
}
if (!element.getClientRects().length) {
return 0;
}
const rect = element.getBoundingClientRect();
if (rect.width || rect.height) {
const doc = element.ownerDocument;
const docElem = doc.documentElement;
return rect.top - docElem.clientTop;
}
return rect.top;
}
function easeInOutCubic(t: number, b: number, c: number, d: number) {
const cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
return cc / 2 * ((t -= 2) * t * t + 2) + b;
}
const reqAnimFrame = getRequestAnimationFrame();
function scrollTo(href: string, offsetTop = 0, target, callback = () => { }) {
const scrollTop = getScroll(target(), true);
const targetElement = document.getElementById(href.substring(1));
if (!targetElement) {
return;
}
const eleOffsetTop = getOffsetTop(targetElement);
const targetScrollTop = scrollTop + eleOffsetTop - offsetTop;
const startTime = Date.now();
const frameFunc = () => {
const timestamp = Date.now();
const time = timestamp - startTime;
window.scrollTo(window.pageXOffset, easeInOutCubic(time, scrollTop, targetScrollTop, 450));
if (time < 450) {
reqAnimFrame(frameFunc);
} else {
callback();
}
};
reqAnimFrame(frameFunc);
history.pushState(null, '', href);
}
type Section = {
link: String;
top: number;
};
export interface AnchorProps {
prefixCls?: string;
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
offsetTop?: number;
bounds?: number;
affix?: boolean;
showInkInFixed?: boolean;
target?: () => HTMLElement | Window;
}
export default class Anchor extends React.Component<AnchorProps, any> {
static Link: typeof AnchorLink;
static defaultProps = {
prefixCls: 'ant-anchor',
affix: true,
showInkInFixed: false,
};
static childContextTypes = {
antAnchor: PropTypes.object,
};
refs: {
ink?: any;
};
private links: String[];
private scrollEvent: any;
private animating: boolean;
constructor(props: AnchorProps) {
super(props);
this.state = {
activeLink: null,
};
this.links = [];
}
getChildContext() {
return {
antAnchor: {
registerLink: (link: String) => {
if (!this.links.includes(link)) {
this.links.push(link);
}
},
unregisterLink: (link: String) => {
const index = this.links.indexOf(link);
if (index !== -1) {
this.links.splice(index, 1);
}
},
activeLink: this.state.activeLink,
scrollTo: this.handleScrollTo,
},
};
}
componentDidMount() {
const getTarget = this.props.target || getDefaultTarget;
this.scrollEvent = addEventListener(getTarget(), 'scroll', this.handleScroll);
this.handleScroll();
}
componentWillUnmount() {
if (this.scrollEvent) {
this.scrollEvent.remove();
}
}
componentDidUpdate() {
this.updateInk();
}
handleScroll = () => {
if (this.animating) {
return;
}
const { offsetTop, bounds } = this.props;
this.setState({
activeLink: this.getCurrentAnchor(offsetTop, bounds),
});
}
handleScrollTo = (link) => {
const { offsetTop, target = getDefaultTarget } = this.props;
this.animating = true;
this.setState({ activeLink: link });
scrollTo(link, offsetTop, target, () => {
this.animating = false;
});
}
getCurrentAnchor(offsetTop = 0, bounds = 5) {
let activeLink = '';
if (typeof document === 'undefined') {
return activeLink;
}
const linkSections: Array<Section> = [];
this.links.forEach(link => {
const target = document.getElementById(link.substring(1));
if (target && getOffsetTop(target) < offsetTop + bounds) {
const top = getOffsetTop(target);
linkSections.push({
link,
top,
});
}
});
if (linkSections.length) {
const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
return maxSection.link;
}
return '';
}
updateInk = () => {
if (typeof document === 'undefined') {
return;
}
const { prefixCls } = this.props;
const linkNode = ReactDOM.findDOMNode(this as any).getElementsByClassName(`${prefixCls}-link-title-active`)[0];
if (linkNode) {
this.refs.ink.style.top = `${(linkNode as any).offsetTop + linkNode.clientHeight / 2 - 4.5}px`;
}
}
render() {
const {
prefixCls,
className = '',
style,
offsetTop,
affix,
showInkInFixed,
children,
} = this.props;
const { activeLink } = this.state;
const inkClass = classNames(`${prefixCls}-ink-ball`, {
visible: activeLink,
});
const wrapperClass = classNames(className, `${prefixCls}-wrapper`);
const anchorClass = classNames(prefixCls, {
'fixed': !affix && !showInkInFixed,
});
const anchorContent = (
<div className={wrapperClass} style={style}>
<div className={anchorClass}>
<div className={`${prefixCls}-ink`} >
<span className={inkClass} ref="ink" />
</div>
{children}
</div>
</div>
);
return !affix ? anchorContent : (
<Affix offsetTop={offsetTop}>
{anchorContent}
</Affix>
);
}
}

View File

@@ -1,108 +1,65 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import AnchorHelper, { scrollTo } from './anchorHelper';
export interface AnchorLinkProps {
href: string;
onClick?: (href: string, component: Element) => void;
active?: boolean;
prefixCls?: string;
children?: any;
href: string;
title: React.ReactNode;
offsetTop?: number;
bounds?: number;
target?: () => HTMLElement | Window;
affix?: boolean;
children?: any;
}
export default class AnchorLink extends React.Component<AnchorLinkProps, any> {
static __ANT_ANCHOR_LINK = true;
static contextTypes = {
anchorHelper: PropTypes.any,
static defaultProps = {
prefixCls: 'ant-anchor',
href: '#',
};
static defaultProps = {
href: '#',
prefixCls: 'ant-anchor',
static contextTypes = {
antAnchor: PropTypes.object,
};
context: {
anchorHelper: AnchorHelper;
antAnchor: any;
};
private _component: HTMLAnchorElement;
setActiveAnchor() {
const { bounds, offsetTop, href, affix } = this.props;
const { anchorHelper } = this.context;
const active = affix && anchorHelper && anchorHelper.getCurrentAnchor(offsetTop, bounds) === href;
if (active && anchorHelper) {
anchorHelper.setActiveAnchor(this._component);
}
}
componentDidMount() {
this.setActiveAnchor();
this.context.antAnchor.registerLink(this.props.href);
}
componentDidUpdate() {
this.setActiveAnchor();
componentWillUnmount() {
this.context.antAnchor.unregisterLink(this.props.href);
}
renderAnchorLink = (child: React.ReactChild) => {
// Here child is a ReactChild type
if (typeof child !== 'string' && typeof child !== 'number') {
const { href } = child.props;
if (href) {
this.context.anchorHelper.addLink(href);
return React.cloneElement(child, {
onClick: this.props.onClick,
prefixCls: this.props.prefixCls,
affix: this.props.affix,
offsetTop: this.props.offsetTop,
});
}
}
return child;
}
refsTo = (component: HTMLAnchorElement) => {
this._component = component;
}
scrollTo = (e: React.MouseEvent<HTMLAnchorElement>) => {
e.preventDefault();
const { onClick, href } = this.props;
const { anchorHelper } = this.context;
if (onClick) {
onClick(href, this._component);
} else {
const scrollToFn = anchorHelper ? anchorHelper.scrollTo : scrollTo;
scrollToFn(href, this.props.offsetTop);
}
handleClick = () => {
this.context.antAnchor.scrollTo(this.props.href);
}
render() {
const { prefixCls, href, children, title, bounds, offsetTop, affix } = this.props;
const { anchorHelper } = this.context;
const active = affix && anchorHelper && anchorHelper.getCurrentAnchor(offsetTop, bounds) === href;
const cls = classNames({
[`${prefixCls}-link`]: true,
const {
prefixCls,
href,
title,
children,
} = this.props;
const active = this.context.antAnchor.activeLink === href;
const wrapperClassName = classNames(`${prefixCls}-link`, {
[`${prefixCls}-link-active`]: active,
});
const titleClassName = classNames(`${prefixCls}-link-title`, {
[`${prefixCls}-link-title-active`]: active,
});
return (
<div className={cls}>
<div className={wrapperClassName}>
<a
ref={this.refsTo}
className={`${prefixCls}-link-title`}
onClick={this.scrollTo}
className={titleClassName}
href={href}
title={typeof title === 'string' ? title : ''}
onClick={this.handleClick}
>
{title}
</a>
{React.Children.map(children, this.renderAnchorLink)}
{children}
</div>
);
}

View File

@@ -15,7 +15,7 @@ exports[`renders ./components/anchor/demo/basic.md correctly 1`] = `
class="ant-anchor-ink"
>
<span
class="ant-anchor-ink-ball animated"
class="ant-anchor-ink-ball"
/>
</div>
<div
@@ -90,7 +90,7 @@ exports[`renders ./components/anchor/demo/fixed.md correctly 1`] = `
class="ant-anchor-ink"
>
<span
class="ant-anchor-ink-ball animated"
class="ant-anchor-ink-ball"
/>
</div>
<div

View File

@@ -1,129 +0,0 @@
import getScroll from '../_util/getScroll';
import getRequestAnimationFrame from '../_util/getRequestAnimationFrame';
export const reqAnimFrame = getRequestAnimationFrame();
export const easeInOutCubic = (t: number, b: number, c: number, d: number) => {
const cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
return cc / 2 * ((t -= 2) * t * t + 2) + b;
};
export function getDefaultTarget() {
return typeof window !== 'undefined' ?
window : null;
}
export function getOffsetTop(element: HTMLElement): number {
if (!element) {
return 0;
}
if (!element.getClientRects().length) {
return 0;
}
const rect = element.getBoundingClientRect();
if (rect.width || rect.height) {
const doc = element.ownerDocument;
const docElem = doc.documentElement;
return rect.top - docElem.clientTop;
}
return rect.top;
}
export type Section = {
top: number;
bottom: number;
section: any;
};
export function scrollTo(href: string, offsetTop = 0, target = getDefaultTarget, callback = () => { }) {
const scrollTop = getScroll(target(), true);
const targetElement = document.getElementById(href.substring(1));
if (!targetElement) {
return;
}
const eleOffsetTop = getOffsetTop(targetElement);
const targetScrollTop = scrollTop + eleOffsetTop - offsetTop;
const startTime = Date.now();
const frameFunc = () => {
const timestamp = Date.now();
const time = timestamp - startTime;
window.scrollTo(window.pageXOffset, easeInOutCubic(time, scrollTop, targetScrollTop, 450));
if (time < 450) {
reqAnimFrame(frameFunc);
} else {
callback();
}
};
reqAnimFrame(frameFunc);
history.pushState(null, '', href);
}
class AnchorHelper {
private links: Array<string>;
private currentAnchor: HTMLAnchorElement | null;
private _activeAnchor: string;
constructor() {
this.links = [];
this.currentAnchor = null;
this._activeAnchor = '';
}
addLink(link: string) {
if (this.links.indexOf(link) === -1) {
this.links.push(link);
}
}
getCurrentActiveAnchor(): HTMLAnchorElement | null {
return this.currentAnchor;
}
setActiveAnchor(component: HTMLAnchorElement) {
this.currentAnchor = component;
}
getCurrentAnchor(offsetTop: number = 0, bounds = 5) {
let activeAnchor = '';
if (typeof document === 'undefined') {
return activeAnchor;
}
const linksPositions = (this.links
.map(section => {
const target = document.getElementById(section.substring(1));
if (target && getOffsetTop(target) < offsetTop + bounds) {
const top = getOffsetTop(target);
if (top <= offsetTop + bounds) {
return {
section,
top,
bottom: top + target.clientHeight,
};
}
}
return null;
})
.filter(section => section !== null) as Array<Section>);
if (linksPositions.length) {
const maxSection = linksPositions.reduce((prev, curr) => curr.top > prev.top ? curr : prev);
return maxSection.section;
}
return '';
}
scrollTo(href: string, offsetTop: number | undefined, target = getDefaultTarget, callback = () => { }) {
scrollTo(href, offsetTop, target, callback);
}
}
export default AnchorHelper;

View File

@@ -1,146 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import Anchor from './Anchor';
import AnchorLink from './AnchorLink';
import Affix from '../affix';
import AnchorHelper, { getDefaultTarget } from './anchorHelper';
export interface AnchorProps {
target?: () => HTMLElement | Window;
children?: React.ReactNode;
prefixCls?: string;
offsetTop?: number;
bounds?: number;
className?: string;
style?: React.CSSProperties;
affix?: boolean;
showInkInFixed?: boolean;
}
export default class Anchor extends React.Component<AnchorProps, any> {
static Link = AnchorLink;
static defaultProps = {
prefixCls: 'ant-anchor',
affix: true,
showInkInFixed: false,
};
static childContextTypes = {
anchorHelper: PropTypes.any,
};
refs: {
ink?: any;
};
private scrollEvent: any;
private anchorHelper: AnchorHelper;
private _avoidInk: boolean;
constructor(props: AnchorProps) {
super(props);
this.state = {
activeAnchor: null,
animated: true,
};
this.anchorHelper = new AnchorHelper();
}
handleScroll = () => {
this.setState({
activeAnchor: this.anchorHelper.getCurrentAnchor(this.props.offsetTop, this.props.bounds),
});
}
getChildContext() {
return {
anchorHelper: this.anchorHelper,
};
}
componentDidMount() {
this.handleScroll();
this.updateInk();
this.scrollEvent = addEventListener((this.props.target || getDefaultTarget)(), 'scroll', this.handleScroll);
}
componentWillUnmount() {
if (this.scrollEvent) {
this.scrollEvent.remove();
}
}
componentDidUpdate() {
if (!this._avoidInk) {
this.updateInk();
}
}
updateInk = () => {
const activeAnchor = this.anchorHelper.getCurrentActiveAnchor();
if (activeAnchor) {
this.refs.ink.style.top = `${activeAnchor.offsetTop + activeAnchor.clientHeight / 2 - 4.5}px`;
}
}
clickAnchorLink = (href: string, component: HTMLElement) => {
this._avoidInk = true;
this.refs.ink.style.top = `${component.offsetTop + component.clientHeight / 2 - 4.5}px`;
this.anchorHelper.scrollTo(href, this.props.offsetTop, getDefaultTarget, () => {
this._avoidInk = false;
});
}
renderAnchorLink = (child: React.ReactElement<any>) => {
const { href } = child.props;
const { type } = child as any;
if (type.__ANT_ANCHOR_LINK && href) {
this.anchorHelper.addLink(href);
return React.cloneElement(child, {
onClick: this.clickAnchorLink,
prefixCls: this.props.prefixCls,
bounds: this.props.bounds,
affix: this.props.affix || this.props.showInkInFixed,
offsetTop: this.props.offsetTop,
});
}
return child;
}
render() {
const { prefixCls, offsetTop, style, className = '', affix, showInkInFixed } = this.props;
const { activeAnchor, animated } = this.state;
const inkClass = classNames({
[`${prefixCls}-ink-ball`]: true,
animated,
visible: !!activeAnchor,
});
const wrapperClass = classNames({
[`${prefixCls}-wrapper`]: true,
}, className);
const anchorClass = classNames(prefixCls, {
'fixed': !affix && !showInkInFixed,
});
const anchorContent = (
<div className={wrapperClass} style={style}>
<div className={anchorClass}>
<div className={`${prefixCls}-ink`} >
<span className={inkClass} ref="ink" />
</div>
{React.Children.toArray(this.props.children).map(this.renderAnchorLink)}
</div>
</div>
);
return !affix ? anchorContent : (
<Affix offsetTop={offsetTop}>
{anchorContent}
</Affix>
);
}
}
Anchor.Link = AnchorLink;
export default Anchor;

View File

@@ -1,57 +1,50 @@
@import "../../style/themes/default";
.@{ant-prefix} {
&-anchor {
position: relative;
&-wrapper {
background-color: @component-background;
}
.@{ant-prefix}-anchor {
position: relative;
&-wrapper {
background-color: @component-background;
}
&-ink {
position: absolute;
&-ink {
position: absolute;
height: 100%;
left: 0;
top: 0;
&:before {
content: ' ';
position: relative;
width: 2px;
height: 100%;
left: 0;
top: 0;
&:before {
content: ' ';
position: relative;
width: 2px;
height: 100%;
display: block;
background-color: @border-color-split;
margin: 0 auto;
}
&-ball {
display: none;
position: absolute;
width: 9px;
height: 9px;
border-radius: 9px;
border: 3px solid @primary-color;
background-color: @component-background;
left: 50%;
transition: top .3s ease-in-out;
transform: translateX(-50%);
&.visible {
display: inline-block;
}
}
display: block;
background-color: @border-color-split;
margin: 0 auto;
}
&.fixed &-ink &-ink-ball {
&-ball {
display: none;
position: absolute;
width: 9px;
height: 9px;
border-radius: 9px;
border: 3px solid @primary-color;
background-color: @component-background;
left: 50%;
transition: top .3s ease-in-out;
transform: translateX(-50%);
&.visible {
display: inline-block;
}
}
}
&-anchor-link {
&.fixed &-ink &-ink-ball {
display: none;
}
&-link {
padding: 8px 0 8px 18px;
line-height: 1;
& & {
padding-top: 6px;
padding-bottom: 6px;
}
&-title {
display: block;
position: relative;
@@ -61,18 +54,19 @@
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 8px;
}
&-title:only-child {
margin-bottom: 0;
&:only-child {
margin-bottom: 0;
}
}
&-active > &-title {
color: @primary-color;
}
}
& > & {
font-size: @font-size-base;
}
&-link &-link {
padding-top: 6px;
padding-bottom: 6px;
}
}

View File

@@ -10,10 +10,17 @@ export default class InputElement extends React.Component<any, any> {
blur = () => {
this.ele.blur ? this.ele.blur() : (findDOMNode(this.ele) as HTMLInputElement).blur();
}
saveRef = (ele: HTMLInputElement) => {
this.ele = ele;
const childRef = this.props.children.ref;
if (typeof childRef === 'function') {
childRef(ele);
}
}
render() {
return React.cloneElement(this.props.children, {
...this.props,
ref: ele => this.ele = (ele as HTMLInputElement),
ref: this.saveRef,
}, null);
}
}

View File

@@ -85,7 +85,7 @@ exports[`renders ./components/auto-complete/demo/basic.md correctly 1`] = `
class="ant-select-search__field__wrap"
>
<input
class="ant-input ant-input ant-select-search__field"
class="ant-input ant-select-search__field"
type="text"
value=""
/>
@@ -144,10 +144,10 @@ exports[`renders ./components/auto-complete/demo/certain-category.md correctly 1
class="ant-select-search__field__wrap"
>
<span
class="ant-input-affix-wrapper"
class="ant-select-search__field ant-input-affix-wrapper"
>
<input
class="ant-input ant-input ant-select-search__field"
class="ant-input"
type="text"
value=""
/>
@@ -211,7 +211,7 @@ exports[`renders ./components/auto-complete/demo/non-case-sensitive.md correctly
class="ant-select-search__field__wrap"
>
<input
class="ant-input ant-input ant-select-search__field"
class="ant-input ant-select-search__field"
type="text"
value=""
/>
@@ -266,7 +266,7 @@ exports[`renders ./components/auto-complete/demo/options.md correctly 1`] = `
class="ant-select-search__field__wrap"
>
<input
class="ant-input ant-input ant-select-search__field"
class="ant-input ant-select-search__field"
type="text"
value=""
/>
@@ -325,10 +325,10 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly
class="ant-select-search__field__wrap"
>
<span
class="ant-input-affix-wrapper"
class="ant-select-search__field ant-input-affix-wrapper"
>
<input
class="ant-input ant-input ant-select-search__field"
class="ant-input"
type="text"
value=""
/>
@@ -336,7 +336,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly
class="ant-input-suffix"
>
<button
class="ant-btn ant-btn-primary ant-btn-lg search-btn"
class="ant-btn search-btn ant-btn-primary ant-btn-lg"
type="button"
>
<i

View File

@@ -17,4 +17,14 @@ describe('AutoComplete with Custom Input Element Render', () => {
// should not filter data source defaultly
expect(dropdownWrapper.find('MenuItem').length).toBe(3);
});
it('child.ref should work', () => {
const mockRef = jest.fn();
mount(
<AutoComplete dataSource={[]}>
<input ref={mockRef} />
</AutoComplete>
);
expect(mockRef).toHaveBeenCalled();
});
});

View File

@@ -14,7 +14,8 @@ title:
Customize Input Component
````jsx
import { AutoComplete } from 'antd';
import { AutoComplete, Input } from 'antd';
const { TextArea } = Input;
function onSelect(value) {
console.log('onSelect', value);
@@ -49,7 +50,7 @@ class Complete extends React.Component {
onSearch={this.handleSearch}
placeholder="input here"
>
<textarea onKeyPress={this.handleKeyPress} style={{ height: 50 }} />
<TextArea onKeyPress={this.handleKeyPress} style={{ height: 50 }} />
</AutoComplete>
);
}

View File

@@ -34,3 +34,4 @@ const dataSource = ['12345', '23456', '34567'];
| children (for customize input element) | customize input element | HTMLInputElement / HTMLTextAreaElement / React.ReactElement<InputProps> | `<Input />` |
| optionLabelProp | Which prop value of option will render as content of select. | string | `children` |
| 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 |
| backfill | backfill selected item the input when using keyboard | boolean | false |

View File

@@ -5,7 +5,7 @@ import Select, { AbstractSelectProps, SelectValue, OptionProps, OptGroupProps }
import Input from '../input';
import InputElement from './InputElement';
export interface DataSourceItemObject { value: string; text: string; };
export interface DataSourceItemObject { value: string; text: string; }
export type DataSourceItemType = string | DataSourceItemObject;
export interface InputProps {
@@ -50,15 +50,9 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
getInputElement = () => {
const { children } = this.props;
const element = children && React.isValidElement(children) && children.type !== Option ?
React.Children.only(this.props.children) :
<Input/>;
React.Children.only(this.props.children) : <Input />;
return (
<InputElement
{...element.props}
className={classNames('ant-input', element.props.className)}
>
{element}
</InputElement>
<InputElement>{element}</InputElement>
);
}

View File

@@ -35,3 +35,4 @@ const dataSource = ['12345', '23456', '34567'];
| children (自定义输入框) | 自定义输入框 | HTMLInputElement / HTMLTextAreaElement / React.ReactElement<InputProps> | `<Input />` |
| optionLabelProp | 回填到选择框的 Option 的属性值,默认是 Option 的子元素。比如在子元素需要高亮效果时,此值可以设为 `value`。 | string | `children` |
| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`。 | boolean or function(inputValue, option) | true |
| backfill | 使用键盘选择选项的时候把选中项回填到输入框中 | boolean | false |

View File

@@ -16,11 +16,11 @@
margin-left: 0;
margin-right: 0;
height: 100%;
line-height: @input-height-base;
}
&__placeholder {
margin-left: 8px;
margin-right: 8px;
top: @input-height-base / 2;
margin-left: (@input-padding-horizontal + 1px);
margin-right: (@input-padding-horizontal + 1px);
}
}
}
@@ -33,11 +33,17 @@
.@{input-prefix-cls} {
background: transparent;
border-width: @border-width-base;
line-height: @line-height-base;
&:focus,
&:hover {
.hover;
}
}
&-lg {
.@{select-prefix-cls}-selection__placeholder {
top: @input-height-lg / 2;
.@{select-prefix-cls}-selection__rendered {
line-height: @input-height-lg;
}
.@{input-prefix-cls} {
.input-lg();
@@ -45,20 +51,12 @@
}
&-sm {
.@{select-prefix-cls}-selection__placeholder {
top: @input-height-sm / 2;
.@{select-prefix-cls}-selection__rendered {
line-height: @input-height-sm;
}
.@{input-prefix-cls} {
.input-sm();
}
}
.@{input-prefix-cls} {
border-width: @border-width-base;
&:focus,
&:hover {
.hover;
}
}
}
}

View File

@@ -0,0 +1,11 @@
import React from 'react';
import { mount } from 'enzyme';
import Avatar from '..';
describe('Avatar Render', () => {
it('Render long string correctly', () => {
const wrapper = mount(<Avatar>TestString</Avatar>);
const children = wrapper.find('.ant-avatar-string');
expect(children.length).toBe(1);
});
});

View File

@@ -0,0 +1,329 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/avatar/demo/badge.md correctly 1`] = `
<div>
<span
style="margin-right:24px;"
>
<span
class="ant-badge"
>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="1"
>
<span
class="ant-scroll-number-only"
style="transition:none;-ms-transform:translateY(-1100%);-webkit-transform:translateY(-1100%);transform:translateY(-1100%);"
>
<p
class=""
>
0
</p>
<p
class=""
>
1
</p>
<p
class=""
>
2
</p>
<p
class=""
>
3
</p>
<p
class=""
>
4
</p>
<p
class=""
>
5
</p>
<p
class=""
>
6
</p>
<p
class=""
>
7
</p>
<p
class=""
>
8
</p>
<p
class=""
>
9
</p>
<p
class=""
>
0
</p>
<p
class="current"
>
1
</p>
<p
class=""
>
2
</p>
<p
class=""
>
3
</p>
<p
class=""
>
4
</p>
<p
class=""
>
5
</p>
<p
class=""
>
6
</p>
<p
class=""
>
7
</p>
<p
class=""
>
8
</p>
<p
class=""
>
9
</p>
<p
class=""
>
0
</p>
<p
class=""
>
1
</p>
<p
class=""
>
2
</p>
<p
class=""
>
3
</p>
<p
class=""
>
4
</p>
<p
class=""
>
5
</p>
<p
class=""
>
6
</p>
<p
class=""
>
7
</p>
<p
class=""
>
8
</p>
<p
class=""
>
9
</p>
</span>
</sup>
</span>
</span>
<span>
<span
class="ant-badge"
>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<sup
class="ant-scroll-number ant-badge-dot"
data-show="true"
/>
</span>
</span>
</div>
`;
exports[`renders ./components/avatar/demo/basic.md correctly 1`] = `
<div>
<div>
<span
class="ant-avatar ant-avatar-lg ant-avatar-circle ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
</div>
<div>
<span
class="ant-avatar ant-avatar-lg ant-avatar-square ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<span
class="ant-avatar ant-avatar-sm ant-avatar-square ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
</div>
</div>
`;
exports[`renders ./components/avatar/demo/dynamic.md correctly 1`] = `
<div>
<span
class="ant-avatar ant-avatar-lg ant-avatar-circle"
style="background-color:#f56a00;"
>
<span
class="ant-avatar-string"
>
U
</span>
</span>
<button
class="ant-btn ant-btn-sm"
style="margin-left:16px;"
type="button"
>
<span>
Change
</span>
</button>
</div>
`;
exports[`renders ./components/avatar/demo/type.md correctly 1`] = `
<div>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
>
<i
class="anticon anticon-user"
/>
</span>
<span
class="ant-avatar ant-avatar-circle"
>
<span
class="ant-avatar-string"
>
U
</span>
</span>
<span
class="ant-avatar ant-avatar-circle"
>
<span
class="ant-avatar-string"
>
USER
</span>
</span>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
>
<img
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
/>
</span>
<span
class="ant-avatar ant-avatar-circle"
style="color:#f56a00;background-color:#fde3cf;"
>
<span
class="ant-avatar-string"
>
U
</span>
</span>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
style="background-color:#87d068;"
>
<i
class="anticon anticon-user"
/>
</span>
</div>
`;

View File

@@ -0,0 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('avatar');

View File

@@ -0,0 +1,29 @@
---
order: 3
title:
zh-CN: 带徽标的头像
en-US: With Badge
---
## zh-CN
通常用于消息提示。
## en-US
Usually used for messages remind.
````jsx
import { Avatar, Badge } from 'antd';
ReactDOM.render(
<div>
<span style={{ marginRight: 24 }}>
<Badge count={1}><Avatar shape="square" icon="user" /></Badge>
</span>
<span>
<Badge dot><Avatar shape="square" icon="user" /></Badge>
</span>
</div>
, mountNode);
````

View File

@@ -0,0 +1,40 @@
---
order: 0
title:
zh-CN: 基本
en-US: Basic
---
## zh-CN
头像有三种尺寸,两种形状可选。
## en-US
Three sizes and two shapes are available.
````jsx
import { Avatar } from 'antd';
ReactDOM.render(
<div>
<div>
<Avatar size="large" icon="user" />
<Avatar icon="user" />
<Avatar size="small" icon="user" />
</div>
<div>
<Avatar shape="square" size="large" icon="user" />
<Avatar shape="square" icon="user" />
<Avatar shape="square" size="small" icon="user" />
</div>
</div>
, mountNode);
````
<style>
#components-avatar-demo-basic .ant-avatar {
margin-top: 16px;
margin-right: 16px;
}
</style>

View File

@@ -0,0 +1,49 @@
---
order: 2
title:
zh-CN: 自动调整字符大小
en-US: Autoset Font Size
---
## zh-CN
对于字符型的头像,当字符串较长时,字体大小可以根据头像宽度自动调整。
## en-US
For letter type Avatar, when the letters are too long to display, the font size can be automatically adjusted according to the width of the Avatar.
````jsx
import { Avatar, Button } from 'antd';
const UserList = ['U', 'Lucy', 'Tom', 'Edward'];
const colorList = ['#f56a00', '#7265e6', '#ffbf00', '#00a2ae'];
class Autoset extends React.Component {
constructor(props) {
super(props);
this.state = {
user: UserList[0],
color: colorList[0],
};
}
changeUser = () => {
const index = UserList.indexOf(this.state.user);
this.setState({
user: index < UserList.length - 1 ? UserList[index + 1] : UserList[0],
color: index < colorList.length - 1 ? colorList[index + 1] : colorList[0],
});
}
render() {
return (
<div>
<Avatar style={{ backgroundColor: this.state.color }} size="large">{this.state.user}</Avatar>
<Button size="small" style={{ marginLeft: 16 }} onClick={this.changeUser}>Change</Button>
</div>
);
}
}
ReactDOM.render(<Autoset />
, mountNode);
````

View File

@@ -0,0 +1,36 @@
---
order: 1
title:
zh-CN: 类型
en-US: Type
---
## zh-CN
支持三种类型图片、Icon 以及字符,其中 Icon 和字符型可以自定义图标颜色及背景色。
## en-US
Image, Icon and letter are supported, and the latter two kinds avatar can have custom colors and background colors.
````jsx
import { Avatar } from 'antd';
ReactDOM.render(
<div>
<Avatar icon="user" />
<Avatar>U</Avatar>
<Avatar>USER</Avatar>
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
<Avatar style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>U</Avatar>
<Avatar style={{ backgroundColor: '#87d068' }} icon="user" />
</div>
, mountNode);
````
<style>
#components-avatar-demo-type .ant-avatar {
margin-top: 16px;
margin-right: 16px;
}
</style>

View File

@@ -0,0 +1,16 @@
---
category: Components
type: Data Display
title: Avatar
---
Avatars can be used to represent people or objects. It supports images, `Icon`s, or letters.
## API
| Property | Description | Type | Default |
|----------- |--------------------------------------------------------- | ---------- |-------|
| shape | the shape of avatar | `circle` \| `square` | `circle` |
| size | the size of the avatar | `large` \| `small` \| `default` | `default` |
| src | the address of the image for an image avatar | string | - |
| icon | the `Icon` type for an icon avatar, see `Icon` Component | string | - |

137
components/avatar/index.tsx Normal file
View File

@@ -0,0 +1,137 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Icon from '../icon';
import classNames from 'classnames';
export interface AvatarProps {
/** Shape of avatar, options:`circle`, `square` */
shape?: 'circle' | 'square';
/** Size of avatar, options:`large`, `small`, `default` */
size?: 'large' | 'small' | 'default';
/** Src of image avatar */
src?: string;
/** Type of the Icon to be used in avatar */
icon?: string;
style?: React.CSSProperties;
prefixCls?: string;
className?: string;
children?: any;
}
export interface AvatarState {
scale: number;
isImgExist: boolean;
}
export default class Avatar extends React.Component<AvatarProps, AvatarState> {
static defaultProps = {
prefixCls: 'ant-avatar',
shape: 'circle',
size: 'default',
};
private avatarChildren: any;
constructor(props: AvatarProps) {
super(props);
this.state = {
scale: 1,
isImgExist: true,
};
}
componentDidMount() {
this.setScale();
}
componentDidUpdate(prevProps: AvatarProps, prevState: AvatarState) {
if (prevProps.children !== this.props.children
|| (prevState.scale !== this.state.scale && this.state.scale === 1)) {
this.setScale();
}
}
setScale = () => {
const childrenNode = this.avatarChildren;
if (childrenNode) {
const childrenWidth = childrenNode.offsetWidth;
const avatarWidth = ReactDOM.findDOMNode(this).getBoundingClientRect().width;
// add 4px gap for each side to get better performance
if (avatarWidth - 8 < childrenWidth) {
this.setState({
scale: (avatarWidth - 8) / childrenWidth,
});
} else {
this.setState({
scale: 1,
});
}
}
}
handleImgLoadError = () => this.setState({ isImgExist: false });
render() {
const {
prefixCls, shape, size, src, icon, className, ...others,
} = this.props;
const sizeCls = classNames({
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small',
});
const classString = classNames(prefixCls, className, sizeCls, {
[`${prefixCls}-${shape}`]: shape,
[`${prefixCls}-image`]: src,
[`${prefixCls}-icon`]: icon,
});
let children = this.props.children;
if (src && this.state.isImgExist) {
children = (
<img
src={src}
onError={this.handleImgLoadError}
/>
);
} else if (icon) {
children = <Icon type={icon} />;
} else {
const childrenNode = this.avatarChildren;
if (childrenNode || this.state.scale !== 1) {
const childrenStyle: React.CSSProperties = {
msTransform: `scale(${this.state.scale})`,
WebkitTransform: `scale(${this.state.scale})`,
transform: `scale(${this.state.scale})`,
position: 'absolute',
display: 'inline-block',
left: `calc(50% - ${Math.round(childrenNode.offsetWidth / 2)}px)`,
};
children = (
<span
className={`${prefixCls}-string`}
ref={span => this.avatarChildren = span}
style={childrenStyle}
>
{children}
</span>
);
} else {
children = (
<span
className={`${prefixCls}-string`}
ref={span => this.avatarChildren = span}
>
{children}
</span>
);
}
}
return (
<span {...others} className={classString}>
{children}
</span>
);
}
}

View File

@@ -0,0 +1,17 @@
---
category: Components
subtitle: 头像
type: Data Display
title: Avatar
---
用来代表用户或事物,支持图片、图标或字符展示。
## API
| 参数 | 说明 | 类型 | 默认值 |
|----------- |--------------------------------------------------------- | ---------- | ------- |
| shape | 指定头像的形状 | Enum{ 'circle', 'square' } | `circle` |
| size | 设置头像的大小 | Enum{ 'large', 'small', 'default' } | `default` |
| src | 图片类头像的资源地址 | string | - |
| icon | 设置头像的图标类型,参考 `Icon` 组件 | string | - |

View File

@@ -0,0 +1,47 @@
@import "../../style/themes/default";
@avatar-prefix-cls: ~"@{ant-prefix}-avatar";
.@{avatar-prefix-cls} {
display: inline-block;
text-align: center;
background: @avatar-bg;
color: @avatar-color;
white-space: nowrap;
position: relative;
overflow: hidden;
.avatar-size(@avatar-size-base, @avatar-font-size-base);
&-lg {
.avatar-size(@avatar-size-lg, @avatar-font-size-lg);
}
&-sm {
.avatar-size(@avatar-size-sm, @avatar-font-size-sm);
}
&-square {
border-radius: @avatar-border-radius;
}
& > img {
width: 100%;
height: 100%;
}
}
.avatar-size(@size, @font-size) {
width: @size;
height: @size;
line-height: @size;
border-radius: @size / 2;
& > * {
line-height: @size;
}
&.@{avatar-prefix-cls}-icon {
font-size: @font-size;
}
}

View File

@@ -0,0 +1,2 @@
import '../../style/index.less';
import './index.less';

View File

@@ -0,0 +1,18 @@
import React from 'react';
import { mount } from 'enzyme';
import BackTop from '..';
const delay = timeout => new Promise(resolve => setTimeout(resolve, timeout));
describe('BackTop', () => {
it('should scroll to top after click it', async () => {
const wrapper = mount(<BackTop visibilityHeight={-1} />);
document.documentElement.scrollTop = 400;
// trigger scroll manually
wrapper.node.handleScroll();
await delay(500);
wrapper.find('.ant-back-top').simulate('click');
await delay(500);
expect(Math.round(document.documentElement.scrollTop)).toBe(0);
});
});

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Navigation
type: Other
title: BackTop
---

View File

@@ -9,7 +9,7 @@ import getRequestAnimationFrame from '../_util/getRequestAnimationFrame';
const reqAnimFrame = getRequestAnimationFrame();
const easeInOutCubic = (t, b, c, d) => {
const easeInOutCubic = (t: number, b: number, c: number, d: number) => {
const cc = c - b;
t /= d / 2;
if (t < 1) {
@@ -19,11 +19,10 @@ const easeInOutCubic = (t, b, c, d) => {
}
};
function noop() {}
function noop() { }
function getDefaultTarget() {
return typeof window !== 'undefined' ?
window : null;
return window;
}
export interface BackTopProps {
@@ -42,7 +41,7 @@ export default class BackTop extends React.Component<BackTopProps, any> {
scrollEvent: any;
constructor(props) {
constructor(props: BackTopProps) {
super(props);
this.state = {
visible: false,
@@ -50,14 +49,15 @@ export default class BackTop extends React.Component<BackTopProps, any> {
}
getCurrentScrollTop = () => {
const targetNode = (this.props.target || getDefaultTarget)();
const getTarget = this.props.target || getDefaultTarget;
const targetNode = getTarget();
if (targetNode === window) {
return window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
}
return (targetNode as HTMLElement).scrollTop;
}
scrollToTop = (e) => {
scrollToTop = (e: React.MouseEvent<HTMLDivElement>) => {
const scrollTop = this.getCurrentScrollTop();
const startTime = Date.now();
const frameFunc = () => {
@@ -72,8 +72,9 @@ export default class BackTop extends React.Component<BackTopProps, any> {
(this.props.onClick || noop)(e);
}
setScrollTop(value) {
const targetNode = (this.props.target || getDefaultTarget)();
setScrollTop(value: number) {
const getTarget = this.props.target || getDefaultTarget;
const targetNode = getTarget();
if (targetNode === window) {
document.body.scrollTop = value;
document.documentElement.scrollTop = value;
@@ -91,8 +92,9 @@ export default class BackTop extends React.Component<BackTopProps, any> {
}
componentDidMount() {
const getTarget = this.props.target || getDefaultTarget;
this.scrollEvent = addEventListener(getTarget(), 'scroll', this.handleScroll);
this.handleScroll();
this.scrollEvent = addEventListener((this.props.target || getDefaultTarget)(), 'scroll', this.handleScroll);
}
componentWillUnmount() {

View File

@@ -1,6 +1,6 @@
---
category: Components
type: Navigation
type: Other
subtitle: 回到顶部
title: BackTop
---

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { createElement, Component } from 'react';
import assign from 'object-assign';
import omit from 'omit.js';
import classNames from 'classnames';
function getNumberArray(num) {
return num ?
@@ -18,6 +18,7 @@ export interface ScrollNumberProps {
component?: string;
onAnimated?: Function;
style?: React.CSSProperties;
title?: string | number;
}
export default class ScrollNumber extends Component<ScrollNumberProps, any> {
@@ -119,24 +120,28 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
}
render() {
const { prefixCls, className, style, title, component = 'sup' } = this.props;
// fix https://fb.me/react-unknown-prop
const props = assign({}, omit(this.props, [
const restProps = omit(this.props, [
'count',
'onAnimated',
'component',
'prefixCls',
]), {
className: `${this.props.prefixCls} ${this.props.className}`,
});
]);
const newProps = {
...restProps,
className: classNames(prefixCls, className),
title: title as string,
};
// allow specify the border
// mock border-color by box-shadow for compatible with old usage:
// <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
if (props.style && props.style.borderColor) {
props.style.boxShadow = `0 0 0 1px ${props.style.borderColor} inset`;
if (style && style.borderColor) {
newProps.style.boxShadow = `0 0 0 1px ${style.borderColor} inset`;
}
return createElement(
this.props.component || 'sup',
props,
component as any,
newProps,
this.renderNumberElement(),
);
}

View File

@@ -4,7 +4,6 @@ exports[`renders ./components/badge/demo/basic.md correctly 1`] = `
<div>
<span
class="ant-badge"
title="5"
>
<a
class="head-example"
@@ -13,6 +12,7 @@ exports[`renders ./components/badge/demo/basic.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="5"
>
<span
class="ant-scroll-number-only"
@@ -173,7 +173,6 @@ exports[`renders ./components/badge/demo/basic.md correctly 1`] = `
</span>
<span
class="ant-badge"
title="0"
>
<a
class="head-example"
@@ -182,6 +181,7 @@ exports[`renders ./components/badge/demo/basic.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="0"
>
0
</sup>
@@ -194,7 +194,6 @@ exports[`renders ./components/badge/demo/change.md correctly 1`] = `
<div>
<span
class="ant-badge"
title="5"
>
<a
class="head-example"
@@ -203,6 +202,7 @@ exports[`renders ./components/badge/demo/change.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="5"
>
<span
class="ant-scroll-number-only"
@@ -398,7 +398,8 @@ exports[`renders ./components/badge/demo/change.md correctly 1`] = `
/>
</span>
<span
class="ant-switch"
checked=""
class="ant-switch ant-switch-checked"
tabindex="0"
>
<span
@@ -444,7 +445,6 @@ exports[`renders ./components/badge/demo/link.md correctly 1`] = `
>
<span
class="ant-badge"
title="5"
>
<span
class="head-example"
@@ -452,6 +452,7 @@ exports[`renders ./components/badge/demo/link.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="5"
>
<span
class="ant-scroll-number-only"
@@ -617,11 +618,11 @@ exports[`renders ./components/badge/demo/no-wrapper.md correctly 1`] = `
<div>
<span
class="ant-badge ant-badge-not-a-wrapper"
title="25"
>
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="25"
>
<span
class="ant-scroll-number-only"
@@ -937,12 +938,12 @@ exports[`renders ./components/badge/demo/no-wrapper.md correctly 1`] = `
</span>
<span
class="ant-badge ant-badge-not-a-wrapper"
title="4"
>
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
style="background-color:#fff;color:#999;box-shadow:0 0 0 1px #d9d9d9 inset;"
title="4"
>
<span
class="ant-scroll-number-only"
@@ -1103,12 +1104,12 @@ exports[`renders ./components/badge/demo/no-wrapper.md correctly 1`] = `
</span>
<span
class="ant-badge ant-badge-not-a-wrapper"
title="109"
>
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
style="background-color:#87d068;"
title="109"
>
99+
</sup>
@@ -1120,7 +1121,6 @@ exports[`renders ./components/badge/demo/overflow.md correctly 1`] = `
<div>
<span
class="ant-badge"
title="99"
>
<a
class="head-example"
@@ -1129,6 +1129,7 @@ exports[`renders ./components/badge/demo/overflow.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="99"
>
<span
class="ant-scroll-number-only"
@@ -1444,7 +1445,6 @@ exports[`renders ./components/badge/demo/overflow.md correctly 1`] = `
</span>
<span
class="ant-badge"
title="100"
>
<a
class="head-example"
@@ -1453,13 +1453,13 @@ exports[`renders ./components/badge/demo/overflow.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="100"
>
99+
</sup>
</span>
<span
class="ant-badge"
title="99"
>
<a
class="head-example"
@@ -1468,13 +1468,13 @@ exports[`renders ./components/badge/demo/overflow.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="99"
>
10+
</sup>
</span>
<span
class="ant-badge"
title="1000"
>
<a
class="head-example"
@@ -1483,6 +1483,7 @@ exports[`renders ./components/badge/demo/overflow.md correctly 1`] = `
<sup
class="ant-scroll-number ant-badge-count"
data-show="true"
title="1000"
>
999+
</sup>

View File

@@ -60,7 +60,7 @@ class Demo extends React.Component {
<Badge dot={this.state.show}>
<a href="#" className="head-example" />
</Badge>
<Switch onChange={this.onChange} />
<Switch onChange={this.onChange} checked={this.state.show} />
</div>
</div>
);

View File

@@ -4,11 +4,11 @@ type: Data Display
title: Badge
---
Small numerical value or status descriptors for UI elements.
Small numerical value or status descriptor for UI elements.
## When To Use
Badge normally appears in proximity to notification or head picture with eye-catching appeal, typically displaying unread messages count.
Badge normally appears in proximity to notifications or user avatars with eye-catching appeal, typically displaying unread messages count.
## API
@@ -27,7 +27,7 @@ Badge normally appears in proximity to notification or head picture with eye-cat
|----------------|-------------------------|------------|---------|
| count | Number to show in badge | number | |
| overflowCount | Max count to show | number | 99 |
| showZero | Whether to show badge when `count` is zero | boolean | false |
| dot | Whether to show red dot without number | boolean | false |
| status | Set Badge as a status dot | Enum{ 'success', 'processing, 'default', 'error', 'warning' } | '' |
| text | If `status` is set, `text` is to set the text of status dot | string | '' |
| showZero | Whether to show badge when `count` is zero | boolean | `false` |
| dot | Whether to display a red dot instead of `count` | boolean | `false` |
| status | Set Badge as a status dot | `success` \| `processing` \| `default` \| `error` \| `warning` | `''` |
| text | If `status` is set, `text` sets the display text of the status `dot` | string | `''` |

View File

@@ -7,7 +7,7 @@ import warning from '../_util/warning';
export interface BadgeProps {
/** Number to show in badge */
count: number | string;
count?: number | string;
showZero?: boolean;
/** Max count to show */
overflowCount?: number;
@@ -54,7 +54,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
...restProps,
} = this.props;
const isDot = dot || status;
let displayCount = count > (overflowCount as number) ? `${overflowCount}+` : count;
let displayCount = (count as number) > (overflowCount as number) ? `${overflowCount}+` : count;
// dot mode don't need count
if (isDot) {
displayCount = '';
@@ -95,6 +95,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
data-show={!hidden}
className={scrollNumberCls}
count={displayCount}
title={count}
style={style}
/>
);
@@ -104,7 +105,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
);
return (
<span {...restProps} className={badgeCls} title={count as string}>
<span {...restProps} className={badgeCls}>
{children}
<Animate
component=""

View File

@@ -21,11 +21,10 @@
line-height: @badge-height;
text-align: center;
padding: 0 6px;
font-size: @font-size-base;
font-size: @badge-font-size;
white-space: nowrap;
transform-origin: -10% center;
font-family: tahoma;
box-shadow: 0 0 0 1px #fff;
a,
a:hover {
color: #fff;
@@ -104,7 +103,7 @@
top: auto;
display: block;
position: relative;
transform: none!important;
transform: none !important;
}
}

View File

@@ -13,7 +13,7 @@ export interface BreadcrumbProps {
itemRender?: (route: any, params: any, routes: Array<any>, paths: Array<string>) => React.ReactNode;
style?: React.CSSProperties;
className?: string;
};
}
function getBreadcrumbName(route, params) {
if (!route.breadcrumbName) {
@@ -57,7 +57,7 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
warning(
!('linkRender' in props || 'nameRender' in props),
'`linkRender` and `nameRender` are removed, please use `itemRender` instead, ' +
'see: http://u.ant.design/item-render.',
'see: https://u.ant.design/item-render.',
);
}

View File

@@ -14,7 +14,7 @@ describe('Breadcrumb', () => {
});
// https://github.com/airbnb/enzyme/issues/875
xit('warns on non-Breadcrumb.Item children', () => {
it('warns on non-Breadcrumb.Item children', () => {
const MyCom = () => <div>foo</div>;
mount(
<Breadcrumb>

View File

@@ -117,6 +117,45 @@ exports[`renders ./components/breadcrumb/demo/router.md correctly 1`] = `
</div>
`;
exports[`renders ./components/breadcrumb/demo/router-4.md correctly 1`] = `
<div
class="demo"
>
<div
class="demo-nav"
>
<a
href="#/"
>
Home
</a>
<a
href="#/apps"
>
Application List
</a>
</div>
Home Page
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true"
style="margin:16px 0;"
>
<span
class="ant-alert-message"
>
Click the navigation above to switch:
</span>
<span
class="ant-alert-description"
/>
</div>
<div
class="ant-breadcrumb"
/>
</div>
`;
exports[`renders ./components/breadcrumb/demo/separator.md correctly 1`] = `
<div
class="ant-breadcrumb"

View File

@@ -2,7 +2,7 @@ import { render } from 'enzyme';
import demoTest from '../../../tests/shared/demoTest';
import routerDemo from '../demo/router.md';
demoTest('breadcrumb', { skip: ['router.md'] });
demoTest('breadcrumb', { skip: ['router.md', 'router-4.md'] });
const testMethod = typeof window !== 'undefined' ? test : test.skip;
testMethod('renders ./components/breadcrumb/demo/router.md correctly', () => {

View File

@@ -0,0 +1,100 @@
---
order: 3
iframe: 200
reactRouter: react-router-dom
title:
zh-CN: 其它路由
en-US: Other Router Integration
---
## zh-CN
`react-router@4`,或其他路由进行结合使用。
## en-US
Used together with `react-router@4` or other router.
````jsx
import { HashRouter as Router, Route, Switch, Link, withRouter } from 'react-router-dom';
import { Breadcrumb, Alert } from 'antd';
const Apps = () => (
<ul className="app-list">
<li>
<Link to="/apps/1">Application1</Link><Link to="/apps/1/detail">Detail</Link>
</li>
<li>
<Link to="/apps/2">Application2</Link><Link to="/apps/2/detail">Detail</Link>
</li>
</ul>
);
const breadcrumbNameMap = {
'/apps': 'Application List',
'/apps/1': 'Application1',
'/apps/2': 'Application2',
'/apps/1/detail': 'Detail',
'/apps/2/detail': 'Detail',
};
const Home = withRouter((props) => {
const { location } = props;
const pathSnippets = location.pathname.split('/').filter(i => i);
const extraBreadcrumbItems = pathSnippets.map((_, index) => {
const url = `/${pathSnippets.slice(0, index + 1).join('/')}`;
return (
<Breadcrumb.Item key={url}>
<Link to={url}>
{breadcrumbNameMap[url]}
</Link>
</Breadcrumb.Item>
);
});
const breadcrumbItems = [(
<Breadcrumb.Item key="home">
<Link to="/">Home</Link>
</Breadcrumb.Item>
)].concat(extraBreadcrumbItems);
return (
<div className="demo">
<div className="demo-nav">
<Link to="/">Home</Link>
<Link to="/apps">Application List</Link>
</div>
<Switch>
<Route path="/apps" component={Apps} />
<Route render={() => <span>Home Page</span>} />
</Switch>
<Alert style={{ margin: '16px 0' }} message="Click the navigation above to switch:" />
<Breadcrumb>
{breadcrumbItems}
</Breadcrumb>
</div>
);
});
ReactDOM.render(
<Router>
<Home />
</Router>
, mountNode);
````
````css
.demo {
margin: 16px;
}
.demo-nav {
height: 30px;
line-height: 30px;
margin-bottom: 16px;
background: #f8f8f8;
}
.demo-nav a {
line-height: 30px;
padding: 0 8px;
}
.app-list {
margin-top: 16px;
}
````

View File

@@ -1,18 +1,19 @@
---
order: 2
iframe: 200
reactRouter: react-router
title:
zh-CN: 路由
zh-CN: react-router
en-US: React Router Integration
---
## zh-CN
`react-router@2+` 进行结合使用。
`react-router@2` `react-router@3` 进行结合使用。
## en-US
Used together with `react-router@2+`.
Used together with `react-router@2` `react-router@3`.
````jsx
import { Router, Route, Link, hashHistory } from 'react-router';

View File

@@ -1,5 +1,5 @@
---
order: 3
order: 4
title:
zh-CN: 分隔符
en-US: Configuring the Separator

View File

@@ -18,15 +18,15 @@ A breadcrumb displays the current location within a hierarchy. It allows going b
| Property | Description | Type | Optional | Default |
|-----------|-----------------------------------|-----------------|---------|--------|
| routes | The routing stack information of router | object[] | | - |
| params | Routing parameter | object | | - |
| separator | Custom separator | string\|ReactNode | | '/' |
| params | Routing parameters | object | | - |
| separator | Custom separator | string\|ReactNode | | `/` |
| itemRender | Custom item renderer | (route, params, routes, paths) => ReactNode | | - |
> `linkRender` and `nameRender` were removed after `antd@2.0`, please use `itemRender` instead.
### Use with browserHistory
The link of Breadcrumb item contain `#` defaultly, you can use `itemRender` to make `browserHistory` Link.
The link of Breadcrumb item targets `#` by default, you can use `itemRender` to make a `browserHistory` Link.
```jsx
import { Link } from 'react-router';

View File

@@ -15,7 +15,7 @@
}
& > span:last-child {
font-weight: bold;
font-weight: 500;
color: @text-color;
}

View File

@@ -480,12 +480,13 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
class="ant-radio-group"
>
<label
class="ant-radio-button-wrapper"
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"
>
<span
class="ant-radio-button"
class="ant-radio-button ant-radio-button-checked"
>
<input
checked=""
class="ant-radio-button-input"
type="radio"
/>
@@ -498,13 +499,12 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
</span>
</label>
<label
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"
class="ant-radio-button-wrapper"
>
<span
class="ant-radio-button ant-radio-button-checked"
class="ant-radio-button"
>
<input
checked=""
class="ant-radio-button-input"
type="radio"
/>
@@ -538,7 +538,40 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
<br />
<br />
<button
class="ant-btn ant-btn-primary ant-btn-circle ant-btn-icon-only"
class="ant-btn ant-btn-primary ant-btn-lg"
type="button"
>
<span>
Primary
</span>
</button>
<button
class="ant-btn ant-btn-lg"
type="button"
>
<span>
Normal
</span>
</button>
<button
class="ant-btn ant-btn-dashed ant-btn-lg"
type="button"
>
<span>
Dashed
</span>
</button>
<button
class="ant-btn ant-btn-danger ant-btn-lg"
type="button"
>
<span>
Danger
</span>
</button>
<br />
<button
class="ant-btn ant-btn-primary ant-btn-circle ant-btn-lg ant-btn-icon-only"
type="button"
>
<i
@@ -546,7 +579,7 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
/>
</button>
<button
class="ant-btn ant-btn-primary"
class="ant-btn ant-btn-primary ant-btn-lg"
type="button"
>
<i
@@ -556,17 +589,9 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
Download
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<span>
Normal
</span>
</button>
<br />
<div
class="ant-btn-group"
class="ant-btn-group ant-btn-group-lg"
>
<button
class="ant-btn ant-btn-primary"

View File

@@ -10,7 +10,7 @@ export interface ButtonGroupProps {
prefixCls?: string;
}
export default function ButtonGroup(props: ButtonGroupProps) {
const ButtonGroup: React.SFC<ButtonGroupProps> = (props) => {
const { prefixCls = 'ant-btn-group', size = '', className, ...others } = props;
// large => lg
@@ -31,4 +31,6 @@ export default function ButtonGroup(props: ButtonGroupProps) {
}, className);
return <div {...others} className={classes} />;
}
};
export default ButtonGroup;

View File

@@ -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,
@@ -149,7 +142,7 @@ export default class Button extends React.Component<ButtonProps, any> {
break;
}
const classes = classNames(prefixCls, {
const classes = classNames(prefixCls, className, {
[`${prefixCls}-${type}`]: type,
[`${prefixCls}-${shape}`]: shape,
[`${prefixCls}-${sizeCls}`]: sizeCls,
@@ -157,11 +150,11 @@ export default class Button extends React.Component<ButtonProps, any> {
[`${prefixCls}-loading`]: loading,
[`${prefixCls}-clicked`]: clicked,
[`${prefixCls}-background-ghost`]: ghost,
}, className);
});
const iconType = loading ? 'loading' : icon;
const iconNode = iconType ? <Icon type={iconType} /> : null;
const needInserted = React.Children.count(children) === 1 && !iconType;
const needInserted = React.Children.count(children) === 1 && (!iconType || iconType === 'loading');
const kids = React.Children.map(children, child => insertSpace(child, needInserted));
return (
@@ -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}

View File

@@ -22,7 +22,7 @@ import { Button, Radio, Icon } from 'antd';
class ButtonSize extends React.Component {
state = {
size: 'default',
size: 'large',
};
handleSizeChange = (e) => {
@@ -39,9 +39,13 @@ class ButtonSize extends React.Component {
<Radio.Button value="small">Small</Radio.Button>
</Radio.Group>
<br /><br />
<Button type="primary" size={size}>Primary</Button>
<Button size={size}>Normal</Button>
<Button type="dashed" size={size}>Dashed</Button>
<Button type="danger" size={size}>Danger</Button>
<br />
<Button type="primary" shape="circle" icon="download" size={size} />
<Button type="primary" icon="download" size={size}>Download</Button>
<Button type="primary" size={size}>Normal</Button>
<br />
<Button.Group size={size}>
<Button type="primary">

View File

@@ -16,14 +16,14 @@ To get a customized button, just set `type`/`shape`/`size`/`loading`/`disabled`.
Property | Description | Type | Default
-----|-----|-----|------
type | can be set to `primary` `dashed` `danger`(added in 2.7) or omitted | string | 'default'
htmlType | to set the original `type` of `button`, see: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type) | string | `button`
type | can be set to `primary` `ghost` `dashed` `danger`(added in 2.7) or omitted (meaning `default`) | string | `default`
htmlType | set the original html `type` of `button`, see: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type) | string | `button`
icon | set the icon of button, see: Icon component | string | -
shape | can be set to `circle` or omitted | string | -
size | can be set to `small` `large` or omitted | string | `default`
loading | to set the loading status of button | boolean \| { delay: number } | `false`
loading | set the loading status of button | boolean \| { delay: number } | false
onClick | set the handler to handle `click` event | function | -
ghost | make background transparent and invert text and border color, added in 2.7 | boolean | false
ghost | make background transparent and invert text and border colors, added in 2.7 | boolean | false
`<Button>Hello world!</Button>` will be rendered into `<button>Hello world!</button>`, and all the properties which are not listed above will be transferred to the `<button>` tag.

View File

@@ -5,9 +5,9 @@
@btn-prefix-cls: ~"@{ant-prefix}-btn";
// for compatibile
@btn-ghost-color : @text-color;
@btn-ghost-bg : transparent;
@btn-ghost-border : @border-color-base;
@btn-ghost-color: @text-color;
@btn-ghost-bg: transparent;
@btn-ghost-border: @border-color-base;
// Button styles
// -----------------------------
@@ -15,6 +15,13 @@
.btn;
.btn-default;
// Make sure that the target of Button's click event always be `button`
// Ref: https://github.com/ant-design/ant-design/issues/7034
> i,
> span {
pointer-events: none;
}
&-primary {
.btn-primary;
@@ -86,7 +93,7 @@
display: block;
}
&&-loading:not(&-circle):not(&-circle-outline) {
&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
padding-left: 29px;
pointer-events: none;
position: relative;
@@ -95,7 +102,7 @@
}
}
&-sm&-loading:not(&-circle):not(&-circle-outline) {
&-sm&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
padding-left: 24px;
.@{iconfont-css-prefix} {
margin-left: -17px;
@@ -142,7 +149,7 @@
}
&-background-ghost {
background: transparent!important;
background: transparent !important;
border-color: #fff;
color: #fff;
}

View File

@@ -147,7 +147,7 @@
background-image: none;
border: @border-width-base @border-style-base transparent;
white-space: nowrap;
line-height: @line-height-base;
line-height: 1.15; // https://github.com/ant-design/ant-design/issues/7070
.button-size(@btn-height-base; @btn-padding-base; @font-size-base; @btn-border-radius-base);
user-select: none;
transition: all .3s @ease-in-out;
@@ -224,11 +224,11 @@
// circle button: the content only contains icon
.btn-circle(@btnClassName: btn) {
.square(@btn-circle-size);
.button-size(@btn-circle-size; 0; @font-size-base + 2; 50%);
.button-size(@btn-circle-size; 0; @font-size-base + 2px; 50%);
&.@{btnClassName}-lg {
.square(@btn-circle-size-lg);
.button-size(@btn-circle-size-lg; 0; @btn-font-size-lg + 2; 50%);
.button-size(@btn-circle-size-lg; 0; @btn-font-size-lg + 2px; 50%);
}
&.@{btnClassName}-sm {

View File

@@ -24,6 +24,8 @@ export default class Header extends React.Component<HeaderProps, any> {
yearSelectTotal: 20,
};
calenderHeaderNode: any;
getYearSelectElement(year) {
const { yearSelectOffset, yearSelectTotal, locale, prefixCls, fullscreen } = this.props;
const start = year - (yearSelectOffset as number);
@@ -41,6 +43,7 @@ export default class Header extends React.Component<HeaderProps, any> {
className={`${prefixCls}-year-select`}
onChange={this.onYearChange}
value={String(year)}
getPopupContainer={() => this.calenderHeaderNode}
>
{options}
</Select>
@@ -74,6 +77,7 @@ export default class Header extends React.Component<HeaderProps, any> {
className={`${prefixCls}-month-select`}
value={String(month)}
onChange={this.onMonthChange}
getPopupContainer={() => this.calenderHeaderNode}
>
{options}
</Select>
@@ -106,6 +110,10 @@ export default class Header extends React.Component<HeaderProps, any> {
}
}
getCalenderHeaderNode = (node) => {
this.calenderHeaderNode = node;
}
render() {
const { type, value, prefixCls, locale, fullscreen } = this.props;
const yearSelect = this.getYearSelectElement(value.year());
@@ -120,7 +128,7 @@ export default class Header extends React.Component<HeaderProps, any> {
);
return (
<div className={`${prefixCls}-header`}>
<div className={`${prefixCls}-header`} ref={this.getCalenderHeaderNode}>
{yearSelect}
{monthSelect}
{typeSwitch}

File diff suppressed because it is too large Load Diff

View File

@@ -9,11 +9,11 @@ Container for displaying data in calendar form.
## When To Use
When data is in the form of date, such as schedule, timetable, prices calendar, Lunar calendar. This component also supports Year/Month switch.
When data is in the form of dates, such as schedules, timetables, prices calendar, lunar calendar. This component also supports Year/Month switch.
## API
**Note:** Part of locale of Calendar is read from value. So, please set the locale of moment correctly.
**Note:** Part of the Calendar's locale is read from `value`. So, please set the locale of `moment` correctly.
```jsx
import moment from 'moment';
@@ -32,14 +32,15 @@ moment.locale('zh-cn');
| Property | Description | Type | Default |
|--------------|----------------|----------|--------------|
| value | set date | [moment](http://momentjs.com/) | current date |
| defaultValue | set default date | [moment](http://momentjs.com/) | default date |
| mode | can be set to month or year | string | month |
| fullscreen | to set whether full-screen display | boolean | true |
| dateCellRender | to set the way of renderer the date cell, the returned content will be appended to the cell | function(date: moment): ReactNode | - |
| monthCellRender | to set the way of renderer the month cell, the returned content will be appended to the cell | function(date: moment): ReactNode | - |
| dateFullCellRender | to set the way of renderer the date cell,the returned content will override the cell | function(date: moment): ReactNode | - |
| monthFullCellRender | to set the way of renderer the month cell,the returned content will override the cell | function(date: moment): ReactNode | - |
| locale | set locale | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| onPanelChange| callback when panel change | function(date: moment, mode: string) | - |
| onSelect | callback when select date | function(date: moment | - |
| value | The current selected date | [moment](http://momentjs.com/) | current date |
| defaultValue | The date selected by default | [moment](http://momentjs.com/) | default date |
| mode | The display mode of the calendar | `month` \| `year` | `month` |
| fullscreen | Whether to display in full-screen | boolean | `true` |
| dateCellRender | Customize the display of the date cell, the returned content will be appended to the cell | function(date: moment): ReactNode | - |
| monthCellRender | Customize the display of the month cell, the returned content will be appended to the cell | function(date: moment): ReactNode | - |
| dateFullCellRender | Customize the display of the date cell, the returned content will override the cell | function(date: moment): ReactNode | - |
| monthFullCellRender | Customize the display of the month cell, the returned content will override the cell | function(date: moment): ReactNode | - |
| locale | The calendar's locale | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| onPanelChange| Callback for when panel changes | function(date: moment, mode: string) | - |
| onSelect | Callback for when a date is selected | function(date: moment | - |
| disabledDate | Function that specifies the dates that cannot be selected | (currentDate: moment) => boolean | - |

View File

@@ -39,6 +39,7 @@ export interface CalendarProps {
style?: React.CSSProperties;
onPanelChange?: (date?: moment.Moment, mode?: CalendarMode) => void;
onSelect?: (date?: moment.Moment) => void;
disabledDate?: (current: moment.Moment) => boolean;
}
export interface CalendarState {
@@ -86,7 +87,7 @@ export default class Calendar extends React.Component<CalendarProps, CalendarSta
if (!moment.isMoment(value)) {
throw new Error(
'The value/defaultValue of Calendar must be a moment object after `antd@2.0`, ' +
'see: http://u.ant.design/calendar-value',
'see: https://u.ant.design/calendar-value',
);
}
this.state = {

View File

@@ -45,3 +45,4 @@ moment.locale('zh-cn');
| locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| onPanelChange| 日期面板变化回调 | function(date: moment, mode: string) | 无 |
| onSelect | 点击选择日期回调 | function(date: moment | 无 |
| disabledDate | 不可选择的日期 | (currentDate: moment) => boolean | 无 |

View File

@@ -0,0 +1,2 @@
import bg_BG from '../../date-picker/locale/bg_BG';
export default bg_BG;

View File

@@ -0,0 +1,2 @@
import el_GR from '../../date-picker/locale/el_GR';
export default el_GR;

View File

@@ -0,0 +1,2 @@
import en_GB from '../../date-picker/locale/en_GB';
export default en_GB;

View File

@@ -0,0 +1,2 @@
import fa_IR from '../../date-picker/locale/fa_IR';
export default fa_IR;

View File

@@ -0,0 +1,2 @@
import fr_FR from '../../date-picker/locale/fr_FR';
export default fr_FR;

View File

@@ -0,0 +1,2 @@
import it_IT from '../../date-picker/locale/it_IT';
export default it_IT;

View File

@@ -0,0 +1,2 @@
import nb_NO from '../../date-picker/locale/nb_NO';
export default nb_NO;

View File

@@ -0,0 +1,2 @@
import nl_BE from '../../date-picker/locale/nl_BE';
export default nl_BE;

View File

@@ -0,0 +1,2 @@
import pl_PL from '../../date-picker/locale/pl_PL';
export default pl_PL;

View File

@@ -0,0 +1,2 @@
import pt_PT from '../../date-picker/locale/pt_PT';
export default pt_PT;

View File

@@ -0,0 +1,2 @@
import sr_RS from '../../date-picker/locale/sr_RS';
export default sr_RS;

View File

@@ -0,0 +1,2 @@
import th_TH from '../../date-picker/locale/th_TH';
export default th_TH;

View File

@@ -16,7 +16,7 @@
padding: 11px 16px 11px 0;
text-align: right;
.@{ant-prefix}-select {
.@{ant-prefix}-select-dropdown {
text-align: left;
}
@@ -125,18 +125,6 @@
color: #fff;
}
&-disabled-cell &-value {
cursor: not-allowed;
color: @disabled-color;
background: @disabled-bg;
border-radius: 0;
width: auto;
&:hover {
background: @disabled-bg;
}
}
&-disabled-cell-first-of-row &-value {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
@@ -254,4 +242,25 @@
left: auto;
bottom: auto;
}
&-disabled-cell &-date {
&,
&:hover {
cursor: not-allowed;
}
}
&-disabled-cell:not(&-today) &-date {
&,
&:hover {
background: transparent;
}
}
&-disabled-cell &-value {
color: @disabled-color;
border-radius: 0;
width: auto;
cursor: not-allowed;
}
}

14
components/card/Grid.tsx Normal file
View File

@@ -0,0 +1,14 @@
import React from 'react';
import classNames from 'classnames';
export interface CardGridProps {
prefixCls?: string;
style?: React.CSSProperties;
className?: string;
}
export default (props: CardGridProps) => {
const { prefixCls = 'ant-card', className, ...others } = props;
const classString = classNames(`${prefixCls}-grid`, className);
return <div {...others} className={classString} />;
};

View File

@@ -8,20 +8,20 @@ exports[`renders ./components/card/demo/basic.md correctly 1`] = `
<div
class="ant-card-head"
>
<h3
<div
class="ant-card-head-title"
>
Card title
</h3>
</div>
<div
class="ant-card-extra"
>
<a
href="#"
</div>
<div
class="ant-card-extra"
>
More
</a>
<a
href="#"
>
More
</a>
</div>
</div>
<div
class="ant-card-body"
@@ -50,11 +50,11 @@ exports[`renders ./components/card/demo/border-less.md correctly 1`] = `
<div
class="ant-card-head"
>
<h3
<div
class="ant-card-head-title"
>
Card title
</h3>
</div>
</div>
<div
class="ant-card-body"
@@ -73,15 +73,79 @@ exports[`renders ./components/card/demo/border-less.md correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/grid.md correctly 1`] = `
exports[`renders ./components/card/demo/grid-card.md correctly 1`] = `
<div
class="ant-card ant-card-bordered ant-card-no-hovering ant-card-contain-grid"
>
<div
class="ant-card-head"
>
<div
class="ant-card-head-title"
>
Card Title
</div>
</div>
<div
class="ant-card-body"
>
<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
class="ant-card-grid"
style="width:25%;text-align:center;"
>
Content
</div>
</div>
</div>
`;
exports[`renders ./components/card/demo/in-column.md correctly 1`] = `
<div
style="background:#ECECEC;padding:30px;"
>
<div
class="ant-row"
style="margin-left:-8px;margin-right:-8px;"
>
<div
class="ant-col-8"
style="padding-left:8px;padding-right:8px;"
>
<div
class="ant-card"
@@ -89,11 +153,11 @@ exports[`renders ./components/card/demo/grid.md correctly 1`] = `
<div
class="ant-card-head"
>
<h3
<div
class="ant-card-head-title"
>
Card title
</h3>
</div>
</div>
<div
class="ant-card-body"
@@ -104,6 +168,7 @@ exports[`renders ./components/card/demo/grid.md correctly 1`] = `
</div>
<div
class="ant-col-8"
style="padding-left:8px;padding-right:8px;"
>
<div
class="ant-card"
@@ -111,11 +176,11 @@ exports[`renders ./components/card/demo/grid.md correctly 1`] = `
<div
class="ant-card-head"
>
<h3
<div
class="ant-card-head-title"
>
Card title
</h3>
</div>
</div>
<div
class="ant-card-body"
@@ -126,6 +191,7 @@ exports[`renders ./components/card/demo/grid.md correctly 1`] = `
</div>
<div
class="ant-col-8"
style="padding-left:8px;padding-right:8px;"
>
<div
class="ant-card"
@@ -133,11 +199,11 @@ exports[`renders ./components/card/demo/grid.md correctly 1`] = `
<div
class="ant-card-head"
>
<h3
<div
class="ant-card-head-title"
>
Card title
</h3>
</div>
</div>
<div
class="ant-card-body"
@@ -158,16 +224,18 @@ exports[`renders ./components/card/demo/loading.md correctly 1`] = `
<div
class="ant-card-head"
>
<h3
<div
class="ant-card-head-title"
>
Card title
</h3>
</div>
</div>
<div
class="ant-card-body"
>
<div>
<div
class="ant-card-loading-content"
>
<p
class="ant-card-loading-block"
style="width:94%;"

View File

@@ -0,0 +1,28 @@
import React from 'react';
import { mount } from 'enzyme';
import Card from '../index';
const delay = timeout => new Promise(resolve => setTimeout(resolve, timeout));
const testMethod = typeof window !== 'undefined' ? it : xit;
describe('Card', () => {
function fakeResizeWindowTo(wrapper, width) {
Object.defineProperties(wrapper.node.container, {
offsetWidth: {
get() { return width; },
configurable: true,
},
});
window.resizeTo(width);
}
testMethod('resize card will trigger different padding', async () => {
const wrapper = mount(<Card title="xxx">xxx</Card>);
fakeResizeWindowTo(wrapper, 1000);
await delay(0);
expect(wrapper.hasClass('ant-card-wider-padding')).toBe(true);
fakeResizeWindowTo(wrapper, 800);
await delay(0);
expect(wrapper.hasClass('ant-card-wider-padding')).toBe(false);
});
});

View File

@@ -0,0 +1,35 @@
---
order: 6
title:
zh-CN: 网格型内嵌卡片
en-US: Grid card
---
## zh-CN
一种常见的卡片内容区隔模式。
## en-US
Grid style card content.
````jsx
import { Card } from 'antd';
const gridStyle = {
width: '25%',
textAlign: 'center',
};
ReactDOM.render(
<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);
````

View File

@@ -2,7 +2,7 @@
order: 4
title:
zh-CN: 栅格卡片
en-US: Grid card
en-US: Card in column
---
## zh-CN
@@ -11,35 +11,24 @@ title:
## en-US
Cards usually cooperate with grid layout in overview page.
Cards usually cooperate with grid column layout in overview page.
````jsx
import { Card, Col, Row } from 'antd';
ReactDOM.render(
<div style={{ background: '#ECECEC', padding: '30px' }}>
<Row>
<Col span="8">
<Row gutter={16}>
<Col span={8}>
<Card title="Card title" bordered={false}>Card content</Card>
</Col>
<Col span="8">
<Col span={8}>
<Card title="Card title" bordered={false}>Card content</Card>
</Col>
<Col span="8">
<Col span={8}>
<Card title="Card title" bordered={false}>Card content</Card>
</Col>
</Row>
</div>
, mountNode);
````
````css
/* Increase grid spacing of 16px */
.code-box-demo .ant-row {
margin-left: -8px;
margin-right: -8px;
}
.code-box-demo .ant-row > div {
padding: 0 8px;
}
````

View File

@@ -5,11 +5,11 @@ title: Card
cols: 1
---
Simple rectangular container
Simple rectangular container.
## When To Use
A card can be used to display content related to a single subject. The content can consist of multiple elements of varying type and size.
A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes.
## API
@@ -17,10 +17,20 @@ A card can be used to display content related to a single subject. The content c
<Card title="Card title">Card content</Card>
```
### Card
| Property | Description | Type | Default |
|----------|----------------|----------|--------------|
| title | Card title | string\|ReactNode | - |
| extra | Content to render in the top-right corner of the card | string\|ReactNode | - |
| bordered | Toggles rendering of the border around the card | boolean | true |
| bordered | Toggles rendering of the border around the card | boolean | `true` |
| bodyStyle | Inline style to apply to the card content | object | - |
| loading | Shows a loading indicator while the contents of the card are being fetched | boolean | false |
| noHovering | Whether to disable hover effect on mouse over | boolean | `false` |
| loading | Shows a loading indicator while the contents of the card are being fetched | boolean | `false` |
### Card.Grid
Property | Description | Type | Default
---------|-------------|------|---------
className | className of container | string | -
style | style object of container | object | -

Some files were not shown because too many files have changed in this diff Show More