fixed: merge

This commit is contained in:
展新 2015-06-09 18:24:45 +08:00
commit c134ed7fea
12 changed files with 149 additions and 152 deletions

View File

@ -4,3 +4,4 @@ node_modules
theme
static
_site
site

View File

@ -9,10 +9,9 @@
````jsx
var Menu = antd.Menu;
var Dropdown = antd.Dropdown;
function onClick(key){
var onClick = function (key){
alert('选中了菜单' + key);
}
};
var menu = <Menu onClick={onClick}>
<Menu.Item key="1">第一个菜单项</Menu.Item>
@ -21,7 +20,6 @@ var menu = <Menu onClick={onClick}>
<Menu.Item key="4" disabled>第四个菜单项</Menu.Item>
</Menu>;
React.render(
<Dropdown overlay={menu}>
<button className="ant-btn ant-btn-ghost">

View File

@ -21,18 +21,16 @@ var menu = <Menu>
<Menu.Item key="3">第三个菜单项</Menu.Item>
</Menu>;
React.render(
<div>
<Dropdown overlay={menu} trigger="click">
<button className="ant-btn ant-btn-ghost">
点我下来 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
<Dropdown overlay={menu}>
<button className="ant-btn ant-btn-ghost">
鼠标移入 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
</div>
, document.getElementById('components-dropdown-demo-trigger'));
React.render(<div>
<Dropdown overlay={menu} trigger="click">
<button className="ant-btn ant-btn-ghost">
点我下来 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
<Dropdown overlay={menu}>
<button className="ant-btn ant-btn-ghost">
鼠标移入 <i className="anticon anticon-caret-down"></i>
</button>
</Dropdown>
</div>, document.getElementById('components-dropdown-demo-trigger'));
````

View File

@ -2,12 +2,6 @@ var React = require('react');
var Tooltip = require('rc-tooltip');
module.exports = React.createClass({
getInitialState: function () {
var state = {};
state.placement = this.props.placement;
state.title = this.props.title;
return state;
},
getDefaultProps: function () {
return {
placement: 'top'
@ -15,10 +9,10 @@ module.exports = React.createClass({
},
render: function() {
return (
<Tooltip placement={this.state.placement}
<Tooltip placement={this.props.placement}
prefixCls="ant-tooltip"
trigger="hover"
overlay={this.state.title}>
overlay={this.props.title}>
{this.props.children}
</Tooltip>
);

View File

@ -45,16 +45,13 @@
<a href="/components">组件</a>
</li>
<li class="{%- if post.filename === 'design' %}current{%- endif %}">
<a href="/docs/design">设计</a>
<a class="disabled" href="/docs/design">设计</a>
</li>
<li class="{%- if post.filename === 'modes' %}current{%- endif %}">
<a href="/docs/modes">模式</a>
<a class="disabled" href="/docs/modes">模式</a>
</li>
<li class="{%- if post.filename === 'cases' %}current{%- endif %}">
<a href="/docs/cases">案例</a>
</li>
<li class="{%- if post.filename === 'download' %}current{%- endif %}">
<a href="/docs/download">下载</a>
<a class="disabled" href="/docs/cases">案例</a>
</li>
</ul>
</nav>

View File

@ -247,6 +247,12 @@ a.logo {
display: block;
}
.nav ul li a.disabled {
cursor: not-allowed;
color: #ddd !important;
pointer-events: none;
}
.nav ul li.current a {
color: #71B5DE;
font-weight: bold;

View File

@ -1,7 +1,6 @@
.@{prefixCalendarClass} {
position: relative;
outline: none;
font-family: Arial, "Hiragino Sans GB", "Microsoft Yahei", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif;
width: 253px;
border: 1px solid #ccc;
list-style: none;

View File

@ -24,8 +24,10 @@
z-index: 1070;
display: block;
visibility: visible;
left: -9999px;
top: -9999px;
font-size: @font-size-base;
line-height: 1.5;
line-height: @line-height-base;
&-placement-top { margin-top: -3px; padding: @tooltip-arrow-width 0; }
&-placement-right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }
@ -41,7 +43,7 @@
text-align: left;
text-decoration: none;
background-color: @tooltip-bg;
border-radius: 6px;
border-radius: @border-radius-base;
box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

View File

@ -156,7 +156,7 @@
.@{iconfont-css-prefix}-windows:before {content:"\e66c";}
.@{iconfont-css-prefix}-loading:before {
display: inline-block;
.animation(loadingCircle @fc-duration-1000 infinite linear);
.animation(loadingCircle @duration-1000 infinite linear);
content:"\e610";
}

View File

@ -5,10 +5,10 @@
// Fade - 透明度从 0 到 1从 1 到 0
.fade {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @fc-duration-600;
animation-timing-function: @fc-ease-in;
animation-duration: @fc-duration-600;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-duration: @duration-600;
animation-timing-function: @ease-in;
animation-duration: @duration-600;
&.ng-enter,
&.fade-add,
@ -88,12 +88,12 @@
// zoom - 从中心点放大、缩小
.zoom {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-600;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-600;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-600;
animation-duration: @duration-600;
&.ng-enter,
&.zoom-add,
@ -134,12 +134,12 @@
}
.zoom-left {
-webkit-animation-timing-function: @fc-ease-in-out;
-webkit-animation-timing-function: @ease-in-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in-out;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-left-add,
@ -179,12 +179,12 @@
}
}
.zoom-right {
-webkit-animation-timing-function: @fc-ease-in-out;
-webkit-animation-timing-function: @ease-in-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in-out;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-right-add,
@ -225,12 +225,12 @@
}
.zoom-up {
-webkit-animation-timing-function: @fc-ease-in-out;
-webkit-animation-timing-function: @ease-in-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in-out;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-up-add,
@ -271,12 +271,12 @@
}
.zoom-down {
-webkit-animation-timing-function: @fc-ease-in-out;
-webkit-animation-timing-function: @ease-in-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in-out;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-down-add,
@ -317,12 +317,12 @@
}
.zoom-arr12 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr12-add,
@ -345,12 +345,12 @@
}
.zoom-arr1 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr1-add,
@ -373,12 +373,12 @@
}
.zoom-arr3 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr3-add,
@ -401,12 +401,12 @@
}
.zoom-arr5 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr5-add,
@ -429,12 +429,12 @@
}
.zoom-arr6 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr6-add,
@ -456,12 +456,12 @@
}
}
.zoom-arr7 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr7-add,
@ -485,12 +485,12 @@
}
.zoom-arr9 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr9-add,
@ -512,12 +512,12 @@
}
}
.zoom-arr11 {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.zoom-arr11-add,
@ -983,12 +983,12 @@
}
// puff - 从本身放大、缩小
.puff {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-500;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-500;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-500;
animation-duration: @duration-500;
&.ng-enter,
&.puff-add,
@ -1093,12 +1093,12 @@
.rotate-down {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-timing-function: @fc-ease-out;
-webkit-animation-timing-function: @ease-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-400;
animation-timing-function: @fc-ease-out;
-webkit-animation-duration: @duration-400;
animation-timing-function: @ease-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-400;
animation-duration: @duration-400;
&.ng-enter,
&.rotate-down-add,
@ -1143,12 +1143,12 @@
.rotate-up {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-timing-function: @fc-ease-out;
-webkit-animation-timing-function: @ease-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-400;
animation-timing-function: @fc-ease-out;
-webkit-animation-duration: @duration-400;
animation-timing-function: @ease-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-400;
animation-duration: @duration-400;
&.ng-enter,
&.rotate-up-add,
@ -1189,12 +1189,12 @@
.rotate-left {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-timing-function: @fc-ease-out;
-webkit-animation-timing-function: @ease-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-400;
animation-timing-function: @fc-ease-out;
-webkit-animation-duration: @duration-400;
animation-timing-function: @ease-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-400;
animation-duration: @duration-400;
&.ng-enter,
&.rotate-left-add,
@ -1236,12 +1236,12 @@
.rotate-right {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-timing-function: @fc-ease-out;
-webkit-animation-timing-function: @ease-out;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-400;
animation-timing-function: @fc-ease-out;
-webkit-animation-duration: @duration-400;
animation-timing-function: @ease-out;
animation-fill-mode: backwards;
animation-duration: @fc-duration-400;
animation-duration: @duration-400;
&.ng-enter,
&.rotate-right-add,
@ -1494,12 +1494,12 @@
// Slide - 滑动
.slide-down {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-600;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-600;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-600;
animation-duration: @duration-600;
&.ng-enter,
&.slide-down-add,
@ -1539,12 +1539,12 @@
}
}
.slide-left {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-600;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-600;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-600;
animation-duration: @duration-600;
&.ng-enter,
&.slide-left-add,
@ -1584,12 +1584,12 @@
}
}
.slide-right {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-600;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-600;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-600;
animation-duration: @duration-600;
&.ng-enter,
&.slide-right-add,
@ -1629,12 +1629,12 @@
}
}
.slide-up {
-webkit-animation-timing-function: @fc-ease-in;
-webkit-animation-timing-function: @ease-in;
-webkit-animation-fill-mode: backwards;
-webkit-animation-duration: @fc-duration-600;
animation-timing-function: @fc-ease-in;
-webkit-animation-duration: @duration-600;
animation-timing-function: @ease-in;
animation-fill-mode: backwards;
animation-duration: @fc-duration-600;
animation-duration: @duration-600;
&.ng-enter,
&.slide-up-add,

View File

@ -88,7 +88,7 @@
line-height: @line-height-base;
.button-size(@btn-padding-base; @font-size-base; @btn-border-radius-base);
.user-select(none);
.transition(all .4s @fc-ease-in-out);
.transition(all .4s @ease-in-out);
-webkit-transform: translate3d(0, 0, 0);
> .@{iconfont-css-prefix} {
@ -196,7 +196,7 @@
border-radius: 50% 50%;
content: " ";
.scale(0, 0);
.transition(all @fc-duration-300 @fc-ease-in-out);
.transition(all @duration-300 @ease-in-out);
z-index: 0;
background-color: @primary-color;
}

View File

@ -26,25 +26,25 @@
@cursor-disabled : not-allowed;
// Animation
@fc-duration-300 : .3s;
@fc-duration-400 : .4s;
@fc-duration-500 : .5s;
@fc-duration-600 : .6s;
@fc-duration-700 : .7s;
@fc-duration-800 : .8s;
@fc-duration-900 : .9s;
@fc-duration-1000 : 1.0s;
@fc-duration-1100 : 1.1s;
@fc-duration-1200 : 1.2s;
@fc-ease-out : cubic-bezier(0.25, 0.8, 0.25, 1);
@fc-ease-in : cubic-bezier(0.55, 0, 0.55, 0.2);
@fc-ease-in-out : cubic-bezier(0.35, 0, 0.25, 1);
@fc-ease-out-back : cubic-bezier(0.18, 0.89, 0.32, 1.28);
@fc-ease-in-back : cubic-bezier(0.6, -0.3, 0.74, 0.05);
@fc-ease-in-out-back : cubic-bezier(0.68, -0.55, 0.27, 1.55);
@fc-ease-out-circ : cubic-bezier(0.08, 0.82, 0.17, 1);
@fc-ease-in-circ : cubic-bezier(0.6, 0.04, 0.98, 0.34);
@fc-ease-in-out-circ : cubic-bezier(0.78, 0.14, 0.15, 0.86);
@duration-300 : .3s;
@duration-400 : .4s;
@duration-500 : .5s;
@duration-600 : .6s;
@duration-700 : .7s;
@duration-800 : .8s;
@duration-900 : .9s;
@duration-1000 : 1.0s;
@duration-1100 : 1.1s;
@duration-1200 : 1.2s;
@ease-out : cubic-bezier(0.25, 0.8, 0.25, 1);
@ease-in : cubic-bezier(0.55, 0, 0.55, 0.2);
@ease-in-out : cubic-bezier(0.35, 0, 0.25, 1);
@ease-out-back : cubic-bezier(0.18, 0.89, 0.32, 1.28);
@ease-in-back : cubic-bezier(0.6, -0.3, 0.74, 0.05);
@ease-in-out-back : cubic-bezier(0.68, -0.55, 0.27, 1.55);
@ease-out-circ : cubic-bezier(0.08, 0.82, 0.17, 1);
@ease-in-circ : cubic-bezier(0.6, 0.04, 0.98, 0.34);
@ease-in-out-circ : cubic-bezier(0.78, 0.14, 0.15, 0.86);
// BUTTONS
@btn-font-weight : normal;
@ -79,6 +79,9 @@
@btn-circle-size-lg : 32px;
@btn-circle-size-sm : 22px;
// Border
@border-radius-base : 6px;
// Media queries breakpoints
// Extra small screen / phone
@screen-xs : 480px;
@ -108,4 +111,3 @@
@container-sm : (720px + @grid-gutter-width);
@container-md : (940px + @grid-gutter-width);
@container-lg : (1140px + @grid-gutter-width);