Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Xiao committed Jul 10, 2019
0 parents commit 94d7a9e
Show file tree
Hide file tree
Showing 31 changed files with 2,529 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"env":
{
"development":
{

},
"production":
{

},
"lib":
{
"plugins": [
["css-modules-transform",
{
"generateScopedName": "[name]__[local]"
}],
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
],
},
}
}
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
// Extend existing configuration
// from ESlint and eslint-plugin-react defaults.
"extends": ["eslint:recommended", "plugin:react/recommended"],
// Enable ES6 support. If you want to use custom Babel
// features, you will need to enable a custom parser
// as described in a section below.
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"env": {
"jest": true,
"es6": true,
"browser": true,
"node": true,
"jquery": true
},
// Enable custom plugin known as eslint-plugin-react
"plugins": ["react", "react-hooks"],
"rules": {
// Disable `no-console` rule
"no-console": 0,
// Give a warning if identifiers contain underscores
"no-underscore-dangle": 1,
"no-debugger": 0,
"react-hooks/rules-of-hooks": "error",
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
]
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
/*.log
/log/*.log
coverage
19 changes: 19 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/coverage
/example
/webpack
/src
/.babelrc
/.eslintrc.json
/eslintignore.json
/.gitignore
/.travis.yml
/jest.config.js
/postcss.config.js
/stylelint.config.js
/tsconfig.json
/tslint.json
/*.gif
/dist
/*.html
/.github
/rev-manifest.json
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: node_js
node_js:
- "10"
before_script:
- npm i
script: npm run prepublish
after_script: "cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js"
env:
- REACT=16
notifications:
email:
- email:[email protected]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018-present Edward Xiao

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 45 additions & 0 deletions LICENSE_996
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Copyright (c) 2019-present Edward Xiao

Anti 996 License Version 1.0 (Draft)

Permission is hereby granted to any individual or legal entity obtaining a copy
of this licensed work (including the source code, documentation and/or related
items, hereinafter collectively referred to as the "licensed work"), free of
charge, to deal with the licensed work for any purpose, including without
limitation, the rights to use, reproduce, modify, prepare derivative works of,
publish, distribute and sublicense the licensed work, subject to the following
conditions:

1. The individual or the legal entity must conspicuously display, without
modification, this License on each redistributed or derivative copy of the
Licensed Work.

2. The individual or the legal entity must strictly comply with all applicable
laws, regulations, rules and standards of the jurisdiction relating to
labor and employment where the individual is physically located or where
the individual was born or naturalized; or where the legal entity is
registered or is operating (whichever is stricter). In case that the
jurisdiction has no such laws, regulations, rules and standards or its
laws, regulations, rules and standards are unenforceable, the individual
or the legal entity are required to comply with Core International Labor
Standards.

3. The individual or the legal entity shall not induce or force its
employee(s), whether full-time or part-time, or its independent
contractor(s), in any methods, to agree in oral or written form,
to directly or indirectly restrict, weaken or relinquish his or
her rights or remedies under such laws, regulations, rules and
standards relating to labor and employment as mentioned above,
no matter whether such written or oral agreement are enforceable
under the laws of the said jurisdiction, nor shall such individual
or the legal entity limit, in any methods, the rights of its employee(s)
or independent contractor(s) from reporting or complaining to the copyright
holder or relevant authorities monitoring the compliance of the license
about its violation(s) of the said license.

THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ANY WAY CONNECTION
WITH THE LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE LICENSED WORK.
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# react-minimal-datetime-range
[![npm version](https://badge.fury.io/js/react-minimal-datetime-range.svg)](https://badge.fury.io/js/react-minimal-datetime-range) ![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/react-minimal-datetime-range.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/edwardfhsiao/react-minimal-datetime-range/master/LICENSE)[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)

React verify or password code entering component. Online demo examples.
# <img src="https://raw.githubusercontent.com/edwardfhsiao/react-minimal-datetime-range/master/react-minimal-datetime-range.gif" />
# Online Demo
<a href="https://edwardfhsiao.github.io/react-minimal-datetime-range/">Online demo example</a>

<a href="https://github.com/edwardfhsiao/react-minimal-datetime-range/blob/gh-pages/example/index.js">Demo source code</a>

# Codesandbox Examples
* <a href="https://codesandbox.io/s/index-6hnbf">Examples</a>

### Version of ```16.8.6``` or higher of react and react-dom is required.
```js
"peerDependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
}
```

# Installation
```sh
npm install react-minimal-datetime-range --save
```
# Donation
<a href="https://www.paypal.me/XIAOMENGXIAO/0.99" target="_blank" alt="PayPal Donate">Thanks for donating me a donut!&nbsp;&nbsp;⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄</a>

# Browser support
Tested on IE9+ and Chrome and Safari(10.0.3)

# Docs

|Props | |Type |Description |Default |
|--- |--- |--- |--- | --- |
|initialFocus | Opt | Bool |Options are ['false', 'true'] | false |
|wrapperRef | Req | React Ref | | none |
|codeLength | Req | Number | | 6 |
|id | Req | Str | | random ID |
|onChange | Req | Func | | none |
|type | Opt | Default |Options are ['alphanumeric', 'alpha', 'number']| "alphanumeric" |
|letterCase | Opt | Str |Options are ['upper', 'lower'] | "upper" |
|value | Req | Str | | "" |
|hide | Opt | Bool |Options are ['false', 'true'] | false |
|focusColor | Opt | Str | | "007bff" |
|classNameComponent | Opt | Str | | "" |
|classNameWrapper | Opt | Str | | "" |
|classNameCodeWrapper | Opt | Str | | "" |
|classNameEnteredValue | Opt | Str | | "" |
|classNameCode | Opt | Str | | "" |
|classNameCodeWrapperFocus | Opt | Str | | {} |
|customStyleComponent | Opt | Obj | | {} |
|customStyleWrapper | Opt | Obj | | {} |
|customStyleCodeWrapper | Opt | Obj | | {} |
|customStyleEnteredValue | Opt | Obj | | {} |
|customStyleCode | Opt | Obj | | {} |
|customStyleCodeWrapperFocus | Opt | Obj | | {} |



```js
import ReactCodesInput from 'react-minimal-datetime-range';
import 'react-minimal-datetime-range/lib/react-minimal-datetime-range.min.css';


<ReactCodesInput
initialFocus="" // Opt. Bool. Default false. Options are ['false', 'true'].
wrapperRef="" // Req. React Ref. Default none.
codeLength="" // Req. Number. Default 6.
id="" // Req. Str. Default random ID.
onChange="" // Req. Func. Default none.
type="" // Opt. Str. Default "alphanumeric". Options are ['alphanumeric', 'alpha', 'number'].
letterCase="upper" // Opt. Str. Default "upper". Options are ['upper', 'lower'].
value="" // Req. Str. Default "".
hide={false} // Opt. Bool. Default false. Options are ['false', 'true'].
focusColor="" // Opt. Str. Default "007bff".
classNameComponent="" // Opt. Str. Default "".
classNameWrapper="" // Opt. Str. Default "".
classNameCodeWrapper="" // Opt. Str. Default "".
classNameEnteredValue="" // Opt. Str. Default "".
classNameCode="" // Opt. Str. Default "".
classNameCodeWrapperFocus="" // Opt. Str. Default {}.
customStyleComponent={} // Opt. Obj. Default {}.
customStyleWrapper={} // Opt. Obj. Default {}.
customStyleCodeWrapper={} // Opt. Obj. Default {}.
customStyleEnteredValue={} // Opt. Obj. Default {}.
customStyleCode={} // Opt. Obj. Default {}.
customStyleCodeWrapperFocus={} // Opt. Obj. Default {}.
/>
```

3 changes: 3 additions & 0 deletions eslintignore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
dist/
lib/
Loading

0 comments on commit 94d7a9e

Please sign in to comment.