Skip to content

Commit

Permalink
ver. 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
光弘 committed May 10, 2016
0 parents commit 2041975
Show file tree
Hide file tree
Showing 19 changed files with 925 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*.{js,css}]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2

[*]
charset = utf-8
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*.iml
*.log
.idea/
.ipr
.iws
*~
~*
*.diff
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
*.swo
*.pyc
*.pyo
.build
node_modules
_site
sea-modules
spm_modules
.cache
dist
build
assets/**/*.css
13 changes: 13 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"node": true,
"browser": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"immed": true,
"newcap": true,
"noarg": true,
"undef": true,
"unused": "vars",
"esnext": true
}
28 changes: 28 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
bower_components/
*.cfg
node_modules/
nohup.out
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.log
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
out/
.build
node_modules
_site
sea-modules
spm_modules
.cache
dist
3 changes: 3 additions & 0 deletions .yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"generator-uxcore": {}
}
Empty file added HISTORY.md
Empty file.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

## uxcore-input-form-field [![Dependency Status](http://img.shields.io/david/uxcore/uxcore-input-form-field.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-input-form-field) [![devDependency Status](http://img.shields.io/david/dev/uxcore/uxcore-input-form-field.svg?style=flat-square)](https://david-dm.org/uxcore/uxcore-input-form-field#info=devDependencies)

## TL;DR

uxcore-input-form-field ui component for react

#### setup develop environment

```sh
$ git clone https://github.com/uxcore/uxcore-input-form-field
$ cd uxcore-input-form-field
$ npm install
$ gulp server
```

## Usage

## demo
http://uxcore.github.io/

## API

## Props

| 配置项 | 类型 | 必填 | 默认值 | 功能/备注 |
|---|---|---|---|---|

57 changes: 57 additions & 0 deletions demo/InputFormFieldDemo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* InputFormField Component Demo for uxcore
* @author eternalsky
*
* Copyright 2015-2016, Uxcore Team, Alinw.
* All rights reserved.
*/

let classnames = require('classnames');

let InputFormField = require('../src');
let {LeftAddon, RightAddon, Count} = InputFormField;
let Form = require('uxcore-form/build/Form');
let Validators = require('uxcore-validator');

class Demo extends React.Component {

constructor(props) {
super(props);
this.state = {
}
}

handleKeyDown() {

}

render() {
let me = this;
return (
<div>
<Form>
<InputFormField
required={true}
jsxname="test1"
jsxdisabled={false}
autoTrim={false}
jsxlabel="普通输入框"
jsxtips="请输入数字"
validateOnBlur={false}
onKeyDown={me.handleKeyDown.bind(me)}
jsxrules={{validator: Validators.isNotEmpty, errMsg: "不能为空"}}>
<LeftAddon>
<i className="kuma-icon kuma-icon-phone"></i>
</LeftAddon>
<RightAddon>
<span></span>
</RightAddon>
<Count total={20}/>
</InputFormField>
</Form>
</div>
);
}
};

module.exports = Demo;
10 changes: 10 additions & 0 deletions demo/InputFormFieldDemo.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* InputFormField Component Demo Style for Uxcore
* @author eternalsky
*
* Copyright 2015-2016, Uxcore Team, Alinw.
* All rights reserved.
*/

@import "../node_modules/kuma-base/theme/orange";
@import "../src/InputFormField.less";
10 changes: 10 additions & 0 deletions demo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* InputFormField Component Demo for uxcore
* @author eternalsky
*
* Copyright 2015-2016, Uxcore Team, Alinw.
* All rights reserved.
*/

var Demo = require('./InputFormFieldDemo');
ReactDOM.render(<Demo/>, document.getElementById('UXCoreDemo'));
Loading

0 comments on commit 2041975

Please sign in to comment.