{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/bG77P9juyYJyXC2obl0S/tpU8nyjznd65etf4VL8X/ProgressBar_1.js"],
  "sourcesContent": ["// Simple scroll progress bar with customizable colors and radius\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Scroll Progress Bar\n * Shows a progress bar at the top of the page that fills as you scroll.\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 8\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ProgressBar(props){const{backgroundColor,progressColor,height,borderRadius,style}=props;const[progress,setProgress]=useState(0);useEffect(()=>{function updateProgress(){if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const scrollTop=window.scrollY||document.documentElement.scrollTop;const docHeight=document.documentElement.scrollHeight-window.innerHeight;const percent=docHeight>0?Math.min(1,scrollTop/docHeight):0;startTransition(()=>setProgress(percent));}updateProgress();window.addEventListener(\"scroll\",updateProgress,{passive:true});window.addEventListener(\"resize\",updateProgress);return()=>{window.removeEventListener(\"scroll\",updateProgress);window.removeEventListener(\"resize\",updateProgress);};},[]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height,background:backgroundColor,borderRadius,overflow:\"hidden\"},\"aria-label\":\"Scroll progress bar\",role:\"progressbar\",\"aria-valuenow\":Math.round(progress*100),\"aria-valuemin\":0,\"aria-valuemax\":100,children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:0,top:0,height:\"100%\",width:`${progress*100}%`,background:progressColor,borderRadius,transition:\"width 0.15s cubic-bezier(.4,1,.4,1)\"}})});}addPropertyControls(ProgressBar,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#EEEEEE\"},progressColor:{type:ControlType.Color,title:\"Progress\",defaultValue:\"#0099FF\"},height:{type:ControlType.Number,title:\"Height\",defaultValue:8,min:2,max:32,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressBar\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"8\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressBar_1.map"],
  "mappings": "uJAUkB,SAARA,EAA6BC,EAAM,CAAC,GAAK,CAAC,gBAAAC,EAAgB,cAAAC,EAAc,OAAAC,EAAO,aAAAC,EAAa,MAAAC,CAAK,EAAEL,EAAW,CAACM,EAASC,CAAW,EAAEC,EAAS,CAAC,EAAE,OAAAC,EAAU,IAAI,CAAC,SAASC,GAAgB,CAAC,GAAG,OAAOC,EAAS,KAAa,OAAO,SAAW,IAAY,OAAO,IAAMC,EAAUD,EAAO,SAAS,SAAS,gBAAgB,UAAgBE,EAAU,SAAS,gBAAgB,aAAaF,EAAO,YAAkBG,EAAQD,EAAU,EAAE,KAAK,IAAI,EAAED,EAAUC,CAAS,EAAE,EAAEE,EAAgB,IAAIR,EAAYO,CAAO,CAAC,CAAE,CAAC,OAAAJ,EAAe,EAAEC,EAAO,iBAAiB,SAASD,EAAe,CAAC,QAAQ,EAAI,CAAC,EAAEC,EAAO,iBAAiB,SAASD,CAAc,EAAQ,IAAI,CAACC,EAAO,oBAAoB,SAASD,CAAc,EAAEC,EAAO,oBAAoB,SAASD,CAAc,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsBM,EAAK,MAAM,CAAC,MAAM,CAAC,GAAGX,EAAM,SAAS,WAAW,MAAM,OAAO,OAAAF,EAAO,WAAWF,EAAgB,aAAAG,EAAa,SAAS,QAAQ,EAAE,aAAa,sBAAsB,KAAK,cAAc,gBAAgB,KAAK,MAAME,EAAS,GAAG,EAAE,gBAAgB,EAAE,gBAAgB,IAAI,SAAsBU,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,KAAK,EAAE,IAAI,EAAE,OAAO,OAAO,MAAM,GAAGV,EAAS,GAAG,IAAI,WAAWJ,EAAc,aAAAE,EAAa,WAAW,qCAAqC,CAAC,CAAC,CAAC,CAAC,CAAE,CAACa,EAAoBlB,EAAY,CAAC,gBAAgB,CAAC,KAAKmB,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,EAAE,cAAc,CAAC,KAAKA,EAAY,MAAM,MAAM,WAAW,aAAa,SAAS,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC",
  "names": ["ProgressBar", "props", "backgroundColor", "progressColor", "height", "borderRadius", "style", "progress", "setProgress", "ye", "ue", "updateProgress", "window", "scrollTop", "docHeight", "percent", "Z", "p", "addPropertyControls", "ControlType"]
}
