{"version":3,"file":"ProgressBar.CubGkTp2.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","de","init_jsx_runtime","c","motion","useInView","init_framer_motion_DhsWWWsN","RenderTarget","addPropertyControls","ControlType","init_framer_CN96F41L","ProgressBar","props","ref","isInView","renderTarget","isLivePreview","style","borderRadius","barColor","resetKey","init_ProgressBar"],"sources":["https:/framerusercontent.com/modules/aYrgGlpYR4c4fKgbg18O/nlM8AWXeR98jLFvMWS9c/ProgressBar.js"],"sourcesContent":["// Progress bar with customizable height, colors, and duration\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{motion,useInView}from\"framer-motion\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useRef}from\"react\";/**\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 20\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ProgressBar(props){const{backgroundColor,barColor,duration,borderRadius,resetKey,style}=props;const ref=useRef(null);const isInView=useInView(ref,{amount:.5});const renderTarget=RenderTarget.current();const isLivePreview=renderTarget===RenderTarget.preview||renderTarget===RenderTarget.export;return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...style,width:\"100%\",height:style?.height??\"100%\",backgroundColor,borderRadius:`${borderRadius}px`,overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsx(motion.div,{style:{height:\"100%\",backgroundColor:barColor,borderRadius:`${borderRadius}px`},initial:{width:\"0%\"},animate:{width:isLivePreview||isInView?\"100%\":\"0%\"},transition:{duration,ease:\"linear\"}},resetKey)});}addPropertyControls(ProgressBar,{borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:100,min:0,max:100,step:1,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#EEEEEE\"},barColor:{type:ControlType.Color,title:\"Bar Color\",defaultValue:\"#000000\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:3,min:.1,max:60,step:.1,unit:\"s\"},resetKey:{type:ControlType.Number,title:\"Reset\",defaultValue:0,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressBar\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"20\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressBar.map"],"mappings":"A,2OAMG,SAAwBa,EAAY,EAAM,CAAC,GAAK,CAAC,kBAAgB,WAAS,WAAS,eAAa,WAAS,SAAOC,EAAYC,EAAIf,EAAO,IAAI,EAAQgB,EAAST,EAAUQ,EAAI,CAAC,OAAO,EAAE,CAAC,EAAQE,EAAaR,EAAa,QAAQ,EAAQS,EAAcD,IAAeR,EAAa,SAASQ,IAAeR,EAAa,OAAO,MAAoB,gBAAK,MAAM,CAAK,MAAI,MAAM,CAAC,GAAGU,EAAM,MAAM,OAAO,OAAOA,GAAO,QAAQ,OAAO,kBAAgB,aAAa,GAAGC,EAAa,IAAI,SAAS,SAAS,SAAS,UAAU,EAAE,SAAsB,gBAAKd,EAAO,IAAI,CAAC,MAAM,CAAC,OAAO,OAAO,gBAAgBe,EAAS,aAAa,GAAGD,EAAa,GAAG,EAAE,QAAQ,CAAC,MAAM,IAAI,EAAE,QAAQ,CAAC,MAAMF,GAAeF,EAAS,OAAO,IAAI,EAAE,WAAW,CAAC,WAAS,KAAK,QAAQ,CAAC,EAAEM,CAAQ,CAAC,CAAC,CAAE,C,8CAACZ,EAAoBG,EAAY,CAAC,aAAa,CAAC,KAAKF,EAAY,OAAO,MAAM,SAAS,aAAa,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,KAAK,IAAI,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,EAAE,SAAS,CAAC,KAAKA,EAAY,MAAM,MAAM,YAAY,aAAa,SAAS,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,WAAW,aAAa,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,QAAQ,aAAa,EAAE,eAAe,EAAI,CAAC,CAAC,C"}