-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md Update README
- Loading branch information
Sean Kegel
committed
Feb 4, 2017
1 parent
538aaa6
commit 42a423f
Showing
8 changed files
with
94 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log | ||
test/unit/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,70 @@ | ||
# vue-password | ||
|
||
> A Vue.js password input component that includes a toggle to show the password and a strength meter using the Dropbox zxcvbn library. | ||
> A Vue.js password input component that includes a toggle to show the password and a strength meter using the [Dropbox zxcvbn](https://github.com/dropbox/zxcvbn) library. | ||
## Build Setup | ||
## Props | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
Use the following props to configure the password input. | ||
|
||
# serve with hot reload at localhost:8080 | ||
npm run dev | ||
- id | ||
Set the ID of the password input. | ||
Default: 'password' | ||
|
||
# build for production with minification | ||
npm run build | ||
- name | ||
Set the name of the password input. | ||
Default: 'password' | ||
|
||
# build for production and view the bundle analyzer report | ||
npm run build --report | ||
- classes | ||
Set any classes for the password input using a string or array of classes. | ||
Default: 'form-control' | ||
|
||
# run unit tests | ||
npm run unit | ||
- strengthClasses | ||
Set the strength classes using an array of 5 classes. One for each strength | ||
level provided by the zxcvbn library. | ||
|
||
- strengthMessages | ||
Set the strength messages using an array of 5 classes. One for each strength | ||
level provided by the zxcvbn library. | ||
|
||
- minlength | ||
Set the minlength HTML5 validation attribute for the password input. | ||
Default: 8 | ||
|
||
- maxlength | ||
Set the maxlength HTML5 validation attribute for the password input. | ||
Default: 200 | ||
|
||
- pattern | ||
Set the pattern HTML5 validation attribute for the password input. | ||
Default: false | ||
|
||
- required | ||
Set the required HTML5 validation attribute for the password input. | ||
Default: true | ||
|
||
- userInputs | ||
Set any additional strings for improving the strength calculation. For example, add values for username or email fields so if the password contains those items, it will receive a lower strength. [Click here](https://github.com/dropbox/zxcvbn#usage) for more information. | ||
Default: [] | ||
|
||
- disableToggle | ||
Disable the password toggle. | ||
Default: false | ||
|
||
- disableStrength | ||
Disable the password strength check. | ||
Default: false | ||
|
||
## Slots | ||
|
||
Use the following named slots to change the layout of the password toggle, strength meter, and strength messages. | ||
|
||
- password-toggle | ||
Access the toggle function using a scoped slot. | ||
|
||
- strength-meter | ||
Access the strength object using a scoped slot. ([See more information about the strength object](https://github.com/dropbox/zxcvbn#usage)) | ||
|
||
- strength-message | ||
Access the strength object using a scoped slot. ([See more information about the strength object](https://github.com/dropbox/zxcvbn#usage)) | ||
|
||
# run all tests | ||
npm test | ||
``` | ||
|
||
For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Webpack App</title> | ||
</head> | ||
<body> | ||
<script type="text/javascript" src="/vue-password.js"></script></body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.