@createnl/secure-password-input
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -10,4 +10,4 @@ import React from 'react'; | ||
const IconComponent = icons[name] ? icons[name] : null; | ||
return IconComponent ? React.createElement(IconComponent, { className: className }) : null; | ||
return IconComponent ? React.createElement(IconComponent, { className: `spi-icon ${className}` }) : null; | ||
}; | ||
export default Icon; |
import React from 'react'; | ||
const IconVisibilityOff = ({ className = '' }) => (React.createElement("svg", { viewBox: "0 0 283.7 245", className: `spi-icon ${className}` }, | ||
const IconVisibilityOff = ({ className = '' }) => (React.createElement("svg", { viewBox: "0 0 283.7 245", className: className }, | ||
React.createElement("path", { d: "M141.8,51.6c35.6,0,64.5,28.9,64.5,64.5c0,8.3-1.7,16.2-4.6,23.5l37.8,37.8c19.3-16.1,34.8-37.3,44.2-61.2c-22.3-56.6-77.4-96.7-141.8-96.7c-18.1,0-35.3,3.2-51.6,9l28,27.7C125.6,53.3,133.4,51.6,141.8,51.6z" }), | ||
@@ -4,0 +4,0 @@ React.createElement("path", { d: "M139.6,77.4l40.9,40.7c0-0.6,0-1.4,0-2.1c0-21.4-17.3-38.7-38.7-38.7C141.1,77.4,140.4,77.4,139.6,77.4" }), |
import React from 'react'; | ||
const IconVisibilityOn = ({ className = '' }) => (React.createElement("svg", { viewBox: "0 0 283.7 193.4", className: `spi-icon ${className}` }, | ||
const IconVisibilityOn = ({ className = '' }) => (React.createElement("svg", { viewBox: "0 0 283.7 193.4", className: className }, | ||
React.createElement("circle", { cx: "141.8", cy: "96.7", r: "38.7" }), | ||
React.createElement("path", { d: "M141.8,0C77.4,0,22.3,40.1,0,96.7c22.3,56.6,77.4,96.7,141.8,96.7s119.5-40.1,141.8-96.7C261.4,40.1,206.3,0,141.8,0z M141.8,161.2c-35.6,0-64.5-28.9-64.5-64.5c0-35.6,28.9-64.5,64.5-64.5s64.5,28.9,64.5,64.5C206.3,132.3,177.4,161.2,141.8,161.2z" }))); | ||
export default IconVisibilityOn; |
@@ -10,9 +10,9 @@ import React, { forwardRef, useState, } from 'react'; | ||
}; | ||
return (React.createElement("label", { "aria-label": hideLabel ? label : undefined, className: `spi-password-input ${className}` }, | ||
!hideLabel && (React.createElement(InputLabel, { text: label, className: "spi-password-input__label custom-spi__label" })), | ||
React.createElement("div", { className: "spi-password-input__field-container" }, | ||
React.createElement(Input, Object.assign({}, inputProps, { ref: ref, type: passwordIsVisible ? 'text' : 'password', tabIndex: tabIndex, disabled: disabled, onChange: handleChange, className: "spi-password-input__field custom-spi__input" })), | ||
React.createElement(Button, { text: passwordIsVisible ? 'Verberg wachtwoord' : 'Toon wachtwoord', tabIndex: tabIndex, disabled: disabled, onClick: toggleVisibility, className: "spi-password-input__visibility-button custom-spi__button" }, | ||
React.createElement(Icon, { name: `visibility-${passwordIsVisible ? 'on' : 'off'}`, className: "spi-password-input__visibility-icon custom-spi__button-icon" }))))); | ||
return (React.createElement("label", { "aria-label": hideLabel ? label : undefined, className: className }, | ||
!hideLabel && (React.createElement(InputLabel, { text: label, className: "custom-spi__label" })), | ||
React.createElement("div", { className: "spi__field-container" }, | ||
React.createElement(Input, Object.assign({}, inputProps, { ref: ref, type: passwordIsVisible ? 'text' : 'password', tabIndex: tabIndex, disabled: disabled, onChange: handleChange, className: "custom-spi__input" })), | ||
React.createElement(Button, { text: passwordIsVisible ? 'Verberg wachtwoord' : 'Toon wachtwoord', tabIndex: tabIndex, disabled: disabled, onClick: toggleVisibility, className: "custom-spi__button" }, | ||
React.createElement(Icon, { name: `visibility-${passwordIsVisible ? 'on' : 'off'}`, className: "custom-spi__button-icon" }))))); | ||
}); | ||
export default PasswordInput; |
@@ -22,5 +22,5 @@ import React, { forwardRef, useState, } from 'react'; | ||
}; | ||
return (React.createElement("div", { className: `spi-secure-password-input ${className}` }, | ||
return (React.createElement("div", { className: `spi ${className}` }, | ||
React.createElement(PasswordInput, Object.assign({}, inputProps, { ref: ref, minLength: minimumLength, onChange: handleChange })), | ||
adviceLinkText && adviceLinkURL && (React.createElement("a", { href: adviceLinkURL, target: "_blank", rel: "noopener noreferrer", className: "spi-secure-password-input__advice-link custom-spi__advice-link" }, adviceLinkText)), | ||
adviceLinkText && adviceLinkURL && (React.createElement("a", { href: adviceLinkURL, target: "_blank", rel: "noopener noreferrer", className: "spi__advice-link custom-spi__advice-link" }, adviceLinkText)), | ||
password && React.createElement(SecurePasswordMeter, { strength: strength }), | ||
@@ -27,0 +27,0 @@ password && React.createElement(SecurePasswordFeedback, { warning: warning, suggestions: suggestions }))); |
import React from 'react'; | ||
const SecurePasswordFeedback = ({ warning, suggestions }) => (React.createElement("div", { className: "spi-secure-password-input__feedback" }, | ||
warning && (React.createElement("p", { className: "spi-secure-password-input__warning custom-spi__warning" }, | ||
const SecurePasswordFeedback = ({ warning, suggestions }) => (React.createElement("div", null, | ||
warning && (React.createElement("p", { className: "custom-spi__warning" }, | ||
React.createElement("strong", null, warning))), | ||
suggestions && (React.createElement("ul", { className: "spi-secure-password-input__suggestion-list custom-spi__suggestion-list" }, suggestions.map(suggestion => (React.createElement("li", { key: suggestion, className: "spi-secure-password-input__suggestion custom-spi__suggestion" }, suggestion))))))); | ||
suggestions && (React.createElement("ul", { className: "custom-spi__suggestion-list" }, suggestions.map(suggestion => (React.createElement("li", { key: suggestion, className: "custom-spi__suggestion" }, suggestion))))))); | ||
export default SecurePasswordFeedback; |
@@ -6,5 +6,5 @@ import React from 'react'; | ||
return (React.createElement(React.Fragment, null, | ||
React.createElement("p", { className: "spi-secure-password-input__strength-label custom-spi__strength-label" }, strengthFeedback), | ||
React.createElement("meter", { min: 0, max: 4, value: strength, className: "spi-secure-password-input__strength-meter custom-spi__strength-meter" }))); | ||
React.createElement("p", { className: "custom-spi__strength-label" }, strengthFeedback), | ||
React.createElement("meter", { min: 0, max: 4, value: strength, className: "spi__strength-meter custom-spi__strength-meter" }))); | ||
}; | ||
export default SecurePasswordMeter; |
{ | ||
"name": "@createnl/secure-password-input", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A password input that provides user with rating and advice on how secure their password is, based on ZXCVBN", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83818
1713