-
+
@@ -185,7 +187,7 @@ var Form = React.createClass({
diff --git a/components/validation/index.md b/components/validation/index.md
index 9fe0001496..e266f7b22d 100644
--- a/components/validation/index.md
+++ b/components/validation/index.md
@@ -10,7 +10,7 @@
## 何时使用
-同表单结合使用,对表单域进行校验。
+同表单结合使用,对表单域进行校验,提供前台校验和后台实时反馈校验,并对表单错误提供有效信息提示。
## API
@@ -53,7 +53,7 @@
- `type` : 声明校验的值类型(如 string email),这样就会使用默认提供的规则进行校验,更多详见 [type](https://github.com/yiminghe/async-validator#user-content-type);
- `required`: 是否必填;
- `pattern`: 声明校验正则表达式;
-- `min` / `max`: 最小值、最大值声明;
+- `min` / `max`: 最小值、最大值声明(对于 string 和 array 来说,针对的是其长度 length。);
- `len`: 字符长度;
- `enum`: 枚举值,对应 type 值为 `enum`,例如 `role: {type: "enum", enum: ['A', 'B', 'C']}`;
- `whitespace`: 是否允许空格, `true` 为允许;
diff --git a/index.js b/index.js
index 09a12847f1..ea73f8e8d6 100644
--- a/index.js
+++ b/index.js
@@ -7,7 +7,6 @@ var antd = {
Carousel: require('./components/carousel'),
Tabs: require('./components/tabs'),
Modal: require('./components/modal'),
- Menu: require('rc-menu'),
Dropdown: require('./components/dropdown'),
Progress: require('./components/progress'),
Popover: require('./components/popover'),
@@ -31,7 +30,8 @@ var antd = {
Notification: require('./components/notification'),
Alert: require('./components/alert'),
Validation: require('./components/validation'),
- Tree: require('./components/Tree')
+ Tree: require('./components/Tree'),
+ Menu: require('./components/Menu')
};
module.exports = antd;
diff --git a/package.json b/package.json
index 19e31d9b6d..56bf0f40e1 100644
--- a/package.json
+++ b/package.json
@@ -36,26 +36,26 @@
"gregorian-calendar": "~3.0.0",
"gregorian-calendar-format": "~3.0.1",
"is-equal-shallow": "~0.1.3",
- "object-assign": "~3.0.0",
- "rc-calendar": "~3.11.0",
+ "object-assign": "3.x",
+ "rc-calendar": "~3.12.3",
"rc-checkbox": "~1.0.6",
"rc-collapse": "~1.2.3",
- "rc-dialog": "~4.4.0",
+ "rc-dialog": "~4.5.0",
"rc-dropdown": "~1.1.1",
"rc-form-validation": "~2.4.7",
"rc-input-number": "~2.0.1",
- "rc-menu": "~3.4.2",
+ "rc-menu": "~3.5.0",
"rc-notification": "~1.1.0",
"rc-pagination": "~1.1.0",
"rc-progress": "~1.0.0",
"rc-radio": "~2.0.0",
- "rc-select": "~4.4.0",
+ "rc-select": "~4.5.1",
"rc-slider": "~1.3.1",
"rc-steps": "~1.1.4",
"rc-switch": "~1.2.0",
"rc-table": "~3.1.0",
- "rc-tabs": "~5.2.0",
- "rc-tooltip": "~2.4.0",
+ "rc-tabs": "~5.3.2",
+ "rc-tooltip": "~2.5.0",
"rc-tree": "~0.10.0",
"rc-util": "~2.0.3",
"react-slick": "~0.6.4"
diff --git a/site/templates/code.html b/site/templates/code.html
index 54b2848ed2..9dfe12ea72 100644
--- a/site/templates/code.html
+++ b/site/templates/code.html
@@ -1,13 +1,13 @@
-
+
diff --git a/site/theme.js b/site/theme.js
index 24c6b01a53..ac8a9872e0 100644
--- a/site/theme.js
+++ b/site/theme.js
@@ -105,6 +105,9 @@ module.exports = function(nico) {
},
rootDirectoryIs: function(directory, rootDirectory) {
return directory.split('/')[0] === rootDirectory;
+ },
+ removeCodeBoxIdPrefix: function(id) {
+ return id.split('-').slice(2).join('-');
}
};
diff --git a/static/style.css b/static/style.css
index 6834f9b2e8..85c963b7f4 100644
--- a/static/style.css
+++ b/static/style.css
@@ -558,6 +558,12 @@ footer ul li > a {
padding-left: 8px;
}
+.markdown > ol li {
+ list-style: decimal;
+ margin-left: 20px;
+ padding-left: 8px;
+}
+
.markdown code {
margin: 0 3px;
}
diff --git a/style/components/datepicker/Calendar.less b/style/components/datepicker/Calendar.less
index 69d3b38bbf..1be6170e4f 100644
--- a/style/components/datepicker/Calendar.less
+++ b/style/components/datepicker/Calendar.less
@@ -4,7 +4,6 @@
line-height: 34px;
text-align: center;
user-select: none;
- -webkit-user-select: none;
border-bottom: 1px solid #e9e9e9;
a:hover {
@@ -209,6 +208,7 @@
&-footer-btn {
text-align: center;
display: block;
+ line-height: 42px;
}
&-footer > div {
diff --git a/style/components/datepicker/Picker.less b/style/components/datepicker/Picker.less
index 4d64aaa56e..21f971a8da 100644
--- a/style/components/datepicker/Picker.less
+++ b/style/components/datepicker/Picker.less
@@ -11,6 +11,10 @@
position: relative;
display: inline-block;
+ &-input {
+ outline: none;
+ }
+
&-icon {
position: absolute;
-webkit-user-select: none;
diff --git a/style/components/form.less b/style/components/form.less
index 6a6558206c..1de1117601 100644
--- a/style/components/form.less
+++ b/style/components/form.less
@@ -6,14 +6,12 @@
label {
position: relative;
&[required]:before {
- position: absolute;
display: inline-block;
- left: ~"-5px \9"; // ie8-9
+ margin-right: 4px;
content: "*";
- color: @label-required-color;
font-family: SimSun;
font-size: @font-size-base;
- .translate3d(-10px; 0; 0);
+ color: @label-required-color;
}
> .@{iconfont-css-prefix} {
diff --git a/style/components/index.less b/style/components/index.less
index 89dfcf42c7..b570a8feb1 100644
--- a/style/components/index.less
+++ b/style/components/index.less
@@ -29,3 +29,4 @@
@import "tree";
@import "carousel/slick";
@import "carousel/slick-theme";
+@import "menu";
diff --git a/style/components/menu.less b/style/components/menu.less
new file mode 100644
index 0000000000..c01902937b
--- /dev/null
+++ b/style/components/menu.less
@@ -0,0 +1,135 @@
+@import "../mixins/index";
+
+@menuPrefixCls: ~"@{css-prefix}menu";
+
+.@{menuPrefixCls} {
+ outline: none;
+ margin-bottom: 0;
+ padding-left: 0; // Override default ul/ol
+ list-style: none;
+ z-index: 99999;
+ border: 1px solid #d9d9d9;
+ box-shadow: 0 0 4px #d9d9d9;
+ border-radius: 3px;
+ color: #666;
+
+ &-item-group-list {
+ margin: 0;
+ padding: 0;
+ }
+
+ &-item-group-title {
+ color: #999;
+ line-height: 1.5;
+ padding: 8px 10px;
+ border-bottom: 1px solid #dedede;
+ }
+
+ &-item-active, &-submenu-active {
+ background-color: #eaf8fe;
+ }
+
+ &-item-selected {
+ background-color: #eaf8fe;
+ }
+
+ & > li&-submenu {
+ padding: 0;
+ }
+
+ &-submenu-lt-lb > .@{menuPrefixCls} {
+ top: 100%;
+ left: 0;
+ margin-top: 4px;
+ }
+
+ &-submenu-lt-rt > .@{menuPrefixCls} {
+ top: 0;
+ left: 100%;
+ margin-left: 4px;
+ }
+
+ &-item,&-submenu-title {
+ margin: 0;
+ position: relative;
+ display: block;
+ padding: 7px 7px 7px 16px;
+ white-space: nowrap;
+
+ // Disabled state sets text to gray and nukes hover/tab effects
+ &.@{menuPrefixCls}-item-disabled, &.@{menuPrefixCls}-submenu-disabled {
+ color: #777 !important;
+ }
+ }
+ & > &-item-divider {
+ height: 1px;
+ margin: 1px 0;
+ overflow: hidden;
+ padding: 0;
+ line-height: 0;
+ background-color: #e5e5e5;
+ }
+
+ &-submenu {
+ position: relative;
+
+ > .@{menuPrefixCls} {
+ display: none;
+ position: absolute;
+ min-width: 160px;
+ background-color: #fff;
+ }
+
+ &-open {
+ > .@{menuPrefixCls} {
+ display: block;
+ }
+ }
+ }
+
+ .@{menuPrefixCls}-submenu-title, .@{menuPrefixCls}-item {
+ .anticon {
+ width: 14px;
+ height: 14px;
+ margin-right: 8px;
+ top: -1px;
+ }
+ }
+
+ &-horizontal {
+ background-color: #F3F5F7;
+ border: none;
+ border-bottom: 1px solid transparent;
+ border-bottom: 1px solid #d9d9d9;
+ box-shadow: none;
+
+ & > .@{menuPrefixCls}-item , & > .@{menuPrefixCls}-submenu > .@{menuPrefixCls}-submenu-title {
+ padding: 15px 20px;
+ }
+
+ & > .@{menuPrefixCls}-submenu, & > .@{menuPrefixCls}-item {
+ float: left;
+ border-bottom: 2px solid transparent;
+
+ &-active {
+ border-bottom: 2px solid #2db7f5;
+ background-color: #F3F5F7;
+ color: #2baee9;
+ }
+ }
+
+ &:after {
+ content: "\20";
+ display: block;
+ height: 0;
+ clear: both;
+ }
+ }
+
+ &-vertical {
+ padding: 12px 0;
+ & > .@{menuPrefixCls}-item , & > .@{menuPrefixCls}-submenu > .@{menuPrefixCls}-submenu-title {
+ padding: 12px 8px 12px 24px;
+ }
+ }
+}
diff --git a/style/components/tabs.less b/style/components/tabs.less
index 7fa2ca390d..097642767d 100644
--- a/style/components/tabs.less
+++ b/style/components/tabs.less
@@ -34,15 +34,18 @@
width: 100%;
position: relative;
white-space: nowrap;
- padding-right: 32px;
- border-bottom: 1px solid #f3f3f3;
+ border-bottom: 1px solid #e9e9e9;
margin-bottom: 15px;
.clearfix;
}
+ &-nav-container-scrolling {
+ padding-left: 32px;
+ padding-right: 32px;
+ }
+
&-tab-prev, &-tab-next {
user-select: none;
- -webkit-user-select: none;
z-index: 2;
margin-right: -2px;
margin-top: 1px;
@@ -79,6 +82,12 @@
}
}
+ &-tab-btn-disabled {
+ cursor: default;
+ color: #ccc;
+ pointer-events: none;
+ }
+
&-tab-next {
right: 2px;
@@ -89,7 +98,6 @@
&-tab-prev {
left: 0;
- background: #fff;
transform: rotate(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
&-icon:before {
diff --git a/style/core/base.less b/style/core/base.less
index 419852ec77..eac808bfa2 100644
--- a/style/core/base.less
+++ b/style/core/base.less
@@ -41,6 +41,11 @@ ol {
list-style: none;
}
+// Remove the clear button of a text input control in IE10+
+input::-ms-clear, input::-ms-reveal {
+ display: none;
+}
+
// Links
// -- TODO --
a {
diff --git a/style/themes/default/custom.less b/style/themes/default/custom.less
index 503279bbe0..c17ec024b3 100644
--- a/style/themes/default/custom.less
+++ b/style/themes/default/custom.less
@@ -10,8 +10,8 @@
// ------ Base & Require ------
@body-background : #fff;
-@font-family : "Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",SimSun,sans-serif;
-@code-family : "PT Mono", Menlo, "Courier New", monospace;
+@font-family : "Helvetica Neue",Helvetica,"Hiragino Sans GB","STHeitiSC-Light","Microsoft YaHei","微软雅黑",Arial,sans-serif;
+@code-family : "PT Mono",Menlo,Consolas,"Courier New",monospace;
@text-color : #666;
@font-size-base : 12px;
@line-height-base : 1.5;