{"version":3,"file":"RotatingConicGradient.DftmyG8F.mjs","names":[],"sources":["https:/framerusercontent.com/modules/igttriKheRoRkxFPW1YC/v30AFFT8MRQC48rYfv9J/RotatingConicGradient.js"],"sourcesContent":["// Rotating conic gradient box\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{motion,useMotionValue,useTransform,animate}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function RotatingConicGradient(props){const{color1,color2,rotationSpeed,borderRadius,style}=props;const rotation=useMotionValue(0);const gradientAngle=useTransform(rotation,value=>`${value}deg`);useEffect(()=>{const controls=animate(rotation,360,{duration:rotationSpeed,repeat:Infinity,ease:\"linear\"});return controls.stop;},[rotationSpeed,rotation]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",borderRadius},children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",background:useTransform(rotation,r=>`conic-gradient(from ${r}deg, ${color1}, ${color2})`)}})});}addPropertyControls(RotatingConicGradient,{color1:{type:ControlType.Color,title:\"Color 1\",defaultValue:\"#0099FF\"},color2:{type:ControlType.Color,title:\"Color 2\",defaultValue:\"#8855FF\"},rotationSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:3,min:.5,max:10,step:.5,unit:\"s\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingConicGradient\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatingConicGradient.map"],"mappings":"gPAIG,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,SAAO,SAAO,gBAAc,eAAa,SAAO,EAAY,EAAS,EAAe,EAAE,CAA6N,OAAxM,EAAa,EAAS,GAAO,GAAG,EAAM,KAAK,CAAC,MAA8B,EAAQ,EAAS,IAAI,CAAC,SAAS,EAAc,OAAO,IAAS,KAAK,SAAS,CAAC,CAAiB,KAAO,CAAC,EAAc,EAAS,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,SAAS,eAAa,CAAC,SAAsB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAAW,EAAa,EAAS,GAAG,uBAAuB,EAAE,OAAO,EAAO,IAAI,EAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,kBAH5mB,IAAsE,IAAoD,IAA6B,CAGud,EAAoB,EAAsB,CAAC,OAAO,CAAC,KAAK,EAAY,MAAM,MAAM,UAAU,aAAa,UAAU,CAAC,OAAO,CAAC,KAAK,EAAY,MAAM,MAAM,UAAU,aAAa,UAAU,CAAC,cAAc,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,IAAI,CAAC,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,SAAS,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC"}