{"version":3,"file":"Examples.DA9kHZSN.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ZB71NpjicAbdTeHE3QVZ/WWmkMJIptT8kuSG690Vd/Examples.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function StrictEmailValidation(Component){return props=>{const handleValidation=event=>{const value=event.target.value;// Regex: Text + @ + Text + Dot + 2 or more characters\nconst emailRegex=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;// 1. Check against Regex\nif(!emailRegex.test(value)){// This tells the browser: \"This field is invalid. DO NOT SUBMIT.\"\nevent.target.setCustomValidity(\"Please enter a full email address (e.g. name@domain.com)\");}else{// This tells the browser: \"We are good to go.\"\nevent.target.setCustomValidity(\"\");}// 2. Pass the changes back to Framer so the typing actually shows up\nif(props.onChange){props.onChange(event);}};return /*#__PURE__*/_jsx(Component,{...props,onChange:handleValidation,// Ensure the browser treats this as an email field\ntype:\"email\",required:true});};}\nexport const __FramerMetadata__ = {\"exports\":{\"StrictEmailValidation\":{\"type\":\"reactHoc\",\"name\":\"StrictEmailValidation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"oGAA2C,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAiB,GAAO,CAAC,IAAM,EAAM,EAAM,OAAO,MAClJ,gCACF,KAAK,EAAM,CAE1B,EAAM,OAAO,kBAAkB,GAAG,CADlC,EAAM,OAAO,kBAAkB,2DAA2D,CAEvF,EAAM,UAAU,EAAM,SAAS,EAAM,EAAI,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,SAAS,EAClG,KAAK,QAAQ,SAAS,GAAK,CAAC,mBANe"}