react-password-strength
Advanced tools
+1
-1
| { | ||
| "name": "react-password-strength", | ||
| "version": "2.3.1", | ||
| "version": "2.4.0", | ||
| "engines": { | ||
@@ -5,0 +5,0 @@ "node": ">6.11.1" |
+13
-10
@@ -5,5 +5,5 @@ # React Password Strength  | ||
| _NOTE: zxcvbn is a large library it's recommended you split the codebase to manage bundle size._ | ||
| _Note: zxcvbn is a large library it's recommended you split the codebase to manage bundle size._ | ||
| [Try it live!](https://mmw.github.io/react-password-strength/) | ||
| [Try it live!](https://reactpasswordstrength.netlify.com) | ||
@@ -18,5 +18,3 @@ ## Install in your project | ||
| - `npm install` | ||
| - `npm start` | ||
| - open [http://localhost:8080/](http://localhost:8080/) | ||
| See the [example repo](https://github.com/mmw/react-password-strength-example) | ||
@@ -45,5 +43,5 @@ ## Using the tool | ||
| Using in a Universal JS App (server-side rendering): | ||
| - `import ReactPasswordStrength from 'react-password-strength/dist/universal';` | ||
| - Include default styling from `react-password-strength/dist/style.css`. | ||
| Using in a __Universal JS App__ (server-side rendering): | ||
| - Import component from `react-password-strength/dist/universal` | ||
| - Include default style from `react-password-strength/dist/style.css`. | ||
@@ -89,3 +87,3 @@ ### Props | ||
| - Protected props: `className`, `onChange`, `ref`, `value` | ||
| - Passing in `className` will amend to the existing classes | ||
| - Passing in `className` will append to the existing classes | ||
| - The remaining props will be ignored | ||
@@ -101,5 +99,10 @@ | ||
| #### namespaceClassName (Default: 'ReactPasswordStrength') | ||
| - Used to control the CSS class namespace. CSS classes created by RPS will be prepended with this string. | ||
| - If you change this prop you have to provide all CSS and it's recommended to import RSP from the universal JS build (`react-password-strength/dist/universal`) | ||
| ### Classes | ||
| _All styling is applied with CSS classes to allow custom styling and overriding._ | ||
| _All styling is applied with CSS classes to allow custom styling and overriding. Note that if you change the `namespaceClassName` prop the below classnames will be affected._ | ||
| - `ReactPasswordStrength` - namespace class and component wrapper | ||
@@ -106,0 +109,0 @@ - `is-strength-{0-4}` - modifier class indicating password strength |
+10
-7
@@ -17,2 +17,3 @@ import './style.css'; | ||
| minScore: PropTypes.number, | ||
| namespaceClassName: PropTypes.string, | ||
| scoreWords: PropTypes.array, | ||
@@ -30,2 +31,3 @@ style: PropTypes.object, | ||
| minScore: 2, | ||
| namespaceClassName: 'ReactPasswordStrength', | ||
| scoreWords: ['weak', 'weak', 'okay', 'good', 'strong'], | ||
@@ -94,13 +96,14 @@ tooShortWord: 'too short', | ||
| const { | ||
| className, | ||
| inputProps, | ||
| minLength, | ||
| namespaceClassName, | ||
| scoreWords, | ||
| inputProps, | ||
| className, | ||
| style, | ||
| tooShortWord, | ||
| minLength, | ||
| } = this.props; | ||
| const inputClasses = [ 'ReactPasswordStrength-input' ]; | ||
| const inputClasses = [ `${namespaceClassName}-input` ]; | ||
| const wrapperClasses = [ | ||
| 'ReactPasswordStrength', | ||
| namespaceClassName, | ||
| className ? className : '', | ||
@@ -136,4 +139,4 @@ password.length > 0 ? `is-strength-${score}` : '', | ||
| <div className="ReactPasswordStrength-strength-bar" /> | ||
| <span className="ReactPasswordStrength-strength-desc">{strengthDesc}</span> | ||
| <div className={`${namespaceClassName}-strength-bar`} /> | ||
| <span className={`${namespaceClassName}-strength-desc`}>{strengthDesc}</span> | ||
| </div> | ||
@@ -140,0 +143,0 @@ ); |
Sorry, the diff of this file is not supported yet
-33
| # v1.2.1 | ||
| * fix bad npm publish | ||
| # v1.2.0 | ||
| * ac90c9a Changes to support use in universal apps (fixes #29) (#31) | ||
| * 77398d0 "Warning: Accessing PropTypes via the main React package is deprecated" fixed (#35) | ||
| * 274d6e8 Convert autocomplete to camelcase (#34) | ||
| * cfa2dcd Update README.md | ||
| # v1.1.0 | ||
| * e0b6c3d move testing deps to devDependencies (#26) | ||
| * 7e9dacd Pass props to container (#25) | ||
| * dba4a52 update with correct uuid (#23) | ||
| * 4cc429d Add unit testing (#22) | ||
| * e77de4b Cleanup update (#20) | ||
| * a8dd38e Expose clear fn (#19) | ||
| * d53d124 changeCallback should be invoked after setState finishes (#17) | ||
| * 4aaa690 Improve initial state (#16) | ||
| * 13e58d1 update example build (#15) | ||
| # v1.0.0 | ||
| * 57fd6a1 Fix overwrite ref bug (#14) | ||
| * 1f3bb2e Publish example (#13) | ||
| * 455a895 update README (#12) | ||
| * 5a5103b Update readme (#10) | ||
| * f3195e9 update to v0.6.0 (#9) | ||
| * 0b449ae Design update (#8) | ||
| * 59a5e74 Integrate zxcvbn (#7) | ||
| * 8e91cef Min length support (#4) | ||
| * 243d723 cleanup for neater npm publishing (#3) | ||
| * 801f55b add styling and scaffolding for score support (#2) | ||
| * da53e52 initial component (#1) | ||
| * 5f0c8cc Initial commit |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
12795
0.07%116
2.65%1828605
-0.02%14
-12.5%209
0.48%3
50%