{"version":3,"file":"ProgressBar.8uDPerRc.mjs","names":["useRef"],"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\",\"framerSupported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