@typeolymp/ui-components 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -516,13 +516,11 @@ var PasswordInput = function (props) {
|
|
|
516
516
|
props.onChange(value_1);
|
|
517
517
|
}
|
|
518
518
|
};
|
|
519
|
-
var
|
|
520
|
-
if (props.
|
|
521
|
-
props.
|
|
519
|
+
var onKeyPress = function (e) {
|
|
520
|
+
if (props.onKeyPress)
|
|
521
|
+
props.onKeyPress(e);
|
|
522
522
|
};
|
|
523
|
-
return (jsxRuntime.jsxs(PasswordInputWrapper, __assign({ disabled: props.disabled }, { children: [jsxRuntime.jsx(Icon, { type: isVisible ? "eyeInvisible" : "eye", color: "gray", size: "small", onClick: toggle }, void 0), jsxRuntime.jsx(StyledInput, __assign({ type: isVisible ? "text" : "password" }, props, { value: value, onChange: onChange, onKeyPress:
|
|
524
|
-
return e.key === "Enter" ? onKeyPressEnter() : null;
|
|
525
|
-
} }), void 0)] }), void 0));
|
|
523
|
+
return (jsxRuntime.jsxs(PasswordInputWrapper, __assign({ disabled: props.disabled }, { children: [jsxRuntime.jsx(Icon, { type: isVisible ? "eyeInvisible" : "eye", color: "gray", size: "small", onClick: toggle }, void 0), jsxRuntime.jsx(StyledInput, __assign({ type: isVisible ? "text" : "password" }, props, { value: value, onChange: onChange, onKeyPress: onKeyPress }), void 0)] }), void 0));
|
|
526
524
|
};
|
|
527
525
|
|
|
528
526
|
var Input = function (props) {
|
|
@@ -1057,15 +1055,16 @@ var PasswordInputField = function (props) {
|
|
|
1057
1055
|
if (props.onChange)
|
|
1058
1056
|
props.onChange(props.name, value);
|
|
1059
1057
|
};
|
|
1060
|
-
var
|
|
1061
|
-
if (props.onKeyPressEnter)
|
|
1058
|
+
var onKeyPress = function (e) {
|
|
1059
|
+
if (e.key === "Enter" && props.onKeyPressEnter) {
|
|
1062
1060
|
props.onKeyPressEnter();
|
|
1061
|
+
}
|
|
1063
1062
|
};
|
|
1064
1063
|
var onBlur = function () {
|
|
1065
1064
|
if (props.onBlur)
|
|
1066
1065
|
props.onBlur(props.name);
|
|
1067
1066
|
};
|
|
1068
|
-
return (jsxRuntime.jsxs(Container$4, { children: [jsxRuntime.jsx(Label$3, __assign({ as: "label", htmlFor: props.name }, { children: props.label }), void 0), jsxRuntime.jsx(Spacer, { vertical: 5 }, void 0), jsxRuntime.jsx(Input.Password, { initialValue: props.initialValue, autocomplete: props.autocomplete, autoFocus: props.autoFocus, disabled: props.disabled, placeholder: props.placeholder, id: props.name, onChange: onChange,
|
|
1067
|
+
return (jsxRuntime.jsxs(Container$4, { children: [jsxRuntime.jsx(Label$3, __assign({ as: "label", htmlFor: props.name }, { children: props.label }), void 0), jsxRuntime.jsx(Spacer, { vertical: 5 }, void 0), jsxRuntime.jsx(Input.Password, { initialValue: props.initialValue, autocomplete: props.autocomplete, autoFocus: props.autoFocus, disabled: props.disabled, placeholder: props.placeholder, id: props.name, onChange: onChange, onKeyPress: onKeyPress, onBlur: onBlur }, void 0)] }, void 0));
|
|
1069
1068
|
};
|
|
1070
1069
|
|
|
1071
1070
|
var generateRandomString = function (length) {
|