Giter Club home page Giter Club logo

pile.js's Introduction

Pile Commitizen friendly license Apache 2.0

A lightweight mobile components library build with React.

pile

Docs

View the docs here

1.x docs

Components

Existing components of pile 2.0

Component Package Author
Button @pile-ui/button miaocai
Icon @pile-ui/icon miaocai
Switch @pile-ui/switch xilixjd
Toast @pile-ui/toast susan
InputFiled @pile-ui/inputFiled hpfree
Alert @pile-ui/alert gaiazhang
Radio @pile-ui/radio abiaoGit

Dependences

Installation

npm i pile-ui@latest --save

// import css
npm i @pile-ui/theme-default

import component

// style1
import {Button} from 'pile-ui'

// single component
import Button from '@pile-ui/button'

import all css

import '@pile-ui/theme-default/lib/index.min.css'

import single css

import '@pile-ui/theme-default/lib/button.min.css'

Example

We have several examples on the documentation. Here is the first one to get you started:

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Button } from 'pile-ui'
import '@pile-ui/theme-default/lib/index.min.css'

class App extends Component {
    render() {
        return (
            <Button>hello Pile</Button>
        );
    }
}

ReactDOM.render((
    <App/>
), document.getElementById('container'));

Development

git clone git@github.com:didi/pile.js.git
cd pile.js
npm install
npm start

create new module

lerna create  @pile-ui/xx packages

css build

cd packages/theme-default
npm run build
npm run build

Build single package by running the following:

npm run build -- --scope "@pile-ui/button"

Build multiple packages where scope is a glob expression:

npm run build -- --scope "{@pile-ui/button,@pile-ui/icon}"

Watch all filters (auto-rebuild upon src changes):

npm run watch

Contributing

Welcome to contribute by creating issues or sending pull requests. See Contributing Guide for guidelines.

License

pile is licensed under the Apache License 2.0. See the LICENSE file.

pile.js's People

Contributors

le0zh avatar renmm avatar weihongyu12 avatar yansenfe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pile.js's Issues

2.x RoundMap

2.x RoundMap

  • 组件
    • Basic
    • Feedback
      • Toast ------ [done] @zhixunqiu
      • Alert ------ [done] @gaiazhang
      • Confirm (确认对话框,p1) ------ [done] #11 @gaiazhang
      • Loading (Loading, 可实现Ringloading,p1,待梳理) ------ [processing] @jane-v
      • Popover (气泡,p1)
      • NoticeBar (通告栏,p3)
      • Result (结果页,p3, 用例太简单,暂定吧)
    • Form
      • InputFiled(表单Input, p1) ------ [done] @hpfree
      • Radio (单选框,p1) ------ [done] @abiaoGit
      • Switch (开关, p1) ------ [done] @xilixjd @renmm
      • Upload (上传文件,p3, 测试用例太少)
      • Check (Check, CheckBox, CheckList, p1)
      • Stepper (步进器,p2)
      • Verification (验证码,p1)
      • Filed (字段,表单展示类布局,p1) ------ [done] #18 @renmm
      • Validator (验证器,表单验证,p1,) ------ [done] #10 @renmm
    • Gesture (手势)
      • Swipe (提供基本的手势,上滑,下滑,左滑,右滑)
      • SwipePage (可滑动页面)
      • SwipeItem (可滑动项,)
      • Scroll (滚动加载,下拉刷新, p1,有什么坑?需要什么限制,需说明)
    • Layout
      • Grid (网格布局, p1)
      • Word (图文布局,可以好好思考下,使用场景,用例,jimu-mobile版太复杂,不好用,p1)
      • List (列表,弃用,用Filed代替,Deprecated))
    • Navigation
      • NavBar (使用场景在哪,p1,待思考)
      • Tabs (tab, p1) ------ [processing] @yansenfe
    • Data Entry
      • Star (星星, p2)
      • TextLink (文字链,可以考虑并入到button里,p3)
      • Search (搜索框,p1)
      • FadeIn (自定义弹层, 废弃,使用Drawer代替,Deprecated)
    • Data Display
      • Label (标签,p3,测试用例太少,太简单)
      • Badge (微标,p3,消息提示?右上角提示?用例太少,)
      • Radar (雷达,p2, 看着还不错,结合Security,这个动效还是有意思,这里可以出一篇blog,分析,拆解,如何实现此类动画需求)
      • Mask (遮罩,废弃,感觉没太大作用)
      • Carousel(轮播图,p3, 场景少,而且有很多成熟的)
      • Rule (刻度尺,p3, 使用场景少)
      • Slider (滑动条,p1, 常用类)
    • Alphabet (字母表)(data schema,)
      • Contact (通讯录)
      • City (单个城市)
      • Car (车型+系列+颜色,通过侧边栏分栏展示)
    • Drawer (抽屉类展示)
      • Drawer (抽屉类, 参考jimu-mobile fadein功能实现, p1) ------ [processing] #18 @renmm
      • Picker (选择器,p1)
      • DatePicker (日期选择器,p1)
    • Card (卡片类)
      • Card (基本的卡片组件,参考其他开源组件,整理需求wiki,p1)
      • permissionscard (废弃掉,可以用Filed组件替换, Deprecated)
      • CardRecord (用车记录,可以用Card组合出来,Deprecated)
      • passenger (乘车人,可以用Card组合出来,Deprecated)
      • Driver (司机卡片,同上,Deprecated)
      • Travel (用车行程,同上,Deprecated)
    • Utils (工具类)
      • Animate (暂定,待整合wiki)
  • 特色
    • 动画
    • 手势
    • 事件 ?
    • 多语言 ------ [done] #9 @zhixunqiu
    • 多主题
  • 非代码
    • 文档优化
    • 测试用例补齐
    • 集成TC

一些约定

  • 领取task时,再下面回复,以 领取 @task xx 方式回复。
  • 领取任务后,创建一个issue,并在对应的task后面添加进度,issue,开发者。
  • task时间节点以2周内解决为准,如若2周不能解决的,拆分task,直到满足2周内解决。

参考

不支持ts吗?

react的移动端UI真的太少了, ant的不好用。 没有tab-bar

Please create an issue in English

Pile.js的目标是成为一个全球性的项目。 我们必须选择一种语言,几乎每个人都可以知道它,以便我们可以相互沟通。 那么应该选择哪种语言,中文还是英文?当然,我认为本地化也很重要。可以添加QQ 或者建设中文论坛?

Pile.js want to be a global project. We have to chose one language almost everyone could know it so that we can communicate each other. So which languages should be chosen, Chinese or English? Of course, I think localization is also important, add QQ or build a Chinese forum ?

Rule component

不好意思我已经知道如何引用pile了,可是rule组件没明白,我已经传值进去了,还是没有办法看到刻度尺下的数字,是list数组的原因吗?具体该怎么传呢

Sent from PPHub For GitHub

`pile.min.css` is not compressed

pile.min.css is not compressed, it is not worthy of calling min.

/*引入默认样式*/
/*引入默认样式*/
/*引入默认样式*/
html,
body {
  height: 100%;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  margin: 0;
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.