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,EAAe,wBAA0B,mBAClKiB,QAAShB,IAIZjB,GACC,GAAA2B,EAAAC,GAAA,EAACC,MAAAA,CACCzB,UAAW,GAA+B2B,MAAA,CAA5BD,IAAAA,iBAAwB,CAAC,KAAmDC,MAAA,CAAhD,EAA6C,GAArCD,GAAAA,CAAAA,2BAAkC,WAEpF,GAAAH,EAAAC,GAAA,EAACmB,IAAAA,CAAE3C,UAAU,qCAKlBnB,GACCyB,GACA,CAAC,CAACvB,GACD6D,CAAAA,MAAMC,OAAO,CAAC9D,GACbA,EAAa+D,GAAG,CAAC,CAACC,EAAOJ,IACvB,GAAApB,EAAAK,IAAA,EAACoB,OAAAA,CACChD,UAAW0B,GAAAA,CAAAA,yBAAgC,WAE5C,IACGqB,IAFG,iBAAmBpB,MAAA,CAAFgB,KAM1B,GAAApB,EAAAK,IAAA,EAACoB,OAAAA,CAAKhD,UAAW0B,GAAAA,CAAAA,yBAAgC,WAAE,IAC/C3C,MAIPoB,SAAAA,GACC,GAAAoB,EAAAK,IAAA,EAAAL,EAAA8B,QAAA,YACE,GAAA9B,EAAAC,GAAA,EAACC,MAAAA,CAAIzB,UAAW0B,IAAAA,gBAAuB,UAAG9C,MAAAA,EAAAA,KAAAA,EAAAA,EAAOoD,KAAK,GACtD,GAAAT,EAAAC,GAAA,EAACC,MAAAA,CACCzB,UAAW,GAA8B0B,MAAAA,CAA3BA,IAAAA,gBAAuB,CAAC,KAAqCC,MAAA,CAAlCD,GAAAA,CAAAA,0BAAiC,WAEzE9C,MAAAA,EAAAA,KAAAA,EAAAA,EAAO4D,GAAG,QAMvB,EDxYSc,CAAAA,EAAAA,EAAAA,UAAAA,EAAW/E,uBEJpBgF,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/../../packages/common/src/utils/react/fowardRef.ts","webpack://_N_E/../../packages/common/src/components/Input/index.tsx","webpack://_N_E/../../packages/common/src/components/Input/styles.module.scss"],"sourcesContent":["import { forwardRef } from 'react';\n\nexport function fixedForwardRef(\n render: (props: P, ref: React.Ref) => JSX.Element,\n): (props: P & React.RefAttributes) => JSX.Element {\n return forwardRef(render) as any;\n}\n","/* eslint-disable react/no-danger */\nimport { FocusEvent, ForwardedRef, useEffect, useRef, useState } from 'react';\nimport { InputProps } from './props';\nimport { FieldValues } from 'react-hook-form';\nimport styles from './styles.module.scss';\nimport { useToggle } from '@starsoft/common/hooks';\nimport { fixedForwardRef } from '@starsoft/common/utils';\n\n/**\n * Input Component\n * A highly customizable input component that supports various input types including text, password, checkbox, radio, switch, range and textarea.\n * Includes features like error states, loading states, icons, and form integration with react-hook-form.\n *\n * @component\n * @template T - Type extending FieldValues from react-hook-form\n * @param {InputProps} props - Component props\n * @param {boolean} [props.isError=false] - Whether input is in error state\n * @param {boolean} [props.isContainerColor] - Whether to use container background color\n * @param {string|string[]} [props.errorMessage] - Error message(s) to display\n * @param {Function} [props.onFocus] - Focus event handler\n * @param {Function} [props.onBlur] - Blur event handler\n * @param {string} [props.name] - Input name attribute\n * @param {Function} [props.register] - react-hook-form register function\n * @param {string} [props.icon] - Icon class name\n * @param {Object} [props.registerOptions] - react-hook-form register options\n * @param {boolean} [props.showEraserButton] - Whether to show clear button\n * @param {Function} [props.onErase] - Clear button click handler\n * @param {boolean} [props.isLoading] - Whether input is in loading state\n * @param {boolean} [props.readOnly] - Whether input is read-only\n * @param {boolean} [props.hideLock] - Whether to hide lock icon for read-only state\n * @param {boolean} [props.isCardColor] - Whether to use card background color\n * @param {boolean} [props.showSpinner] - Whether to show loading spinner\n * @param {boolean} [props.hasPaddingRight] - Whether to add right padding\n * @param {boolean} [props.hasPaddingLeft] - Whether to add left padding\n * @param {boolean} [props.focusOnMount] - Whether to focus input on mount\n * @param {string} [props.className] - Additional CSS classes\n * @param {ReactNode} [props.customIcon] - Custom icon component\n * @param {string} [props.rightIcon] - Right icon class name\n * @param {string} [props.type] - Input type\n * @param {boolean} [props.useTextArea] - Whether to render as textarea\n * @param {boolean} [props.secondarySkeleton] - Whether to use secondary skeleton style\n * @param {ForwardedRef} ref - Forwarded ref\n * @returns {JSX.Element} Input component\n *\n * @example\n * // Basic text input with error state\n * \n * name=\"username\"\n * type=\"text\"\n * isError={true}\n * errorMessage=\"Username is required\"\n * register={register}\n * placeholder=\"Enter username\"\n * />\n *\n * @example\n * // Password input with icon\n * \n * name=\"password\"\n * type=\"password\"\n * icon=\"fa-lock\"\n * register={register}\n * placeholder=\"Enter password\"\n * />\n */\nfunction InputComponent(\n {\n isError = false,\n isContainerColor,\n errorMessage,\n onFocus,\n onBlur,\n name,\n register,\n icon,\n registerOptions = {},\n showEraserButton,\n onErase,\n isLoading = false,\n readOnly,\n hideLock,\n isCardColor,\n showSpinner,\n hasPaddingRight,\n hasPaddingLeft,\n focusOnMount,\n className = '',\n customIcon,\n rightIcon,\n type,\n useTextArea,\n secondarySkeleton = true,\n ...props\n }: InputProps,\n ref: ForwardedRef,\n) {\n const [openTooltip, setOpenTooltip] = useState(false);\n const [isEditing, toggleIsEditing] = useToggle(true);\n const [showPassword, toggleShowPassword] = useToggle();\n const inputRef = useRef(null);\n\n /**\n * Handles input focus event\n * Calls onFocus prop if provided and hides error tooltip\n *\n * @param {FocusEvent} e - Focus event\n */\n function handleFocus(\n e: FocusEvent,\n ) {\n onFocus?.(e);\n setOpenTooltip(false);\n }\n\n /**\n * Handles input blur event\n * Calls onBlur prop if provided, toggles editing state and shows error tooltip\n *\n * @param {FocusEvent} e - Blur event\n */\n function handleBlur(e: FocusEvent) {\n onBlur?.(e);\n toggleIsEditing();\n setOpenTooltip(true);\n }\n\n /**\n * Gets the input type based on type prop\n * Handles special cases for switch and password types\n *\n * @returns {string} HTML input type\n */\n function getType(): string {\n switch (type) {\n case 'switch':\n return 'checkbox';\n case 'password':\n return showPassword ? 'text' : 'password';\n default:\n return type;\n }\n }\n\n /**\n * Resets search input value\n * Focuses input and clears value, then calls onErase if provided\n */\n function resetSearchValue(): void {\n if (inputRef?.current) {\n inputRef.current.focus();\n inputRef.current.value = '';\n }\n\n onErase?.();\n }\n\n /**\n * Shows error tooltip if input is in error state\n */\n function handleOpenTooltip() {\n if (!isError) {\n return;\n }\n\n setOpenTooltip(true);\n }\n\n useEffect(handleOpenTooltip, [isError]);\n\n /**\n * Focuses input on mount if focusOnMount is true\n */\n function handleMountFocus() {\n if (!focusOnMount || !inputRef?.current) {\n return;\n }\n\n inputRef.current?.focus();\n }\n\n useEffect(handleMountFocus, [focusOnMount, inputRef]);\n\n if (isLoading) {\n return (\n \n );\n }\n\n if (useTextArea) {\n return (\n \n \n toggleIsEditing()}\n dangerouslySetInnerHTML={{\n //@ts-ignore\n __html:\n !props?.value || String(props?.value)?.length == 0\n ? props?.placeholder\n : props?.value,\n }}\n />\n {\n registerOptions?.onBlur?.(e);\n handleBlur(e);\n },\n }))}\n autoFocus={true}\n />\n {icon && !showSpinner && (\n \n )}\n {customIcon && !showSpinner && customIcon}\n {isError &&\n openTooltip &&\n !!errorMessage &&\n (Array.isArray(errorMessage) ? (\n errorMessage.map((error, i) => (\n \n *{error}\n \n ))\n ) : (\n \n *{errorMessage}\n \n ))}\n \n \n );\n }\n\n return (\n \n \n {\n registerOptions?.onBlur?.(e);\n handleBlur(e);\n },\n }))}\n />\n {['checkbox', 'radio'].includes(type as string) && (\n \n )}\n {type == 'switch' && (\n \n )}\n {type == 'range' && (\n \n {props?.value}\n \n )}\n {icon && !showSpinner && (\n \n )}\n\n {customIcon && !showSpinner && customIcon}\n\n {showEraserButton && (icon ? true : !showSpinner) && (\n \n \n \n )}\n\n {(readOnly || props?.disabled) &&\n !hideLock &&\n !['checkbox', 'radio'].includes(type as string) && (\n \n )}\n {rightIcon && !hideLock && (\n \n )}\n\n {type === 'password' && !icon && !rightIcon && (\n \n )}\n\n {showSpinner && (\n \n \n \n )}\n \n\n {isError &&\n openTooltip &&\n !!errorMessage &&\n (Array.isArray(errorMessage) ? (\n errorMessage.map((error, i) => (\n \n *{error}\n \n ))\n ) : (\n \n *{errorMessage}\n \n ))}\n\n {type == 'range' && (\n <>\n
{props?.value}
\n \n {props?.max}\n \n \n )}\n \n );\n}\n\nexport const Input = fixedForwardRef(InputComponent);\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"skeleton--secondary\":\"styles_skeleton--secondary__gPSoc\",\"skeleton--default\":\"styles_skeleton--default__1Qz2j\",\"skeleton-animation\":\"styles_skeleton-animation__Wzfy_\",\"container\":\"styles_container__Fp_9w\",\"container--range\":\"styles_container--range__pFMfy\",\"container--checkbox\":\"styles_container--checkbox__syWMZ\",\"container--radio\":\"styles_container--radio__sXhCj\",\"container--switch\":\"styles_container--switch___CA_d\",\"container--date\":\"styles_container--date__fy1yB\",\"container--color\":\"styles_container--color__JI8Ww\",\"container__value\":\"styles_container__value__i_UfS\",\"container__value--right\":\"styles_container__value--right__uMi4Y\",\"container__relative\":\"styles_container__relative__RkG6b\",\"container__relative--radio\":\"styles_container__relative--radio__xWkJN\",\"container__relative--checkbox\":\"styles_container__relative--checkbox__OX_Rc\",\"container__input-error\":\"styles_container__input-error__c53Bq\",\"container__figure\":\"styles_container__figure__bt9ut\",\"container__figure--right\":\"styles_container__figure--right__M6_j7\",\"container__figure--radio\":\"styles_container__figure--radio__Boss_\",\"container__figure--checkbox\":\"styles_container__figure--checkbox__gKry1\",\"container__figure--password\":\"styles_container__figure--password__eIOoV\",\"container__eraser\":\"styles_container__eraser__bKtEF\",\"container__input\":\"styles_container__input__dXZuU\",\"container__input--container-color\":\"styles_container__input--container-color__O6Icc\",\"container__input--card-color\":\"styles_container__input--card-color__wuCsb\",\"container__input--figure\":\"styles_container__input--figure__aSW0A\",\"container__input--padding-left\":\"styles_container__input--padding-left__Ticvg\",\"container__input--figure--right\":\"styles_container__input--figure--right__4M5iX\",\"container__input--padding-left--right\":\"styles_container__input--padding-left--right__aM0j5\",\"container__input--color\":\"styles_container__input--color__2cy9G\",\"container__input--error\":\"styles_container__input--error__YFCD1\",\"container__input--range\":\"styles_container__input--range__1wMMD\",\"container__input--text-area\":\"styles_container__input--text-area__jRsSG\",\"container__input--hidden\":\"styles_container__input--hidden__fhd4r\",\"container__input__indicator\":\"styles_container__input__indicator__rPfWm\",\"container__input--checkbox\":\"styles_container__input--checkbox__6pptU\",\"container__input--radio\":\"styles_container__input--radio___vSIa\",\"container__input__checkmark\":\"styles_container__input__checkmark__yZRrf\",\"container__input__checkmark--radio\":\"styles_container__input__checkmark--radio__gq7Hn\",\"container__input--switch\":\"styles_container__input--switch__yXg1m\",\"container__input__switch__slider\":\"styles_container__input__switch__slider__fCiS6\",\"container__tooltip\":\"styles_container__tooltip__cQpoD\",\"container__formated_value\":\"styles_container__formated_value__6QpoZ\",\"container__formated_value--hidden\":\"styles_container__formated_value--hidden__Uoclt\",\"skeleton\":\"styles_skeleton__2eEAw\",\"skeleton--switch\":\"styles_skeleton--switch__qMzXK\",\"skeleton--radio\":\"styles_skeleton--radio__u6zbU\",\"skeleton--checkbox\":\"styles_skeleton--checkbox__LHeTN\"};"],"names":["render","Input","param","ref","String","props","isError","isContainerColor","errorMessage","onFocus","onBlur","name","register","icon","registerOptions","showEraserButton","onErase","isLoading","readOnly","hideLock","isCardColor","showSpinner","hasPaddingRight","hasPaddingLeft","focusOnMount","className","customIcon","rightIcon","type","useTextArea","secondarySkeleton","openTooltip","setOpenTooltip","useState","isEditing","toggleIsEditing","useToggle","showPassword","toggleShowPassword","inputRef","useRef","handleFocus","e","handleBlur","getType","useEffect","current","focus","jsx_runtime","jsx","div","styles","concat","jsxs","onClick","dangerouslySetInnerHTML","__html","value","length","placeholder","textarea","spellCheck","rows","style","Number","max","undefined","autoFocus","i","Array","isArray","map","error","span","input","includes","button","disabled","Fragment","forwardRef","module","exports"],"sourceRoot":""}