{"version":3,"file":"ScreenreaderLabelExample.CC66lof6.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":"2LAAqI,SAAgB,EAAkB,EAAM,CAAC,GAAK,CAAC,YAAU,kBAAgB,YAAU,UAAQ,EAAW,CAAC,EAAS,GAAaA,EAAS,EAAE,CAA0U,OAAzU,MAAc,CAAC,IAAM,MAAiB,CAAiJ,EAAhI,EAAO,SAAwB,SAAS,gBAAgB,aAAa,EAAO,aAA8E,IAAI,EAAkD,OAA/C,EAAO,iBAAiB,SAAS,EAAa,KAAW,EAAO,oBAAoB,SAAS,EAAa,EAAG,EAAE,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAiB,YAAU,OAAO,OAAuB,kBAAgB,eAAe,QAAQ,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,EAAS,GAAG,OAAO,OAAO,gBAAgB,EAAU,CAAC,CAAC,CAAC,CAAC,sBAApyB,IAAsC,IAAoD,CACrI,EAAoB,EAAkB,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,CAAC,gBAAgB,CAAC,KAAK,EAAY,MAAM,MAAM,mBAAmB,CAAC,UAAU,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,CAAC,CAAC"}