qlu-20-ui-library 1.7.7 → 1.7.8
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/dist/build/index.css +1 -1
- package/dist/build/qlu-20-ui-library.cjs +1 -1
- package/dist/build/qlu-20-ui-library.js +10 -8
- package/dist/components/InputField/index.d.ts +2 -1
- package/dist/types/components/InputField/index.d.ts +2 -1
- package/dist/types/components/InputField/index.js +2 -2
- package/package.json +1 -1
|
@@ -38755,13 +38755,14 @@ const Gie = ({
|
|
|
38755
38755
|
onChangeHandler: l,
|
|
38756
38756
|
errorMessage: d = "Something went wrong!",
|
|
38757
38757
|
name: f,
|
|
38758
|
-
register: h = (
|
|
38758
|
+
register: h = (y) => ({}),
|
|
38759
38759
|
autoComplete: m = "on",
|
|
38760
38760
|
dataCyInput: v,
|
|
38761
|
-
dataCyToggle: g
|
|
38761
|
+
dataCyToggle: g,
|
|
38762
|
+
inputFieldClassname: w
|
|
38762
38763
|
}) => {
|
|
38763
|
-
const [
|
|
38764
|
-
|
|
38764
|
+
const [y, A] = ze(!1), S = () => {
|
|
38765
|
+
A((C) => !C);
|
|
38765
38766
|
};
|
|
38766
38767
|
return /* @__PURE__ */ c.jsxs("div", { className: "parent-inputfiled", children: [
|
|
38767
38768
|
/* @__PURE__ */ c.jsxs("div", { className: `inputFieldGeneric ${o && "errorInputField"}`, children: [
|
|
@@ -38769,7 +38770,7 @@ const Gie = ({
|
|
|
38769
38770
|
"input",
|
|
38770
38771
|
{
|
|
38771
38772
|
id: e,
|
|
38772
|
-
type:
|
|
38773
|
+
type: y ? "text" : n,
|
|
38773
38774
|
disabled: i,
|
|
38774
38775
|
style: a,
|
|
38775
38776
|
placeholder: r,
|
|
@@ -38779,16 +38780,17 @@ const Gie = ({
|
|
|
38779
38780
|
...h(f),
|
|
38780
38781
|
...s,
|
|
38781
38782
|
autoComplete: m,
|
|
38782
|
-
"data-cy": v
|
|
38783
|
+
"data-cy": v,
|
|
38784
|
+
className: w
|
|
38783
38785
|
}
|
|
38784
38786
|
),
|
|
38785
38787
|
n === "password" && /* @__PURE__ */ c.jsx(
|
|
38786
38788
|
"span",
|
|
38787
38789
|
{
|
|
38788
38790
|
className: "passwordToggle",
|
|
38789
|
-
onClick:
|
|
38791
|
+
onClick: S,
|
|
38790
38792
|
"data-cy": g,
|
|
38791
|
-
children:
|
|
38793
|
+
children: y ? /* @__PURE__ */ c.jsx(He, { iconType: "eye", iconSize: "16" }) : /* @__PURE__ */ c.jsx(He, { iconType: "eyeOff", iconSize: "16" })
|
|
38792
38794
|
}
|
|
38793
38795
|
)
|
|
38794
38796
|
] }),
|
|
@@ -15,6 +15,7 @@ interface InputFieldProps {
|
|
|
15
15
|
autoComplete?: string;
|
|
16
16
|
dataCyInput?: string;
|
|
17
17
|
dataCyToggle?: string;
|
|
18
|
+
inputFieldClassname?: string;
|
|
18
19
|
}
|
|
19
|
-
declare const InputField: ({ id, value, type, placeholder, style, disabled, errorState, props, onChangeHandler, errorMessage, name, register, autoComplete, dataCyInput, dataCyToggle, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const InputField: ({ id, value, type, placeholder, style, disabled, errorState, props, onChangeHandler, errorMessage, name, register, autoComplete, dataCyInput, dataCyToggle, inputFieldClassname, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export default InputField;
|
|
@@ -16,6 +16,7 @@ interface InputFieldProps {
|
|
|
16
16
|
autoComplete?: string;
|
|
17
17
|
dataCyInput?: string;
|
|
18
18
|
dataCyToggle?: string;
|
|
19
|
+
inputFieldClassname?: string;
|
|
19
20
|
}
|
|
20
|
-
declare const InputField: ({ id, value, type, placeholder, style, disabled, errorState, props, onChangeHandler, errorMessage, name, register, autoComplete, dataCyInput, dataCyToggle, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const InputField: ({ id, value, type, placeholder, style, disabled, errorState, props, onChangeHandler, errorMessage, name, register, autoComplete, dataCyInput, dataCyToggle, inputFieldClassname, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export default InputField;
|
|
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import "./style.scss";
|
|
4
4
|
import GetSvgIcon from "../GetSvgIcon";
|
|
5
|
-
const InputField = ({ id, value, type = "text", placeholder = "", style = {}, disabled = false, errorState = false, props = {}, onChangeHandler, errorMessage = "Something went wrong!", name, register = (_prop) => ({}), autoComplete = "on", dataCyInput, dataCyToggle, }) => {
|
|
5
|
+
const InputField = ({ id, value, type = "text", placeholder = "", style = {}, disabled = false, errorState = false, props = {}, onChangeHandler, errorMessage = "Something went wrong!", name, register = (_prop) => ({}), autoComplete = "on", dataCyInput, dataCyToggle, inputFieldClassname, }) => {
|
|
6
6
|
const [showPassword, setShowPassword] = useState(false);
|
|
7
7
|
const togglePasswordVisibility = () => {
|
|
8
8
|
setShowPassword((prevShowPassword) => !prevShowPassword);
|
|
9
9
|
};
|
|
10
|
-
return (_jsxs("div", { className: "parent-inputfiled", children: [_jsxs("div", { className: `inputFieldGeneric ${errorState && "errorInputField"}`, children: [_jsx("input", { id: id, type: showPassword ? "text" : type, disabled: disabled, style: style, placeholder: placeholder, value: value, onChange: onChangeHandler, name: name, ...register(name), ...props, autoComplete: autoComplete, "data-cy": dataCyInput }), type === "password" && (_jsx("span", { className: "passwordToggle", onClick: togglePasswordVisibility, "data-cy": dataCyToggle, children: showPassword ? (_jsx(GetSvgIcon, { iconType: "eye", iconSize: "
|
|
10
|
+
return (_jsxs("div", { className: "parent-inputfiled", children: [_jsxs("div", { className: `inputFieldGeneric ${errorState && "errorInputField"}`, children: [_jsx("input", { id: id, type: showPassword ? "text" : type, disabled: disabled, style: style, placeholder: placeholder, value: value, onChange: onChangeHandler, name: name, ...register(name), ...props, autoComplete: autoComplete, "data-cy": dataCyInput, className: inputFieldClassname }), type === "password" && (_jsx("span", { className: "passwordToggle", onClick: togglePasswordVisibility, "data-cy": dataCyToggle, children: showPassword ? (_jsx(GetSvgIcon, { iconType: "eye", iconSize: "16" })) : (_jsx(GetSvgIcon, { iconType: "eyeOff", iconSize: "16" })) }))] }), errorState && _jsx("span", { children: errorMessage })] }));
|
|
11
11
|
};
|
|
12
12
|
export default InputField;
|