tinper-bee-core
style core and js util for tinper-bee
Last updated 2 months ago by yangchch .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tinper-bee-core 
SYNC missed versions from official npm registry.

bee-core

tinper-bee组件库的核心样式及公用方法库

核心样式

放在scss文件夹下,由index.scss统一导出 包括

  • 重置浏览器样式
  • 全局样式设置
  • 图标样式
  • 波纹效果、阴影样式、文本及字体样式
  • 主辅色及常用颜色设置

工具方法库

set-global

  • 设置body字体及颜色
  • 设置图表间距
  • 设置显隐u-visible u-not-visible
  • 设置边框u-border-top...

set-normalize

  • 重置css样式

set-resets

  • 选择时删除文本阴影,及设置默认选中颜色
  • html5标签的跨浏览器样式适配

util-iconfont

  • 图标设定

util-ripple

  • 波动动画设定

util-shadow

  • 阴影样式设定

util-utilities

  • 垂直对齐样式
  • display样式
  • 文本换行,浅色
  • 文本位置
  • 文本大小写
  • 字体粗度
  • 字体大小
  • 清除浮动及左右浮动
  • 显示隐藏
  • 宽高常用预设样式
  • 常用margin,padding预设样式
  • visible,hidden的适配预设

minxin-colors

minxin-mixins

minxin-palette

  • 设置根据minxin-colors的颜色生成背景颜色和字体颜色

minxin-themeColors

  • 设置主色和辅色

minxin-variables

  • 默认变量
    • 默认字体
    • 默认颜色
    • 字体大小和粗细
    • 波纹效果
    • 贝塞尔曲线动画
    • 阴影
    • 常用z-index值设定
    • UI组件的预设

js方法

keyCode对象

引入方法:

import keyCode from 'tinper-bee-core/lib/keyCode';

//或者

import { keyCode } from 'tinper-bee-core';

方法:

  • isTextModifyingKeyEvent 验证是否是特殊按键或组合按键
handleKeyDown = (e) => {
if(keyCode.isTextModifyingKeyEvent(e)){
 //一些操作
}
}
...

<Input onKeyDown={this.handleKeyDown} />
  • isCharacterKey 验证是否是文本键
handleKeyDown = (e) => {
if(keyCode.isCharacterKey(e)){
 //一些操作
}
}
...

<Input onKeyDown={this.handleKeyDown} />

toArray 将数组安全的转换为react element 数组

splitComponentProps 通过父组件的propTypes拆分分别传给父子组件的props

const propTypes = {
    color: PropTypes.string,
    size: PropTypes.string
}
class ParentClass extends React.Component{
    render() {
        let props = this.props;
        let [parentProps, childProps] = splitComponentProps(props);

        return (
            <div>
                <ChildrenClass {...childProps} />
            </div>
        )
    }
}

ParentClass.propTypes = propTypes;

createChainedFunction 创建链式调用方法

用法:


contains 检验是否包含

Current Tags

  • 2.0.32                                ...           alpha (a year ago)
  • 2.0.29                                ...           beta (a year ago)
  • 2.0.36                                ...           latest (2 months ago)

