2015-11-02 18:12:23 +08:00
|
|
|
import React from 'react';
|
|
|
|
|
2015-09-08 18:17:15 +08:00
|
|
|
require('./style/index.less');
|
2015-05-26 17:35:24 +08:00
|
|
|
|
2015-08-17 15:12:59 +08:00
|
|
|
// matchMedia polyfill for
|
|
|
|
// https://github.com/WickyNilliams/enquire.js/issues/82
|
2015-10-26 20:03:37 +08:00
|
|
|
if (typeof window !== 'undefined') {
|
|
|
|
const matchMediaPolyfill = function matchMediaPolyfill() {
|
|
|
|
return {
|
|
|
|
matches: false,
|
|
|
|
addListener: function () {
|
|
|
|
},
|
|
|
|
removeListener: function () {
|
|
|
|
}
|
|
|
|
};
|
2015-08-17 15:12:59 +08:00
|
|
|
};
|
2015-10-26 20:03:37 +08:00
|
|
|
window.matchMedia = window.matchMedia || matchMediaPolyfill;
|
|
|
|
}
|
2015-08-17 15:12:59 +08:00
|
|
|
|
2015-08-17 15:17:04 +08:00
|
|
|
const antd = {
|
2015-08-03 16:49:42 +08:00
|
|
|
Affix: require('./components/affix'),
|
2015-06-09 14:50:55 +08:00
|
|
|
Datepicker: require('./components/datepicker'),
|
|
|
|
Tooltip: require('./components/tooltip'),
|
2015-08-03 14:52:26 +08:00
|
|
|
Carousel: require('./components/carousel'),
|
2015-06-15 19:56:58 +08:00
|
|
|
Tabs: require('./components/tabs'),
|
2015-06-10 22:02:13 +08:00
|
|
|
Modal: require('./components/modal'),
|
2015-06-09 16:54:11 +08:00
|
|
|
Dropdown: require('./components/dropdown'),
|
2015-06-09 21:16:59 +08:00
|
|
|
Progress: require('./components/progress'),
|
2015-06-17 16:58:13 +08:00
|
|
|
Popover: require('./components/popover'),
|
2015-06-10 22:02:13 +08:00
|
|
|
Select: require('./components/select'),
|
2015-07-01 20:44:19 +08:00
|
|
|
Breadcrumb: require('./components/breadcrumb'),
|
2015-06-24 19:20:47 +08:00
|
|
|
Popconfirm: require('./components/popconfirm'),
|
2015-07-13 01:04:05 +08:00
|
|
|
Pagination: require('./components/pagination'),
|
2015-07-01 14:48:47 +08:00
|
|
|
Steps: require('./components/steps'),
|
2015-07-08 19:47:45 +08:00
|
|
|
InputNumber: require('./components/input-number'),
|
2015-07-15 15:19:24 +08:00
|
|
|
Switch: require('./components/switch'),
|
2015-07-15 15:28:33 +08:00
|
|
|
Checkbox: require('./components/checkbox'),
|
2015-07-15 15:28:07 +08:00
|
|
|
Table: require('./components/table'),
|
2015-07-28 17:08:06 +08:00
|
|
|
Tag: require('./components/tag'),
|
2015-07-17 12:04:24 +08:00
|
|
|
Collapse: require('./components/collapse'),
|
2015-07-13 07:59:38 +08:00
|
|
|
message: require('./components/message'),
|
2015-07-16 18:23:25 +08:00
|
|
|
Slider: require('./components/slider'),
|
2015-10-19 15:36:32 +08:00
|
|
|
QueueAnim: require('./components/queue-anim'),
|
2015-07-17 16:06:46 +08:00
|
|
|
Radio: require('./components/radio'),
|
2015-10-28 20:55:49 +08:00
|
|
|
notification: require('./components/notification'),
|
2015-08-03 13:34:40 +08:00
|
|
|
Alert: require('./components/alert'),
|
2015-08-03 16:07:21 +08:00
|
|
|
Validation: require('./components/validation'),
|
2015-08-19 14:09:13 +08:00
|
|
|
Tree: require('./components/tree'),
|
2015-08-09 18:05:50 +08:00
|
|
|
Upload: require('./components/upload'),
|
2015-09-01 13:59:07 +08:00
|
|
|
Badge: require('./components/badge'),
|
2015-09-01 21:15:31 +08:00
|
|
|
Menu: require('./components/menu'),
|
2015-09-24 11:20:26 +08:00
|
|
|
Timeline: require('./components/timeline'),
|
2015-11-03 14:25:36 +08:00
|
|
|
Button: require('./components/button'),
|
|
|
|
ButtonGroup: require('./components/button').Group,
|
2015-10-27 10:10:27 +08:00
|
|
|
Icon: require('./components/iconfont'),
|
2015-10-27 23:52:17 +08:00
|
|
|
Row: require('./components/layout').Row,
|
|
|
|
Col: require('./components/layout').Col,
|
2015-10-09 13:54:02 +08:00
|
|
|
Spin: require('./components/spin'),
|
2015-10-29 08:40:51 +08:00
|
|
|
Form: require('./components/form').Form,
|
|
|
|
Input: require('./components/form').Input,
|
2015-05-21 20:36:13 +08:00
|
|
|
};
|
2015-05-25 17:20:49 +08:00
|
|
|
|
2015-07-15 12:07:11 +08:00
|
|
|
antd.version = require('./package.json').version;
|
2015-09-08 11:42:10 +08:00
|
|
|
|
2015-11-02 18:12:23 +08:00
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
const warning = require('warning');
|
|
|
|
const semver = require('semver');
|
|
|
|
const reactVersionInDeps = require('./package.json').devDependencies.react;
|
|
|
|
warning(semver.satisfies(React.version, reactVersionInDeps) || semver.gtr(React.version, reactVersionInDeps),
|
2015-11-04 11:05:46 +08:00
|
|
|
`antd@${antd.version} need react@${reactVersionInDeps} or higher, which is react@${React.version} now.`);
|
2015-11-02 18:12:23 +08:00
|
|
|
}
|
|
|
|
|
2015-07-02 12:12:13 +08:00
|
|
|
module.exports = antd;
|