# tinper-bee-core

> style core and js util for tinper-bee

Latest version **2.0.38** (published 2021-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install tinper-bee-core
pnpm add tinper-bee-core
yarn add tinper-bee-core
bun add tinper-bee-core
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.38 |
| Published | 2021-10-28 |
| First published | 2016-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 5 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | zhoubyc |
| Maintainers | yonyoufed, jonyw, guoyongfeng, kvkens, whizbz, npm_yx, bjyxszd, tinper-bot, houjitong, gaox2025f, gcht163, cnkvkens, diozhu, wangjings123, liushaozhen, zhaoyuchief, boyuzhou, ahua52 |
| Keywords | tinper, bee, react, til |

## Links

- npm: https://www.npmjs.com/package/tinper-bee-core
- Repository: https://github.com/tinper-bee/tinper-bee-core
- Issues: https://github.com/tinper-bee/tinper-bee-core/issues
- npm.io page: https://npm.io/package/tinper-bee-core

## Dependencies (5)

- [warning](https://npm.io/package/warning.md) ^3.0.0
- [dom-align](https://npm.io/package/dom-align.md) ^1.5.2
- [component-classes](https://npm.io/package/component-classes.md) ^1.2.6
- [create-react-class](https://npm.io/package/create-react-class.md) ^15.5.3
- [add-dom-event-listener](https://npm.io/package/add-dom-event-listener.md) ^1.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.38 (latest) — 2021-10-28
- 2.0.32 (alpha) — 2019-05-16
- 2.0.29 (beta) — 2019-04-29
- 2.0.37 — 2021-10-27
- 2.0.36 — 2020-08-13
- 2.0.35 — 2020-03-18
- 2.0.34 — 2020-01-02
- 2.0.33 — 2019-08-29
- 2.0.31 — 2019-05-10
- 2.0.31-alpha.0 — 2019-05-08
- 2.0.30 — 2019-04-30
- 2.0.30-alpha.0 — 2019-04-29
- 2.0.28 — 2019-03-27
- 2.0.28-alpha.1 — 2019-03-27
- 2.0.28-alpha.0 — 2019-03-27
- … 117 more at https://npm.io/package/tinper-bee-core/versions

## README

# 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
- [文档](http://tinper.org/dist/neoui/global/color.html)

### 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 检验是否包含

####

---
_Source: https://npm.io/package/tinper-bee-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
