{"version":3,"file":"CandidateFileUpload.DfkUKaRh.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/6MoLBP3ppcfBbGQBtPCh/gyBHtnWkIr7gpDlWUKgM/CandidateFileUpload.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function CandidateFileUpload(props){const{fieldName=\"candidate_file\",label=\"Upload file\",accept=\".pdf,.doc,.docx,.jpg,.jpeg,.png\",required=false,backgroundColor=\"rgba(187, 187, 187, 0.15)\",borderColor=\"rgba(136, 136, 136, 0.1)\",focusColor=\"rgba(0, 153, 255, 1)\",textColor=\"rgba(51, 51, 51, 1)\",placeholderColor=\"rgba(153, 153, 153, 1)\",radius=8,style}=props;const[fileName,setFileName]=React.useState(\"\");const[isFocused,setIsFocused]=React.useState(false);return /*#__PURE__*/_jsxs(\"label\",{style:{...style,position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:8,width:\"100%\",height:\"100%\",minHeight:40,boxSizing:\"border-box\",padding:\"0 12px\",border:`1px solid ${isFocused?focusColor:borderColor}`,borderRadius:radius,background:backgroundColor,color:fileName?textColor:placeholderColor,fontFamily:\"Inter, sans-serif\",fontSize:14,lineHeight:\"1.2em\",cursor:\"pointer\",overflow:\"hidden\"},\"aria-label\":label,children:[/*#__PURE__*/_jsx(\"span\",{style:{overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\",pointerEvents:\"none\"},children:fileName||label}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{flexShrink:0,color:\"#AB1023\",fontSize:12,fontWeight:600,letterSpacing:\"0.02em\",pointerEvents:\"none\"},children:\"Browse\"}),/*#__PURE__*/_jsx(\"input\",{type:\"file\",name:fieldName,accept:accept,required:required,onFocus:()=>setIsFocused(true),onBlur:()=>setIsFocused(false),onChange:event=>{setFileName(event.target.files?.[0]?.name||\"\");},style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",opacity:0,cursor:\"pointer\"}})]});}addPropertyControls(CandidateFileUpload,{fieldName:{type:ControlType.String,title:\"Field Name\",defaultValue:\"candidate_file\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Upload file\"},accept:{type:ControlType.String,title:\"Accept\",defaultValue:\".pdf,.doc,.docx,.jpg,.jpeg,.png\"},required:{type:ControlType.Boolean,title:\"Required\",defaultValue:false},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(187, 187, 187, 0.15)\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(136, 136, 136, 0.1)\"},focusColor:{type:ControlType.Color,title:\"Focus\",defaultValue:\"rgba(0, 153, 255, 1)\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(51, 51, 51, 1)\"},placeholderColor:{type:ControlType.Color,title:\"Placeholder\",defaultValue:\"rgba(153, 153, 153, 1)\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:40,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CandidateFileUpload\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CandidateFileUpload.map"],"mappings":"iLAGG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,YAAU,iBAAiB,QAAM,cAAc,SAAO,kCAAkC,WAAS,GAAM,kBAAgB,4BAA4B,cAAY,2BAA2B,aAAW,uBAAuB,YAAU,sBAAsB,mBAAiB,yBAAyB,SAAO,EAAE,SAAO,EAAW,CAAC,EAAS,GAAaA,EAAe,EAAE,EAAO,CAAC,EAAU,GAAcA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