{"version":3,"file":"index.cjs","sources":["../../../src/components/Input/index.tsx"],"sourcesContent":["import { cn } from \"@/components/utils\";\nimport React from \"react\";\n\nexport interface InputProps\n  extends React.InputHTMLAttributes<HTMLInputElement> {\n  /** Pass any Icon or Text as preffix */\n  prefix?: any;\n  suffix?: any;\n  containerStyle?: any;\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n  ({ className, prefix, suffix, containerStyle, ...props }, ref) => {\n    return (\n      <div\n        className={cn(\n          `relative flex h-10 w-full rounded-md border border-input bg-card focus-within:ring-2 focus-within:ring-offset-1 ${prefix ? \"pl-10\" : \"\"} ${suffix ? \"pr-10\" : \"\"}`,\n          containerStyle || \"\"\n        )}\n      >\n        {/* Prefix Icon or Text */}\n        {prefix ? (\n          <div className=\"absolute left-0 top-0 flex h-full w-10 items-center justify-center\">\n            {prefix}\n          </div>\n        ) : null}\n        <input\n          className={`h-full w-full rounded-md bg-transparent ${prefix ? \"\" : \"pl-3\"} py-2 pr-3 text-sm file:border-0 placeholder:text-muted-foreground focus:outline-0 disabled:cursor-not-allowed disabled:opacity-50 ${className || \"\"}`}\n          ref={ref}\n          {...props}\n        />\n        {/* Suffix Icon or Text */}\n        {suffix ? (\n          <div\n            onClick={props.onClick}\n            className=\"absolute right-0 top-0 flex h-full w-10 cursor-pointer items-center justify-center\"\n          >\n            {suffix}\n          </div>\n        ) : null}\n      </div>\n    );\n  }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"names":["Input","forwardRef","className","prefix","suffix","containerStyle","props","ref","jsxRuntimeExports","jsxs","cn","children","jsx","onClick","displayName"],"mappings":"yKAWMA,mBAAcC,YAClB,EAAGC,YAAWC,SAAQC,SAAQC,oBAAmBC,GAASC,MAEtDC,kBAAAC,KAAC,MAAA,CACCP,UAAWQ,EAAAA,GACT,mHAAmHP,EAAS,QAAU,MAAMC,EAAS,QAAU,KAC/JC,GAAkB,IAInBM,SAAA,CAAAR,EACES,EAAAA,kBAAAA,IAAA,MAAA,CAAIV,UAAU,qEACZS,aAED,OACJH,kBAAAI,IAAC,QAAA,CACCV,UAAW,2CAA2CC,EAAS,GAAK,4IAA4ID,GAAa,KAC7NK,SACID,IAGLF,IACCI,kBAAAI,IAAC,MAAA,CACCC,QAASP,EAAMO,QACfX,UAAU,qFAETS,SAAAP,IAED,UAKZJ,EAAMc,YAAc"}