{"version":3,"file":"ScreenreaderLabelExample.cFVnL7PT.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/qdKiXjPAceVECi2fmg8w/rYJbUQIG8jancQJDegJA/ScreenreaderLabelExample.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function ScrollProgressBar(props){const{direction,backgroundColor,fillColor,height}=props;const[progress,setProgress]=useState(0);useEffect(()=>{const handleScroll=()=>{const scrollTop=window.scrollY;const docHeight=document.documentElement.scrollHeight-window.innerHeight;const scrollPercent=scrollTop/docHeight;setProgress(scrollPercent*100);};window.addEventListener(\"scroll\",handleScroll);return()=>window.removeEventListener(\"scroll\",handleScroll);},[]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",direction:direction,height:\"100%\",backgroundColor:backgroundColor,justifyContent:\"start\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:`${progress}%`,height:\"100%\",backgroundColor:fillColor}})});}// Define property controls if using in Framer\naddPropertyControls(ScrollProgressBar,{direction:{type:ControlType.String,title:\"Direction\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\"},fillColor:{type:ControlType.Color,title:\"Fill Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"ScrollProgressBar\":{\"type\":\"reactComponent\",\"name\":\"ScrollProgressBar\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScreenreaderLabelExample.map"],"mappings":"gMAAqI,SAAgB,EAAkB,EAAM,CAAC,GAAK,CAAC,YAAU,kBAAgB,YAAU,UAAQ,EAAW,CAAC,EAAS,GAAaA,EAAS,CAAC,EAA2U,OAAzU,MAAc,CAAC,IAAM,MAAiB,CAAyG,IAAM,EAA9F,EAAO,SAAwB,SAAS,gBAAgB,aAAa,EAAO,aAAoD,EAAY,EAAc,GAAG,CAAE,EAAiD,OAA/C,EAAO,iBAAiB,SAAS,CAAY,MAAY,EAAO,oBAAoB,SAAS,CAAY,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAiB,YAAU,OAAO,OAAuB,kBAAgB,eAAe,OAAO,EAAE,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,EAAS,GAAG,OAAO,OAAO,gBAAgB,CAAS,CAAC,CAAC,CAAC,CAAC,CAAE,qBAAtyB,IAAsC,IAAoD,EACpI,EAAoB,EAAkB,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,KAAK,EAAY,MAAM,MAAM,kBAAkB,EAAE,UAAU,CAAC,KAAK,EAAY,MAAM,MAAM,YAAY,CAAC,CAAC"}