Browse Source

normalize

es6
guy 8 years ago
parent
commit
7db54a06ba
  1. 70812
      bi/base.js
  2. 25238
      bi/case.js
  3. 15094
      bi/chart.js
  4. 230
      bi/core.css
  5. 35016
      bi/core.js
  6. 184
      bi/polyfill.js
  7. 132
      bi/widget.css
  8. 32240
      bi/widget.js
  9. 374
      demo/js/config/core.js
  10. 70812
      docs/base.js
  11. 25238
      docs/case.js
  12. 15094
      docs/chart.js
  13. 230
      docs/core.css
  14. 38108
      docs/core.js
  15. 14240
      docs/demo.js
  16. 184
      docs/polyfill.js
  17. 132
      docs/widget.css
  18. 32240
      docs/widget.js
  19. 230
      src/css/core/normalize.css
  20. 0
      src/css/core/normalize2.css
  21. 231
      src/less/core/normalize.less
  22. 88
      src/less/core/normalize2.less

70812
bi/base.js

File diff suppressed because it is too large Load Diff

25238
bi/case.js

File diff suppressed because it is too large Load Diff

15094
bi/chart.js

File diff suppressed because it is too large Load Diff

230
bi/core.css

@ -1,3 +1,233 @@
/*! normalize.css v1.0.0 | MIT License | git.io/normalize */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden] {
display: none;
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
body {
margin: 0;
}
a:focus {
outline: thin dotted;
}
a:active,
a:hover {
outline: 0;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: .83em;
margin: 1.67em 0;
}
h6 {
font-size: .75em;
margin: 2.33em 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
dfn {
font-style: italic;
}
mark {
background: #ff0;
color: #000000;
}
p,
pre {
margin: 1em 0;
}
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
q {
quotes: none;
}
q:before,
q:after {
content: '';
content: none;
}
small {
font-size: 75%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
menu,
ol,
ul {
padding: 0 0 0 40px;
}
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
img {
border: 0;
-ms-interpolation-mode: bicubic;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 0;
}
form {
margin: 0;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
white-space: normal;
*margin-left: -7px;
}
button,
input,
select,
textarea {
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle;
}
button,
input {
line-height: normal;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
*overflow: visible;
}
button[disabled],
input[disabled] {
cursor: default;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
*height: 13px;
*width: 13px;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
vertical-align: top;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
html, html,
body, body,
div, div,

35016
bi/core.js

File diff suppressed because it is too large Load Diff

184
bi/polyfill.js

@ -1,93 +1,93 @@
if(![].indexOf){ if(![].indexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.indexOf = function (o) { Array.prototype.indexOf = function (o) {
for (var i = 0, len = this.length; i < len; i++) { for (var i = 0, len = this.length; i < len; i++) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
} }
if(![].lastIndexOf){ if(![].lastIndexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* ie67不支持数组的这个方法 * ie67不支持数组的这个方法
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.lastIndexOf = function (o) { Array.prototype.lastIndexOf = function (o) {
for (var len = this.length, i = len - 1; i >= 0; i--) { for (var len = this.length, i = len - 1; i >= 0; i--) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
}/** }/**
* 特殊情况 * 特殊情况
* Created by wang on 15/6/23. * Created by wang on 15/6/23.
*/ */
//解决console未定义问题 guy //解决console未定义问题 guy
window.console = window.console || (function () { window.console = window.console || (function () {
var c = {}; var c = {};
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
= c.clear = c.exception = c.trace = c.assert = function () { = c.clear = c.exception = c.trace = c.assert = function () {
}; };
return c; return c;
})(); })();
/* /*
* 前端缓存 * 前端缓存
*/ */
window.localStorage || (window.localStorage = { window.localStorage || (window.localStorage = {
items: {}, items: {},
setItem: function (k, v) { setItem: function (k, v) {
BI.Cache.addCookie(k, v); BI.Cache.addCookie(k, v);
}, },
getItem: function (k) { getItem: function (k) {
return BI.Cache.getCookie(k); return BI.Cache.getCookie(k);
}, },
removeItem: function (k) { removeItem: function (k) {
BI.Cache.deleteCookie(k); BI.Cache.deleteCookie(k);
}, },
key: function () { key: function () {
}, },
clear: function () { clear: function () {
this.items = {}; this.items = {};
} }
});//修复ie9下sort方法的bug });//修复ie9下sort方法的bug
!function (window) { !function (window) {
var ua = window.navigator.userAgent.toLowerCase(), var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/; reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) { if (reg.test(ua)) {
var _sort = Array.prototype.sort; var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) { Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') { if (!!fn && typeof fn === 'function') {
if (this.length < 2) { if (this.length < 2) {
return this; return this;
} }
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0; var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
for (; i < l; i++) { for (; i < l; i++) {
for (j = i + 1; j < l; j++) { for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]); t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t : r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0; !!t ? 1 : 0) > 0;
if (r === true) { if (r === true) {
tmp = this[i]; tmp = this[i];
this[i] = this[j]; this[i] = this[j];
this[j] = tmp; this[j] = tmp;
} }
} }
} }
return this; return this;
} else { } else {
return _sort.call(this); return _sort.call(this);
} }
}; };
} }
}(window); }(window);

132
bi/widget.css

@ -39,72 +39,72 @@
.bi-arrangement-droppable { .bi-arrangement-droppable {
z-index: 100000; z-index: 100000;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-adapt-editor .adapt-editor-text { .bi-adapt-editor .adapt-editor-text {
font-size: 14px; font-size: 14px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-search-editor { .bi-search-editor {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-search-editor .close-font { .bi-search-editor .close-font {
font-size: 20px; font-size: 20px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 20px; font-size: 20px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor { .bi-small-search-editor .bi-editor {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .bi-editor .bi-input { .bi-small-search-editor .bi-editor .bi-input {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .bi-editor .bi-label { .bi-small-search-editor .bi-editor .bi-label {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 18px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 18px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-initial-editor .sign-initial-editor-text { .bi-sign-initial-editor .sign-initial-editor-text {
font-size: 14px; font-size: 14px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-style-editor .sign-style-editor-text { .bi-sign-style-editor .sign-style-editor-text {
max-width: 100%; max-width: 100%;
font-size: 12px; font-size: 12px;
} }
.bi-sign-style-editor .sign-style-editor-tip { .bi-sign-style-editor .sign-style-editor-tip {
max-width: 100%; max-width: 100%;
font-size: 12px; font-size: 12px;
color: #808080; color: #808080;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-text-editor { .bi-text-editor {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger { .bi-date-trigger {

32240
bi/widget.js

File diff suppressed because it is too large Load Diff

374
demo/js/config/core.js

@ -1,188 +1,188 @@
Demo.CORE_CONFIG = [{ Demo.CORE_CONFIG = [{
id: 1, id: 1,
text: "核心控件", text: "核心控件",
}, { }, {
id: 101, id: 101,
pId: 1, pId: 1,
text: "布局" text: "布局"
}, { }, {
pId: 101, pId: 101,
text: "bi.center_adapt", text: "自适应居中bi.center_adapt",
value: "demo.center_adapt" value: "demo.center_adapt"
}, { }, {
pId: 101, pId: 101,
text: "bi.vertical_adapt", text: "自适应垂直居中bi.vertical_adapt",
value: "demo.vertical_adapt" value: "demo.vertical_adapt"
}, { }, {
pId: 101, pId: 101,
text: "bi.horizontal_adapt", text: "自适应水平居中bi.horizontal_adapt",
value: "demo.horizontal_adapt" value: "demo.horizontal_adapt"
}, { }, {
pId: 101, pId: 101,
text: "bi.horizontal_auto", text: "margin-auto自适应水平居中bi.horizontal_auto",
value: "demo.horizontal_auto" value: "demo.horizontal_auto"
}, { }, {
pId: 101, pId: 101,
text: "bi.horizontal_float", text: "float水平居中bi.horizontal_float",
value: "demo.horizontal_float" value: "demo.horizontal_float"
}, { }, {
pId: 101, pId: 101,
text: "bi.left_right_vertical_adapt", text: "左右垂直居中bi.left_right_vertical_adapt",
value: "demo.left_right_vertical_adapt" value: "demo.left_right_vertical_adapt"
}, { }, {
pId: 101, pId: 101,
text: "bi.center", text: "bi.center",
value: "demo.center_layout" value: "demo.center_layout"
}, { }, {
pId: 101, pId: 101,
text: "bi.float_center", text: "bi.float_center",
value: "demo.float_center" value: "demo.float_center"
}, { }, {
pId: 101, pId: 101,
text: "bi.vertical", text: "垂直流式bi.vertical",
value: "demo.vertical" value: "demo.vertical"
}, { }, {
pId: 101, pId: 101,
text: "bi.horizontal", text: "水平流式bi.horizontal",
value: "demo.horizontal" value: "demo.horizontal"
}, { }, {
pId: 101, pId: 101,
text: "bi.border", text: "bi.border",
value: "demo.border" value: "demo.border"
}, { }, {
pId: 101, pId: 101,
text: "bi.left, bi.right", text: "bi.left, bi.right",
value: "demo.flow" value: "demo.flow"
}, { }, {
pId: 101, pId: 101,
text: "bi.inline", text: "bi.inline",
value: "demo.inline" value: "demo.inline"
}, { }, {
pId: 101, pId: 101,
text: "bi.htape", text: "bi.htape",
value: "demo.htape" value: "demo.htape"
}, { }, {
pId: 101, pId: 101,
text: "bi.vtape", text: "bi.vtape",
value: "demo.vtape" value: "demo.vtape"
}, { }, {
pId: 101, pId: 101,
text: "bi.grid", text: "bi.grid",
value: "demo.grid" value: "demo.grid"
}, { }, {
pId: 101, pId: 101,
text: "bi.table", text: "bi.table",
value: "demo.table_layout" value: "demo.table_layout"
}, { }, {
pId: 101, pId: 101,
text: "bi.td", text: "bi.td",
value: "demo.td" value: "demo.td"
}, { }, {
pId: 1, pId: 1,
id: 102, id: 102,
text: "抽象控件" text: "抽象控件"
}, { }, {
pId: 102, pId: 102,
text: "bi.button_group", text: "bi.button_group",
value: "demo.button_group" value: "demo.button_group"
}, { }, {
pId: 102, pId: 102,
text: "bi.button_tree", text: "bi.button_tree",
value: "demo.button_tree" value: "demo.button_tree"
}, { }, {
pId: 102, pId: 102,
text: "bi.virtual_group", text: "bi.virtual_group",
value: "demo.virtual_group" value: "demo.virtual_group"
}, { }, {
pId: 102, pId: 102,
text: "bi.custom_tree", text: "bi.custom_tree",
value: "demo.custom_tree" value: "demo.custom_tree"
}, { }, {
pId: 102, pId: 102,
text: "bi.grid_view", text: "bi.grid_view",
value: "demo.grid_view" value: "demo.grid_view"
}, { }, {
pId: 102, pId: 102,
text: "bi.collection_view", text: "bi.collection_view",
value: "demo.collection_view" value: "demo.collection_view"
}, { }, {
pId: 102, pId: 102,
text: "bi.list_view", text: "bi.list_view",
value: "demo.list_view" value: "demo.list_view"
}, { }, {
pId: 102, pId: 102,
text: "bi.virtual_list", text: "bi.virtual_list",
value: "demo.virtual_list" value: "demo.virtual_list"
}, { }, {
pId: 102, pId: 102,
id: 10201, id: 10201,
text: "组合控件" text: "组合控件"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.combo", text: "bi.combo",
value: "demo.combo" value: "demo.combo"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.expander", text: "bi.expander",
value: "demo.expander" value: "demo.expander"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.group_combo", text: "bi.group_combo",
value: "demo.group_combo" value: "demo.group_combo"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.loader", text: "bi.loader",
value: "demo.loader" value: "demo.loader"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.navigation", text: "bi.navigation",
value: "demo.navigation" value: "demo.navigation"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.searcher", text: "bi.searcher",
value: "demo.searcher" value: "demo.searcher"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.switcher", text: "bi.switcher",
value: "demo.switcher" value: "demo.switcher"
}, { }, {
pId: 10201, pId: 10201,
text: "bi.tab", text: "bi.tab",
value: "demo.tab" value: "demo.tab"
}, { }, {
pId: 102, pId: 102,
id: 10202, id: 10202,
text: "弹出层" text: "弹出层"
}, { }, {
pId: 10202, pId: 10202,
text: "bi.layer_float_box", text: "bi.layer_float_box",
value: "demo.layer_float_box" value: "demo.layer_float_box"
}, { }, {
pId: 10202, pId: 10202,
text: "bi.layer_popup", text: "bi.layer_popup",
value: "demo.layer_popup" value: "demo.layer_popup"
}, { }, {
pId: 10202, pId: 10202,
text: "bi.layer_searcher", text: "bi.layer_searcher",
value: "demo.layer_searcher" value: "demo.layer_searcher"
}, { }, {
pId: 1, pId: 1,
text: "widget", text: "widget",
value: "demo.widget" value: "demo.widget"
}, { }, {
pId: 1, pId: 1,
text: "single", text: "single",
value: "demo.single" value: "demo.single"
}, { }, {
pId: 1, pId: 1,
text: "BasicButton", text: "BasicButton",
value: "demo.basic_button" value: "demo.basic_button"
}, { }, {
pId: 1, pId: 1,
text: "NodeButton", text: "NodeButton",
value: "demo.node_button" value: "demo.node_button"
}, { }, {
pId: 1, pId: 1,
text: "pane", text: "pane",
value: "demo.pane" value: "demo.pane"
}]; }];

70812
docs/base.js

File diff suppressed because it is too large Load Diff

25238
docs/case.js

File diff suppressed because it is too large Load Diff

15094
docs/chart.js

File diff suppressed because it is too large Load Diff

230
docs/core.css

@ -1,3 +1,233 @@
/*! normalize.css v1.0.0 | MIT License | git.io/normalize */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden] {
display: none;
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
body {
margin: 0;
}
a:focus {
outline: thin dotted;
}
a:active,
a:hover {
outline: 0;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: .83em;
margin: 1.67em 0;
}
h6 {
font-size: .75em;
margin: 2.33em 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
dfn {
font-style: italic;
}
mark {
background: #ff0;
color: #000000;
}
p,
pre {
margin: 1em 0;
}
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
q {
quotes: none;
}
q:before,
q:after {
content: '';
content: none;
}
small {
font-size: 75%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
menu,
ol,
ul {
padding: 0 0 0 40px;
}
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
img {
border: 0;
-ms-interpolation-mode: bicubic;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 0;
}
form {
margin: 0;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
white-space: normal;
*margin-left: -7px;
}
button,
input,
select,
textarea {
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle;
}
button,
input {
line-height: normal;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
*overflow: visible;
}
button[disabled],
input[disabled] {
cursor: default;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
*height: 13px;
*width: 13px;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
vertical-align: top;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
html, html,
body, body,
div, div,

38108
docs/core.js

File diff suppressed because it is too large Load Diff

14240
docs/demo.js

File diff suppressed because one or more lines are too long

184
docs/polyfill.js

@ -1,93 +1,93 @@
if(![].indexOf){ if(![].indexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.indexOf = function (o) { Array.prototype.indexOf = function (o) {
for (var i = 0, len = this.length; i < len; i++) { for (var i = 0, len = this.length; i < len; i++) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
} }
if(![].lastIndexOf){ if(![].lastIndexOf){
/** /**
* 检查指定的值是否在数组中 * 检查指定的值是否在数组中
* ie67不支持数组的这个方法 * ie67不支持数组的这个方法
* @param {Object} o 要检查的值 * @param {Object} o 要检查的值
* @return {Number} o在数组中的索引如果不在数组中则返回-1 * @return {Number} o在数组中的索引如果不在数组中则返回-1
*/ */
Array.prototype.lastIndexOf = function (o) { Array.prototype.lastIndexOf = function (o) {
for (var len = this.length, i = len - 1; i >= 0; i--) { for (var len = this.length, i = len - 1; i >= 0; i--) {
if (_.isEqual(o, this[i])) { if (_.isEqual(o, this[i])) {
return i; return i;
} }
} }
return -1; return -1;
} }
}/** }/**
* 特殊情况 * 特殊情况
* Created by wang on 15/6/23. * Created by wang on 15/6/23.
*/ */
//解决console未定义问题 guy //解决console未定义问题 guy
window.console = window.console || (function () { window.console = window.console || (function () {
var c = {}; var c = {};
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile
= c.clear = c.exception = c.trace = c.assert = function () { = c.clear = c.exception = c.trace = c.assert = function () {
}; };
return c; return c;
})(); })();
/* /*
* 前端缓存 * 前端缓存
*/ */
window.localStorage || (window.localStorage = { window.localStorage || (window.localStorage = {
items: {}, items: {},
setItem: function (k, v) { setItem: function (k, v) {
BI.Cache.addCookie(k, v); BI.Cache.addCookie(k, v);
}, },
getItem: function (k) { getItem: function (k) {
return BI.Cache.getCookie(k); return BI.Cache.getCookie(k);
}, },
removeItem: function (k) { removeItem: function (k) {
BI.Cache.deleteCookie(k); BI.Cache.deleteCookie(k);
}, },
key: function () { key: function () {
}, },
clear: function () { clear: function () {
this.items = {}; this.items = {};
} }
});//修复ie9下sort方法的bug });//修复ie9下sort方法的bug
!function (window) { !function (window) {
var ua = window.navigator.userAgent.toLowerCase(), var ua = window.navigator.userAgent.toLowerCase(),
reg = /msie|applewebkit.+safari/; reg = /msie|applewebkit.+safari/;
if (reg.test(ua)) { if (reg.test(ua)) {
var _sort = Array.prototype.sort; var _sort = Array.prototype.sort;
Array.prototype.sort = function (fn) { Array.prototype.sort = function (fn) {
if (!!fn && typeof fn === 'function') { if (!!fn && typeof fn === 'function') {
if (this.length < 2) { if (this.length < 2) {
return this; return this;
} }
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0; var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;
for (; i < l; i++) { for (; i < l; i++) {
for (j = i + 1; j < l; j++) { for (j = i + 1; j < l; j++) {
t = fn.call(this, this[i], this[j]); t = fn.call(this, this[i], this[j]);
r = (typeof t === 'number' ? t : r = (typeof t === 'number' ? t :
!!t ? 1 : 0) > 0; !!t ? 1 : 0) > 0;
if (r === true) { if (r === true) {
tmp = this[i]; tmp = this[i];
this[i] = this[j]; this[i] = this[j];
this[j] = tmp; this[j] = tmp;
} }
} }
} }
return this; return this;
} else { } else {
return _sort.call(this); return _sort.call(this);
} }
}; };
} }
}(window); }(window);

132
docs/widget.css

@ -39,72 +39,72 @@
.bi-arrangement-droppable { .bi-arrangement-droppable {
z-index: 100000; z-index: 100000;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-adapt-editor .adapt-editor-text { .bi-adapt-editor .adapt-editor-text {
font-size: 14px; font-size: 14px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-search-editor { .bi-search-editor {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-search-editor .close-font { .bi-search-editor .close-font {
font-size: 20px; font-size: 20px;
} }
.bi-search-editor .search-font { .bi-search-editor .search-font {
font-size: 20px; font-size: 20px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor { .bi-small-search-editor .bi-editor {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .bi-editor .bi-input { .bi-small-search-editor .bi-editor .bi-input {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .bi-editor .bi-label { .bi-small-search-editor .bi-editor .bi-label {
font-size: 12px; font-size: 12px;
} }
.bi-small-search-editor .close-font { .bi-small-search-editor .close-font {
font-size: 18px; font-size: 18px;
} }
.bi-small-search-editor .search-font { .bi-small-search-editor .search-font {
font-size: 18px; font-size: 18px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-initial-editor .sign-initial-editor-text { .bi-sign-initial-editor .sign-initial-editor-text {
font-size: 14px; font-size: 14px;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-style-editor .sign-style-editor-text { .bi-sign-style-editor .sign-style-editor-text {
max-width: 100%; max-width: 100%;
font-size: 12px; font-size: 12px;
} }
.bi-sign-style-editor .sign-style-editor-tip { .bi-sign-style-editor .sign-style-editor-tip {
max-width: 100%; max-width: 100%;
font-size: 12px; font-size: 12px;
color: #808080; color: #808080;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-text-editor { .bi-text-editor {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger { .bi-date-trigger {

32240
docs/widget.js

File diff suppressed because it is too large Load Diff

230
src/css/core/normalize.css vendored

@ -0,0 +1,230 @@
/*! normalize.css v1.0.0 | MIT License | git.io/normalize */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden] {
display: none;
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
body {
margin: 0;
}
a:focus {
outline: thin dotted;
}
a:active,
a:hover {
outline: 0;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: .83em;
margin: 1.67em 0;
}
h6 {
font-size: .75em;
margin: 2.33em 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
dfn {
font-style: italic;
}
mark {
background: #ff0;
color: #000000;
}
p,
pre {
margin: 1em 0;
}
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
q {
quotes: none;
}
q:before,
q:after {
content: '';
content: none;
}
small {
font-size: 75%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
menu,
ol,
ul {
padding: 0 0 0 40px;
}
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
img {
border: 0;
-ms-interpolation-mode: bicubic;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 0;
}
form {
margin: 0;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
white-space: normal;
*margin-left: -7px;
}
button,
input,
select,
textarea {
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle;
}
button,
input {
line-height: normal;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
*overflow: visible;
}
button[disabled],
input[disabled] {
cursor: default;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
*height: 13px;
*width: 13px;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
vertical-align: top;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

0
src/css/core/normal.css → src/css/core/normalize2.css

231
src/less/core/normalize.less vendored

@ -0,0 +1,231 @@
/*! normalize.css v1.0.0 | MIT License | git.io/normalize */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block
}
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1
}
audio:not([controls]) {
display: none;
height: 0
}
[hidden] {
display: none
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%
}
html,
button,
input,
select,
textarea {
font-family: sans-serif
}
body {
margin: 0
}
a:focus {
outline: thin dotted
}
a:active,
a:hover {
outline: 0
}
h1 {
font-size: 2em;
margin: .67em 0
}
h2 {
font-size: 1.5em;
margin: .83em 0
}
h3 {
font-size: 1.17em;
margin: 1em 0
}
h4 {
font-size: 1em;
margin: 1.33em 0
}
h5 {
font-size: .83em;
margin: 1.67em 0
}
h6 {
font-size: .75em;
margin: 2.33em 0
}
abbr[title] {
border-bottom: 1px dotted
}
b,
strong {
font-weight: bold
}
blockquote {
margin: 1em 40px
}
dfn {
font-style: italic
}
mark {
background: #ff0;
color: #000
}
p,
pre {
margin: 1em 0
}
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word
}
q {
quotes: none
}
q:before,
q:after {
content: '';
content: none
}
small {
font-size: 75%
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline
}
sup {
top: -0.5em
}
sub {
bottom: -0.25em
}
dl,
menu,
ol,
ul {
margin: 1em 0
}
dd {
margin: 0 0 0 40px
}
menu,
ol,
ul {
padding: 0 0 0 40px
}
nav ul,
nav ol {
list-style: none;
list-style-image: none
}
img {
border: 0;
-ms-interpolation-mode: bicubic
}
svg:not(:root) {
overflow: hidden
}
figure {
margin: 0
}
form {
margin: 0
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: .35em .625em .75em
}
legend {
border: 0;
padding: 0;
white-space: normal;
*margin-left: -7px
}
button,
input,
select,
textarea {
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle
}
button,
input {
line-height: normal
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
*overflow: visible
}
button[disabled],
input[disabled] {
cursor: default
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
*height: 13px;
*width: 13px
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0
}
textarea {
overflow: auto;
vertical-align: top
}
table {
border-collapse: collapse;
border-spacing: 0
}

88
src/less/core/normal.less → src/less/core/normalize2.less

@ -1,45 +1,45 @@
@import "../bibase"; @import "../bibase";
html, body, div, ul, ol, li, img, a, span, p, * { html, body, div, ul, ol, li, img, a, span, p, * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a { a {
outline: none; outline: none;
text-decoration: none; text-decoration: none;
} }
a:focus { a:focus {
outline: 0; outline: 0;
} }
input, input,
textarea { textarea {
margin: 0; margin: 0;
padding: 0; padding: 0;
outline: none; outline: none;
border: 1px solid @color-bi-border-line; border: 1px solid @color-bi-border-line;
} }
.bi-theme-dark { .bi-theme-dark {
input, input,
textarea { textarea {
border: 1px solid @color-bi-border-line-theme-dark; border: 1px solid @color-bi-border-line-theme-dark;
} }
} }
ul { ul {
list-style: disc; list-style: disc;
} }
li { li {
list-style-type: none; list-style-type: none;
} }
i { i {
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
Loading…
Cancel
Save