{"version":3,"file":"AnimatedCircle.BYCEt8bZ.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/fXp2VzQT1e33FQf2503f/QCCtFeWOHHtlbuOVqog1/AnimatedCircle.js"],"sourcesContent":["// Animowane koło z obrysem obracającym się zgodnie z ruchem wskazówek zegara, z kontrolą czasu animacji\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Animowane Koło\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function AnimatedCircle(props){const{duration,strokeColor,strokeWidth,backgroundColor,style={}}=props;const isStatic=useIsStaticRenderer();const circleRef=useRef(null);const size=props.size||120;const radius=(size-strokeWidth)/2;const circumference=2*Math.PI*radius;useEffect(()=>{if(isStatic)return;const circle=circleRef.current;if(!circle)return;circle.style.transition=\"none\";circle.style.strokeDasharray=`${circumference}`;circle.style.strokeDashoffset=`${circumference}`;// Force reflow\nvoid circle.getBoundingClientRect();circle.style.transition=`stroke-dashoffset ${duration}s linear`;circle.style.strokeDashoffset=\"0\";},[duration,circumference,isStatic]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:backgroundColor,position:\"relative\",...style},children:/*#__PURE__*/_jsx(\"svg\",{width:size,height:size,style:{display:\"block\"},\"aria-label\":\"Animowane koło\",children:/*#__PURE__*/_jsx(\"circle\",{cx:size/2,cy:size/2,r:radius,fill:\"none\",stroke:strokeColor,strokeWidth:strokeWidth,ref:circleRef,style:{transform:\"rotate(-90deg)\",transformOrigin:\"50% 50%\",strokeDasharray:circumference,strokeDashoffset:isStatic?0:circumference,transition:isStatic?\"none\":undefined}})})});}addPropertyControls(AnimatedCircle,{size:{type:ControlType.Number,title:\"Rozmiar koła\",defaultValue:120,min:40,max:400,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Czas (s)\",defaultValue:2,min:.2,max:10,step:.1,unit:\"s\"},strokeColor:{type:ControlType.Color,title:\"Kolor obrysu\",defaultValue:\"#0099FF\"},strokeWidth:{type:ControlType.Number,title:\"Grubość obrysu\",defaultValue:8,min:1,max:32,step:1,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Tło\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedCircle\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedCircle.map"],"mappings":"0LAMG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,WAAS,cAAY,cAAY,kBAAgB,QAAM,EAAE,EAAE,EAAY,EAAS,GAAqB,CAAO,EAAUA,EAAO,KAAK,CAAO,EAAK,EAAM,MAAM,IAAU,GAAQ,EAAK,GAAa,EAAQ,EAAc,EAAE,KAAK,GAAG,EAC1G,OADiH,MAAc,CAAC,GAAG,EAAS,OAAO,IAAM,EAAO,EAAU,QAAY,IAAc,EAAO,MAAM,WAAW,OAAO,EAAO,MAAM,gBAAgB,GAAG,IAAgB,EAAO,MAAM,iBAAiB,GAAG,IAC1d,EAAO,uBAAuB,CAAC,EAAO,MAAM,WAAW,qBAAqB,EAAS,UAAU,EAAO,MAAM,iBAAiB,MAAM,CAAC,EAAS,EAAc,EAAS,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,WAAW,EAAgB,SAAS,WAAW,GAAG,EAAM,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,MAAM,CAAC,QAAQ,QAAQ,CAAC,aAAa,iBAAiB,SAAsB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