qlu-20-ui-library 1.7.77 → 1.7.78
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 +71 -71
- package/dist/build/qlu-20-ui-library.js +6215 -6030
- package/dist/components/InputFieldForm/InputFieldForm.d.ts +20 -0
- package/dist/components/InputFieldForm/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/types/components/InputFieldForm/InputFieldForm.d.ts +20 -0
- package/dist/types/components/InputFieldForm/InputFieldForm.js +17 -0
- package/dist/types/components/InputFieldForm/index.d.ts +2 -0
- package/dist/types/components/InputFieldForm/index.js +2 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type InputFieldFormProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
type: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
style?: object;
|
|
9
|
+
errorState: boolean;
|
|
10
|
+
errorMessage: string;
|
|
11
|
+
props?: object;
|
|
12
|
+
onChangeHandler: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
name?: string;
|
|
14
|
+
autoComplete?: string;
|
|
15
|
+
dataCyInput?: string;
|
|
16
|
+
dataCyToggle?: string;
|
|
17
|
+
inputFieldClassname?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const InputFieldForm: ({ id, value, type, placeholder, style, disabled, errorState, props, onChangeHandler, errorMessage, name, autoComplete, dataCyInput, dataCyToggle, inputFieldClassname, }: InputFieldFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default InputFieldForm;
|
|
@@ -176,6 +176,7 @@ export { default as CreditUsageChart } from "./CreditUsageChart";
|
|
|
176
176
|
export { default as CreditManagementDropdownButton } from "./CreditsManagementDropdownButton/CreditsManagementDropdownButton";
|
|
177
177
|
export { default as CreditManagementDropdownItem } from "./CreditsManagementDropdownButton/CreditsManagementDropdownButton/CreditsManagementDropdownItem";
|
|
178
178
|
export { default as CreditManagementDatePicker } from "./CreditsManagementDropdownButton/CreditsManagementDatePicker";
|
|
179
|
+
export { default as InputFieldForm } from "./InputFieldForm";
|
|
179
180
|
export { default as MultiChart } from "./CompanyView/CompanyViewFinancialSummary/MultiChart/";
|
|
180
181
|
export { default as FileUpload } from "./FileUpload";
|
|
181
182
|
export { default as TopNavbar } from "./TopNavbar";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type InputFieldFormProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
type: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
style?: object;
|
|
9
|
+
errorState: boolean;
|
|
10
|
+
errorMessage: string;
|
|
11
|
+
props?: object;
|
|
12
|
+
onChangeHandler: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
name?: string;
|
|
14
|
+
autoComplete?: string;
|
|
15
|
+
dataCyInput?: string;
|
|
16
|
+
dataCyToggle?: string;
|
|
17
|
+
inputFieldClassname?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const InputFieldForm: ({ id, value, type, placeholder, style, disabled, errorState, props, onChangeHandler, errorMessage, name, autoComplete, dataCyInput, dataCyToggle, inputFieldClassname, }: InputFieldFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default InputFieldForm;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import GetSvgIcon from "../GetSvgIcon";
|
|
4
|
+
import styles from "./styles.module.scss";
|
|
5
|
+
import { clsx } from "../../utils";
|
|
6
|
+
const InputFieldForm = ({ id, value, type = "text", placeholder = "", style = {}, disabled = false, errorState = false, props = {}, onChangeHandler, errorMessage = "Something went wrong!", name, autoComplete = "on", dataCyInput, dataCyToggle, inputFieldClassname, }) => {
|
|
7
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
8
|
+
const togglePasswordVisibility = () => {
|
|
9
|
+
setShowPassword((prevShowPassword) => !prevShowPassword);
|
|
10
|
+
};
|
|
11
|
+
const inputFieldClass = clsx({
|
|
12
|
+
[styles.inputFieldGeneric]: true,
|
|
13
|
+
[styles.errorInputField]: errorState,
|
|
14
|
+
});
|
|
15
|
+
return (_jsxs("div", { className: styles.parentInputfield, children: [_jsxs("div", { className: inputFieldClass, children: [_jsx("input", { id: id, type: showPassword ? "text" : type, disabled: disabled, style: style, placeholder: placeholder, value: value, onChange: onChangeHandler, name: name, ...props, autoComplete: autoComplete, "data-cy": dataCyInput, className: inputFieldClassname }), type === "password" && (_jsx("span", { className: styles.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 })] }));
|
|
16
|
+
};
|
|
17
|
+
export default InputFieldForm;
|
|
@@ -176,6 +176,7 @@ export { default as CreditUsageChart } from "./CreditUsageChart";
|
|
|
176
176
|
export { default as CreditManagementDropdownButton } from "./CreditsManagementDropdownButton/CreditsManagementDropdownButton";
|
|
177
177
|
export { default as CreditManagementDropdownItem } from "./CreditsManagementDropdownButton/CreditsManagementDropdownButton/CreditsManagementDropdownItem";
|
|
178
178
|
export { default as CreditManagementDatePicker } from "./CreditsManagementDropdownButton/CreditsManagementDatePicker";
|
|
179
|
+
export { default as InputFieldForm } from "./InputFieldForm";
|
|
179
180
|
export { default as MultiChart } from "./CompanyView/CompanyViewFinancialSummary/MultiChart/";
|
|
180
181
|
export { default as FileUpload } from "./FileUpload";
|
|
181
182
|
export { default as TopNavbar } from "./TopNavbar";
|
|
@@ -176,6 +176,7 @@ export { default as CreditUsageChart } from "./CreditUsageChart";
|
|
|
176
176
|
export { default as CreditManagementDropdownButton } from "./CreditsManagementDropdownButton/CreditsManagementDropdownButton";
|
|
177
177
|
export { default as CreditManagementDropdownItem } from "./CreditsManagementDropdownButton/CreditsManagementDropdownButton/CreditsManagementDropdownItem";
|
|
178
178
|
export { default as CreditManagementDatePicker } from "./CreditsManagementDropdownButton/CreditsManagementDatePicker";
|
|
179
|
+
export { default as InputFieldForm } from "./InputFieldForm";
|
|
179
180
|
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
|
180
181
|
// UNUSED
|
|
181
182
|
export { default as MultiChart } from "./CompanyView/CompanyViewFinancialSummary/MultiChart/";
|