{"version":3,"file":"ProgressBar.CjQdICLR.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/HYdUwgxt14LWqP4F6nhX/0a5plRfmlK8ajQtTFFu7/ProgressBar.js"],"sourcesContent":["// Animated progress bar that fills to a target percentage when it appears in viewport\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion,useInView}from\"framer-motion\";import{useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Animated Progress Bar\n *\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 12\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ProgressBar(props){const{percentage=75,backgroundColor=\"#EEEEEE\",fillColor=\"#000000\",borderRadius=8,showLabel=true,labelColor=\"#FFFFFF\",labelFont,animationDuration=1.5,animationDelay=0}=props;const ref=useRef(null);const isInView=useInView(ref,{once:true,amount:.3});const clampedPercentage=Math.max(0,Math.min(100,percentage));return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{width:\"100%\",height:\"100%\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor,borderRadius,overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsx(motion.div,{initial:{width:\"0%\"},animate:{width:isInView?`${clampedPercentage}%`:\"0%\"},transition:{duration:animationDuration,delay:animationDelay,ease:\"easeOut\"},style:{height:\"100%\",backgroundColor:fillColor,borderRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"flex-end\",paddingRight:showLabel?16:0},children:showLabel&&/*#__PURE__*/_jsxs(motion.span,{initial:{opacity:0},animate:{opacity:isInView?1:0},transition:{duration:.3,delay:animationDelay+animationDuration*.5},style:{color:labelColor,...labelFont,whiteSpace:\"nowrap\"},children:[Math.round(clampedPercentage),\"%\"]})})})});}addPropertyControls(ProgressBar,{percentage:{type:ControlType.Number,title:\"Percentage\",defaultValue:75,min:0,max:100,step:1,unit:\"%\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#2A2A2A\"},fillColor:{type:ControlType.Color,title:\"Fill Color\",defaultValue:\"#5DCCCC\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:20,min:0,max:50,step:1,unit:\"px\"},showLabel:{type:ControlType.Boolean,title:\"Show Label\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#FFFFFF\",hidden:({showLabel})=>!showLabel},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},hidden:({showLabel})=>!showLabel},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.5,min:.1,max:5,step:.1,unit:\"s\"},animationDelay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:3,step:.1,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressBar\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"300\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"12\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressBar.map"],"mappings":"yOASG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,aAAW,GAAG,kBAAgB,UAAU,YAAU,UAAU,eAAa,EAAE,YAAU,GAAK,aAAW,UAAU,YAAU,oBAAkB,IAAI,iBAAe,GAAG,EAAY,EAAIA,EAAO,IAAI,EAAQ,EAAS,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,EAAE,CAAC,EAAQ,EAAkB,KAAK,IAAI,EAAE,KAAK,IAAI,IAAI,CAAU,CAAC,EAAE,OAAoB,EAAK,MA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