Browse Source

Merge 1.x-stable

pull/2210/head
afc163 9 years ago
parent
commit
11283d01a3
  1. 2
      components/alert/index.tsx
  2. 39
      components/alert/style/index.less
  3. 4
      components/badge/ScrollNumber.tsx
  4. 9
      components/icon/index.jsx
  5. 4
      components/icon/index.tsx
  6. 2
      components/tag/style/index.less
  7. 48
      docs/spec/font.md
  8. 2
      site/theme/static/highlight.less

2
components/alert/index.tsx

@ -81,7 +81,7 @@ export default class Alert extends React.Component {
return this.state.closed ? null : ( return this.state.closed ? null : (
<Animate component="" <Animate component=""
showProp="data-show" showProp="data-show"
transitionName="slide-up" transitionName={`${prefixCls}-slide-up`}
onEnd={this.animationEnd} onEnd={this.animationEnd}
> >
<div data-show={this.state.closing} className={alertCls}> <div data-show={this.state.closing} className={alertCls}>

39
components/alert/style/index.less

@ -121,14 +121,43 @@
display: block; display: block;
} }
&-close { &&-close {
height: 0; height: 0 !important;
opacity: 0;
margin: 0; margin: 0;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
transition: all .3s @ease-in-out; transition: all .3s @ease-in-out-circ;
transform-origin: 50% 0; transform-origin: 50% 0;
animation-timing-function: @ease-in-out !important; }
&-slide-up-leave {
animation: antAlertSlideUpOut .3s @ease-in-out-circ;
animation-fill-mode: both;
}
}
@keyframes antAlertSlideUpIn {
0% {
opacity: 0;
transform-origin: 0% 0%;
transform: scaleY(0);
}
100% {
opacity: 1;
transform-origin: 0% 0%;
transform: scaleY(1);
}
}
@keyframes antAlertSlideUpOut {
0% {
opacity: 1;
transform-origin: 0% 0%;
transform: scaleY(1);
}
100% {
opacity: 0;
transform-origin: 0% 0%;
transform: scaleY(0);
} }
} }

4
components/badge/ScrollNumber.tsx

@ -106,8 +106,8 @@ export default class ScrollNumber extends React.Component {
className: `${this.props.prefixCls}-only`, className: `${this.props.prefixCls}-only`,
style: { style: {
transition: removeTransition && 'none', transition: removeTransition && 'none',
WebkitTransform: `translate3d(0, ${-position * height}px, 0)`, WebkitTransform: `translateY(${-position * height}px)`,
transform: `translate3d(0, ${-position * height}px, 0)`, transform: `translateY(${-position * height}px)`,
height, height,
}, },
key: i, key: i,

9
components/icon/index.jsx

@ -0,0 +1,9 @@
"use strict";
const react_1 = require('react');
const splitObject_1 = require('../_util/splitObject');
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = props => {
const [{ type, className = '' }, others] = splitObject_1.default(props, ['type', 'className']);
let className2 = `${className} anticon anticon-${type}`.trim();
return <i className={className2} {...others}/>;
};

4
components/icon/index.tsx

@ -4,7 +4,7 @@ import splitObject from '../_util/splitObject';
export default props => { export default props => {
const [{type, className = ''}, others] = splitObject(props, const [{type, className = ''}, others] = splitObject(props,
['type','className']); ['type','className']);
let className2 = `${className} anticon anticon-${type}`; let className2 = `${className} anticon anticon-${type}`.trim();
return <i className={className2} {...others} />; return <i className={className2} {...others} />;
}; };

2
components/tag/style/index.less

@ -94,7 +94,7 @@
} }
&-zoom-leave { &-zoom-leave {
animation: antZoomOut .2s @ease-in-out-circ; animation: antZoomOut .3s @ease-in-out-circ;
animation-fill-mode: both; animation-fill-mode: both;
} }
} }

48
docs/spec/font.md

@ -26,29 +26,29 @@ font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Micros
## 字体使用规范 ## 字体使用规范
<div class="row"> <div class="ant-row">
<div class="col col-12"> <div class="ant-col ant-col-12">
<div class="font-type head-1"> <div class="font-type">
<div class="font-title">主标题</div> <div class="font-title">主标题</div>
<h1 class="font-text"> <h1>
<span>我是标题</span> <span>我是标题</span>
<span>加粗</span> <span>加粗</span>
<span>#666</span> <span>#666</span>
<span>16px</span> <span>16px</span>
</h1> </h1>
</div> </div>
<div class="font-type head-2"> <div class="font-type">
<div class="font-title">次级标题</div> <div class="font-title">次级标题</div>
<h2 class="font-text"> <h2>
<span>我是标题</span> <span>我是标题</span>
<span>加粗</span> <span>加粗</span>
<span>#666</span> <span>#666</span>
<span>14px</span> <span>14px</span>
</h2> </h2>
</div> </div>
<div class="font-type head-3"> <div class="font-type">
<div class="font-title">小标题</div> <div class="font-title">小标题</div>
<h3 class="font-text"> <h3>
<span>我是标题</span> <span>我是标题</span>
<span>加粗</span> <span>加粗</span>
<span>#666</span> <span>#666</span>
@ -90,28 +90,28 @@ font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Micros
</p> </p>
</div> </div>
</div> </div>
<div class="col col-12"> <div class="ant-col ant-col-12">
<div class="font-type head-1"> <div class="font-type">
<div class="font-title">Main Head</div> <div class="font-title">Main Head</div>
<h1 class="font-text"> <h1>
<span>I am example text</span> <span>I am example text</span>
<span>bold</span> <span>bold</span>
<span>#666</span> <span>#666</span>
<span>16px</span> <span>16px</span>
</h1> </h1>
</div> </div>
<div class="font-type head-2"> <div class="font-type">
<div class="font-title">Sub Head</div> <div class="font-title">Sub Head</div>
<h2 class="font-text"> <h2>
<span>I am example text</span> <span>I am example text</span>
<span>bold</span> <span>bold</span>
<span>#666</span> <span>#666</span>
<span>14px</span> <span>14px</span>
</h2> </h2>
</div> </div>
<div class="font-type head-3"> <div class="font-type">
<div class="font-title">Small Head</div> <div class="font-title">Small Head</div>
<h3 class="font-text"> <h3>
<span>I am example text</span> <span>I am example text</span>
<span>bold</span> <span>bold</span>
<span>#666</span> <span>#666</span>
@ -175,19 +175,25 @@ font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Micros
font-size: 14px; font-size: 14px;
width: 100px; width: 100px;
} }
.font-text { .font-type h1,
.font-type h2,
.font-type h3,
.font-type .font-text {
width: 300px; width: 300px;
} }
.font-text span { .font-type h1 span,
margin-right: 8px; .font-type h2 span,
.font-type h3 span,
.font-type .font-text span {
margin-right: 0.6em;
} }
.head-1 h1 { .font-type h1 {
font-size: 16px; font-size: 16px;
} }
.head-2 h2 { .font-type h2 {
font-size: 14px; font-size: 14px;
} }
.head-3 h3 { .font-type h3 {
font-size: 12px; font-size: 12px;
} }
.disabled-text .font-text { .disabled-text .font-text {

2
site/theme/static/highlight.less

@ -124,7 +124,7 @@ pre[class*="language-"] {
.token.url, .token.url,
.language-css .token.string, .language-css .token.string,
.style .token.string { .style .token.string {
color: #a67f59; color: #690;
background: hsla(0, 0%, 100%, .5); background: hsla(0, 0%, 100%, .5);
} }

Loading…
Cancel
Save