Socket
Socket
Sign inDemoInstall

antd

Package Overview
Dependencies
Maintainers
4
Versions
846
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd - npm Package Compare versions

Comparing version 0.8.0-beta4 to 0.8.0-beta5

lib/util/index.js

48

lib/alert/index.js

@@ -13,2 +13,6 @@ 'use strict';

var _rcAnimate = require('rc-animate');
var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
exports['default'] = _react2['default'].createClass({

@@ -24,11 +28,24 @@ displayName: 'index',

return {
display: 'block'
closing: true,
closed: false
};
},
handleClose: function handleClose(e) {
var dom = _react2['default'].findDOMNode(this);
dom.style.height = dom.offsetHeight + 'px';
// Magic code
// 重复一次后才能正确设置 height
dom.style.height = dom.offsetHeight + 'px';
this.setState({
closing: false
});
if (this.props.onClose) {
this.props.onClose.call(this, e);
}
},
animationEnd: function animationEnd() {
this.setState({
display: 'none'
closed: true,
closing: true
});

@@ -54,2 +71,4 @@ },

}
var html = undefined,
closeName = !this.state.closing ? ' ' + this.props.prefixCls + '-close' : '';
if (this.props.description) {

@@ -59,9 +78,7 @@ var _close = this.props.closable ? _react2['default'].createElement(

{ onClick: this.handleClose, className: 'ant-alert-with-description-close-icon' },
_react2['default'].createElement('span', {
className: 'ant-alert-with-description-close-icon-x' })
_react2['default'].createElement('span', { className: 'ant-alert-with-description-close-icon-x' })
) : '';
return _react2['default'].createElement(
html = _react2['default'].createElement(
'div',
{ style: { display: this.state.display },
className: 'ant-alert-with-description ant-alert-with-description-' + this.props.type },
{ 'data-show': this.state.closing, className: 'ant-alert-with-description ant-alert-with-description-' + this.props.type + closeName },
_react2['default'].createElement('i', { className: 'anticon ' + iconClass }),

@@ -82,5 +99,5 @@ _react2['default'].createElement(

if (this.props.closeText) {
return _react2['default'].createElement(
html = _react2['default'].createElement(
'div',
{ style: { display: this.state.display }, className: 'ant-alert ant-alert-' + this.props.type },
{ 'data-show': this.state.closing, className: 'ant-alert ant-alert-' + this.props.type + closeName },
_react2['default'].createElement('i', { className: 'anticon ' + iconClass }),

@@ -104,5 +121,5 @@ _react2['default'].createElement(

) : '';
return _react2['default'].createElement(
html = _react2['default'].createElement(
'div',
{ style: { display: this.state.display }, className: 'ant-alert ant-alert-' + this.props.type },
{ 'data-show': this.state.closing, className: 'ant-alert ant-alert-' + this.props.type + closeName },
_react2['default'].createElement('i', { className: 'anticon ' + iconClass }),

@@ -118,4 +135,13 @@ _react2['default'].createElement(

}
return this.state.closed ? null : _react2['default'].createElement(
_rcAnimate2['default'],
{
component: '',
showProp: 'data-show',
transitionName: 'slide-up',
onEnd: this.animationEnd },
html
);
}
});
module.exports = exports['default'];

@@ -51,10 +51,13 @@ 'use strict';

contextTypes: {
router: _react2['default'].PropTypes.func
router: _react2['default'].PropTypes.object
},
render: function render() {
var crumbs, routes, params;
if (this.context.router && this.props.Router) {
var Link = this.props.Router.Link;
routes = this.context.router.getCurrentRoutes();
params = this.context.router.getCurrentParams();
var crumbs = undefined,
routes = undefined,
params = undefined;
var ReactRouter = this.props.router;
if (this.context.router && ReactRouter) {
var Link = ReactRouter.Link;
routes = this.context.router.state.branch;
params = this.context.router.state.params;
crumbs = routes.map(function (route, i) {

@@ -61,0 +64,0 @@ var name = route.name.replace(/\:(.*)/g, function (replacement, key) {

@@ -9,5 +9,5 @@ 'use strict';

var _reactSlick = require('react-slick');
var _reactSlick2 = require('react-slick2');
var _reactSlick2 = _interopRequireDefault(_reactSlick);
var _reactSlick22 = _interopRequireDefault(_reactSlick2);

@@ -46,3 +46,3 @@ var _react = require('react');

{ className: className },
_react2['default'].createElement(_reactSlick2['default'], props)
_react2['default'].createElement(_reactSlick22['default'], props)
);

@@ -49,0 +49,0 @@ }

@@ -50,2 +50,2 @@ require('./index.css');

antd.version = '0.8.0-beta4';
antd.version = '0.8.0-beta5';

@@ -32,2 +32,3 @@ 'use strict';

trigger: 'click',
overlayStyle: {},
onConfirm: function onConfirm() {},

@@ -94,4 +95,5 @@ onCancel: function onCancel() {}

{ placement: this.props.placement,
overlayStyle: this.props.overlayStyle,
prefixCls: prefixCls,
renderPopupToBody: false,
renderPopupToBody: true,
onVisibleChange: this.onVisibleChange,

@@ -98,0 +100,0 @@ transitionName: transitionName,

@@ -26,3 +26,4 @@ 'use strict';

placement: 'top',
trigger: 'hover'
trigger: 'hover',
overlayStyle: {}
};

@@ -58,3 +59,4 @@ },

delay: 0.1,
renderPopupToBody: false,
overlayStyle: this.props.overlayStyle,
renderPopupToBody: true,
transitionName: transitionName,

@@ -61,0 +63,0 @@ trigger: this.props.trigger,

@@ -23,2 +23,4 @@ 'use strict';

var _utilIndex = require('../util/index');
var prefixCls = 'ant-tag';

@@ -35,2 +37,3 @@

this.state = {
closing: false,
closed: false

@@ -43,5 +46,17 @@ };

value: function close(e) {
var _this = this;
var dom = _react2['default'].findDOMNode(this);
dom.style.width = dom.offsetWidth + 'px';
// It's Magic Code, don't know why
dom.style.width = dom.offsetWidth + 'px';
this.setState({
closed: true
closing: true
});
(0, _utilIndex.addEventListenerOnce)(dom, _utilIndex.transitionEndEvent, function () {
_this.setState({
closed: true,
closing: false
});
});
this.props.onClose.call(this, e);

@@ -53,7 +68,10 @@ }

var close = this.props.closable ? _react2['default'].createElement('i', { className: 'anticon anticon-cross', onClick: this.close.bind(this) }) : '';
var colorClass = this.props.prefixCls + '-' + this.props.color;
var colorClass = this.props.color ? this.props.prefixCls + '-' + this.props.color : '';
return this.state.closed ? null : _react2['default'].createElement(
var className = this.props.prefixCls + ' ' + colorClass;
className = this.state.closing ? className + ' ' + this.props.prefixCls + '-close' : className;
return this.state.closed && !this.state.closing ? null : _react2['default'].createElement(
'div',
{ className: this.props.prefixCls + ' ' + colorClass },
{ className: className },
_react2['default'].createElement('a', _extends({ className: this.props.prefixCls + '-text' }, this.props)),

@@ -60,0 +78,0 @@ close

{
"name": "antd",
"version": "0.8.0-beta4",
"version": "0.8.0-beta5",
"stableVersion": "0.7.3",

@@ -41,2 +41,3 @@ "title": "Ant Design",

"object-assign": "3.x",
"rc-animate": "~1.1.0",
"rc-calendar": "~3.13.0",

@@ -54,3 +55,3 @@ "rc-checkbox": "~1.1.1",

"rc-radio": "~2.0.0",
"rc-select": "~4.7.1",
"rc-select": "~4.8.0",
"rc-slider": "~1.4.0",

@@ -65,3 +66,3 @@ "rc-steps": "~1.1.4",

"rc-util": "~2.0.3",
"react-slick": "~0.6.4",
"react-slick2": "~0.6.6",
"reqwest": "~2.0.1"

@@ -85,5 +86,8 @@ },

"less-loader": "^2.2.0",
"lesslint": "^0.1.7",
"lodash": "^3.10.0",
"nico-jsx": "~0.5.8",
"precommit-hook": "^1.0.7",
"rc-tabs": "~5.3.3",
"react-router": "~1.0.0-beta3",
"webpack": "^1.10.1",

@@ -97,4 +101,5 @@ "webpack-dev-middleware": "^1.2.0"

"clean": "rm -rf _site dist",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run clean && webpack && webpack --config webpack.config.min.js && nico build && node scripts/deploy.js",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run clean && webpack && webpack --config webpack.config.min.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js",
"lint": "eslint components index.js --ext '.js,.jsx'",
"lesslint": "lesslint style",
"test": "webpack && npm run lint",

@@ -101,0 +106,0 @@ "prepublish": "npm run babel && rm -rf dist && webpack --config webpack.config.production.js && node scripts/prenpm.js"

@@ -5,6 +5,4 @@ # Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![Dependency Status](https://david-dm.org/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)

一套企业级的前端设计语言和基于 React 的实现。
一套企业级的 UI 设计语言和基于 React 的实现。
设计文档和组件实现均在紧密整理和开发中,部分页面可能不完善,预计 8 月份释出正式版本。
<p align="center">

@@ -18,3 +16,3 @@ <a href="http://ant.design">

- 企业级金融产品的交互语言和视觉体系。
- 提炼自企业级后台产品的交互语言和视觉风格。
- 丰富实用的 React UI 组件。

@@ -40,3 +38,3 @@ - 基于 React 的组件化开发模式。

- [组件](http://ant.design/components/)
- [构建调试工具](https://github.com/ant-design/antd-bin)
- [构建调试 antd-bin](https://github.com/ant-design/antd-bin)
- [开发计划](https://github.com/ant-design/ant-design/issues/9)

@@ -47,30 +45,7 @@ - [修改记录](CHANGELOG.md)

- [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
- [网站和组件开发说明](https://github.com/ant-design/ant-design/wiki/%E7%BD%91%E7%AB%99%E5%92%8C%E7%BB%84%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E)
- [版本发布手册](https://github.com/ant-design/ant-design/wiki/%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
## 如何贡献
我们欢迎任何形式的贡献,有任何建议或意见您可以进行 [Pull Request](https://github.com/ant-design/ant-design/pulls),或者给我们[提问](https://github.com/ant-design/ant-design/issues)。
## 开发说明
#### 本地调试
```bash
$ npm install
$ npm start
```
然后访问 http://127.0.0.1:8000 。
#### [网站](http://ant.design)部署
```bash
$ npm run deploy
```
#### 版本构建
```bash
$ npm run release
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc