Skip to content

Commit 6beca0a

Browse files
committed
:initial commit
1 parent 41a26f8 commit 6beca0a

22 files changed

+3004
-1
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
dist/
3+
node_modules/
4+
.snapshots/
5+
*.min.js

.eslintrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": [
4+
"standard",
5+
"standard-react",
6+
"plugin:prettier/recommended",
7+
"prettier/standard",
8+
"prettier/react"
9+
],
10+
"env": {
11+
"node": true
12+
},
13+
"parserOptions": {
14+
"ecmaVersion": 2020,
15+
"ecmaFeatures": {
16+
"legacyDecorators": true,
17+
"jsx": true
18+
}
19+
},
20+
"settings": {
21+
"react": {
22+
"version": "16"
23+
}
24+
},
25+
"rules": {
26+
"space-before-function-paren": 0,
27+
"react/prop-types": 0,
28+
"react/jsx-handler-names": 0,
29+
"react/jsx-fragments": 0,
30+
"react/no-unused-prop-types": 0,
31+
"import/export": 0
32+
}
33+
}

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# OS Files
2+
.DS_Store
3+
Thumbs.db
4+
5+
# Dependencies
6+
node_modules/
7+
8+
# Dev/Build Artifacts
9+
/tests/e2e/videos/
10+
/tests/e2e/screenshots/
11+
/tests/unit/coverage/
12+
jsconfig.json
13+
14+
# Local Env Files
15+
.env.local
16+
.env.*.local
17+
18+
# Log Files
19+
*.log
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# Unconfigured Editors
25+
.idea
26+
*.suo
27+
*.ntvs*
28+
*.njsproj
29+
*.sln
30+
*.sw*
31+
#Yarn
32+
yarn.lock

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"singleQuote": true,
3+
"jsxSingleQuote": true,
4+
"semi": false,
5+
"tabWidth": 2,
6+
"bracketSpacing": true,
7+
"jsxBracketSameLine": false,
8+
"arrowParens": "always",
9+
"trailingComma": "none"
10+
}

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- 12
4+
- 10

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1.0.0 (JULY 23, 2020)
2+
Initial release

README.md

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,134 @@
1-
# ReactJS-Password-Input
1+
# ReactJS - Password Input
2+
3+
ReactJS based Password component to add password as a text/password property with validation. The password value is automatically validated on blur event. You can also disable and hide password field using disable and hide props.
4+
5+
## Table of contents
6+
7+
- [Browser Support](#browser-support)
8+
- [Demo](#demo)
9+
- [Getting started](#getting-started)
10+
- [Usage](#usage)
11+
- [Available Props](#available-props)
12+
- [Methods](#methods)
13+
- [Want to Contribute?](#want-to-contribute)
14+
- [Collection of Components](#collection-of-components)
15+
- [Changelog](#changelog)
16+
- [License](#license)
17+
- [Keywords](#Keywords)
18+
19+
## Browser Support
20+
21+
| ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
22+
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
23+
| 83.0 ✔ | 77.0 ✔ | 13.1.1 ✔ | 83.0 ✔ | 11.9 ✔ |
24+
25+
## Demo
26+
27+
[![](password.gif)](https://github.com/weblineindia/ReactJS-Password-Input/password.gif)
28+
29+
## Getting started
30+
31+
Install the npm package:
32+
33+
```bash
34+
npm install react-weblineindia-password
35+
#OR
36+
yarn add react-weblineindia-password
37+
```
38+
39+
## Usage
40+
41+
Use the `<react-weblineindia-password>` component:
42+
43+
```js
44+
import React ,{ Component } from 'react';
45+
import Password from 'react-weblineindia-password'
46+
47+
class Test extends Component {
48+
constructor(props) {
49+
super(props);
50+
this.state = {
51+
vData: "",
52+
isShowPassword:false
53+
};
54+
// This method is used for handle password input value
55+
onChange(event){
56+
this.setState({
57+
vData : event.target.value
58+
})
59+
}
60+
render(){
61+
return (
62+
<div>
63+
<Password
64+
id="password"
65+
name="password"
66+
value ={this.state.vData}
67+
onChange={this.onChange}
68+
placeholder ="Password"
69+
isViewPassword={this.state.isShowPassword}
70+
onChange={this.onChange.bind(this)}
71+
/>
72+
</div>
73+
)}
74+
}
75+
```
76+
77+
## Available Props
78+
79+
| Prop | Type | default | Description |
80+
| ---------------- | ------- | ------------------------------------------------ | -------------------------------- |
81+
| maxlength | Number | 255 | max length for password |
82+
| passwordErrorMsg | String | The password field must be at least 3 characters | error Msg for password |
83+
| placeholder | String | password | password placeholder |
84+
| disabled | Boolean | false | disable password field |
85+
| name | String | password | name for password field |
86+
| tabindex | Number | 1 | password tabIndex |
87+
| id | String | password | name for password field |
88+
| hide | Boolean | false | for hide password field |
89+
| isViewPassword | Boolean | true | To hide/show eye icon |
90+
| value | String | | value for password |
91+
| hide | Boolean | false | for hide password field |
92+
| passwordMinValue | Number | 3 | For password field minimum value |
93+
| classname | object | | Class to the input |
94+
95+
## Methods
96+
97+
| Name | Description |
98+
| ---------- | ---------------------------------------------------------------- |
99+
| onFocus | Gets triggered when the autocomplete input field receives focus. |
100+
| onBlur | Gets triggered when the autocomplete input field loses focus. |
101+
| onChange | Gets triggered when the autocomplete results got changed. |
102+
| onKeypress | Gets triggered when a key gets pressed. |
103+
| onKeyDown | Gets triggered when a key gets down. |
104+
| onKeyUp | Gets triggered when a key gets up. |
105+
106+
## Want to Contribute?
107+
108+
- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
109+
- [Fork it](http://help.github.com/forking/).
110+
- Create new branch to contribute your changes.
111+
- Commit all your changes to your branch.
112+
- Submit a [pull request](http://help.github.com/pull-requests/).
113+
114+
---
115+
116+
## Collection of Components
117+
118+
We have built many other components and free resources for software development in various programming languages. Kindly click here to view our [Free Resources for Software Development](https://www.weblineindia.com/software-development-resources.html)
119+
120+
---
121+
122+
## Changelog
123+
124+
Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).
125+
126+
## License
127+
128+
[MIT](LICENSE)
129+
130+
[mit]: https://github.com/weblineindia/ReactJS-Password-Input/blob/master/LICENSE
131+
132+
## Keywords
133+
134+
react-weblineindia-password, password-input, reactjs-password, react-password-input, react-password, react-input-field, input-field

dist/index.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@import url('https://use.fontawesome.com/releases/v5.0.8/css/all.css');
2+
3+
._style__form-control__2LI2p {
4+
width: 50%;
5+
padding: 12px 20px;
6+
margin: 8px 0;
7+
display: inline-block;
8+
border: 1px solid #ccc;
9+
box-sizing: border-box;
10+
}
11+
12+
._style__error-text__1-kWi{
13+
color: red;
14+
}

0 commit comments

Comments
 (0)