130 Versions

  • 2.0.36                                ...           2 months ago
  • 2.0.35                                ...           7 months ago
  • 2.0.34                                ...           10 months ago
  • 2.0.33                                ...           a year ago
  • 2.0.32                                ...           a year ago
  • 2.0.31                                ...           a year ago
  • 2.0.31-alpha.0                                ...           a year ago
  • 2.0.30                                ...           a year ago
  • 2.0.30-alpha.0                                ...           a year ago
  • 2.0.29                                ...           a year ago
  • 2.0.28                                ...           2 years ago
  • 2.0.28-alpha.1                                ...           2 years ago
  • 2.0.28-alpha.0                                ...           2 years ago
  • 2.0.27                                ...           2 years ago
  • 2.0.26                                ...           2 years ago
  • 2.0.25                                ...           2 years ago
  • 2.0.24                                ...           2 years ago
  • 2.0.24-alpha.0                                ...           2 years ago
  • 2.0.23                                ...           2 years ago
  • 2.0.23-alpha.0                                ...           2 years ago
  • 2.0.22                                ...           2 years ago
  • 2.0.21                                ...           2 years ago
  • 2.0.20                                ...           2 years ago
  • 2.0.19                                ...           2 years ago
  • 2.0.18-alpha.0                                ...           2 years ago
  • 2.0.18                                ...           2 years ago
  • 2.0.17                                ...           2 years ago
  • 2.0.17-alpha.0                                ...           2 years ago
  • 2.0.16                                ...           2 years ago
  • 2.0.16-alpha.1                                ...           2 years ago
  • 2.0.16-alpha.0                                ...           2 years ago
  • 2.0.15                                ...           2 years ago
  • 2.0.14                                ...           2 years ago
  • 2.0.13                                ...           2 years ago
  • 2.0.13-alpha.2                                ...           2 years ago
  • 2.0.13-alpha.1                                ...           2 years ago
  • 2.0.13-alpha.0                                ...           2 years ago
  • 2.0.12                                ...           2 years ago
  • 2.0.12-alpha.7                                ...           2 years ago
  • 2.0.12-alpha.6                                ...           2 years ago
  • 2.0.12-alpha.5                                ...           2 years ago
  • 2.0.12-alpha.4                                ...           2 years ago
  • 2.0.12-alpha.3                                ...           2 years ago
  • 2.0.12-alpha.2                                ...           2 years ago
  • 2.0.12-alpha.1                                ...           2 years ago
  • 2.0.12-alpha.0                                ...           2 years ago
  • 2.0.11                                ...           2 years ago
  • 2.0.11-alpha.0                                ...           2 years ago
  • 2.0.10                                ...           2 years ago
  • 2.0.9-beta.1                                ...           2 years ago
  • 2.0.9                                ...           2 years ago
  • 2.0.8                                ...           2 years ago
  • 2.0.8-alpha.1                                ...           2 years ago
  • 2.0.8-alpha.0                                ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.4-alpha.0                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.1-alpha.1                                ...           2 years ago
  • 2.0.1-alpha.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 2.0.0-alpha.4                                ...           2 years ago
  • 2.0.0-alpha.3                                ...           2 years ago
  • 2.0.0-alpha.2                                ...           2 years ago
  • 2.0.0-alpha.1                                ...           2 years ago
  • 2.0.0-alpha.0                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.2.11                                ...           3 years ago
  • 0.2.10                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.9                                ...           3 years ago
  • 0.2.8                                ...           3 years ago
  • 0.2.7                                ...           3 years ago
  • 0.2.6                                ...           3 years ago
  • 0.2.5                                ...           3 years ago
  • 0.2.4                                ...           3 years ago
  • 0.2.3                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.9                                ...           4 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.0.26                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.25                                ...           4 years ago
  • 0.0.24                                ...           4 years ago
  • 0.0.23                                ...           4 years ago
  • 0.0.22                                ...           4 years ago
  • 0.0.21                                ...           4 years ago
  • 0.0.20                                ...           4 years ago
  • 0.0.19                                ...           4 years ago
  • 0.0.18                                ...           4 years ago
  • 0.0.17                                ...           4 years ago
  • 0.0.16                                ...           4 years ago
  • 0.0.15                                ...           4 years ago
  • 0.0.14                                ...           4 years ago
  • 0.0.13                                ...           4 years ago
  • 0.0.12                                ...           4 years ago
  • 0.0.11                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Downloads
Today 173
This Week 173
This Month 2,239
Last Day 16
Last Week 1,390
Last Month 12,871
Dependencies (5)
Dependents (128)

Copyright 2014 - 2016 © taobao.org |