{"version":3,"file":"GradientRectangle_2.B0n-y--n.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/Pr1HccyoCDMDrkzvf1Ba/oBjNFXYMmHR4DAoasGkA/GradientRectangle_2.js"],"sourcesContent":["// Rectangular gradient with blue, yellow, and a hint of red, highly blended\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useRef,useEffect,useState,startTransition}from\"react\";/**\n * Rectangular Blended Gradient (Blue, Yellow, Red)\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function GradientRectangle(props){const{angle,blue,yellow,red,style}=props;// Animate the gradient position\nconst[pos,setPos]=useState({x:60,y:40});const requestRef=useRef();useEffect(()=>{let t=0;function animate(){t+=.012;const x=60+Math.sin(t)*10;const y=40+Math.cos(t*.8)*10;startTransition(()=>setPos({x,y}));requestRef.current=requestAnimationFrame(animate);}requestRef.current=requestAnimationFrame(animate);return()=>{if(requestRef.current)cancelAnimationFrame(requestRef.current);};},[]);// Use a circular, highly blended gradient shape inside the rectangle\nreturn /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",borderRadius:12,background:yellow,boxShadow:\"0 2px 12px rgba(0,0,0,0.08)\",position:\"relative\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",width:\"180%\",height:\"180%\",transform:\"translate(-50%, -50%)\",borderRadius:\"50%\",background:`radial-gradient(circle at ${pos.x}% ${pos.y}%, ${yellow} 0%, ${blue} 30%, ${yellow} 65%, ${red} 100%)`,filter:\"blur(16px)\",pointerEvents:\"none\"},\"aria-hidden\":\"true\"})});}addPropertyControls(GradientRectangle,{angle:{type:ControlType.Number,title:\"Angle\",defaultValue:135,min:0,max:360,unit:\"deg\"},blue:{type:ControlType.Color,title:\"Blue\",defaultValue:\"#B8D8F7\"},yellow:{type:ControlType.Color,title:\"Yellow\",defaultValue:\"#FFE066\"},red:{type:ControlType.Color,title:\"Red\",defaultValue:\"#FFB3B3\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientRectangle\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientRectangle_2.map"],"mappings":"yRAMG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,SAAO,MAAI,SAAO,EAClF,CAAC,EAAI,GAAQA,EAAS,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAO,EAAWC,GAAQ,CACjE,OADkE,MAAc,CAAC,IAAI,EAAE,EAAE,SAAS,GAAS,CAAC,GAAG,KAAK,IAAM,EAAE,GAAG,KAAK,IAAI,EAAE,CAAC,GAAS,EAAE,GAAG,KAAK,IAAI,EAAE,GAAG,CAAC,GAAG,MAAoB,EAAO,CAAC,IAAE,IAAE,CAAC,CAAC,CAAC,EAAW,QAAQ,sBAAsB,EAAQ,CAAoD,MAAlD,GAAW,QAAQ,sBAAsB,EAAQ,KAAW,CAAI,EAAW,SAAQ,qBAAqB,EAAW,QAAQ,GAAK,EAAE,CAAC,CAChX,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,aAAa,GAAG,WAAW,EAAO,UAAU,8BAA8B,SAAS,WAAW,SAAS,SAAS,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,KAAK,MAAM,IAAI,MAAM,MAAM,OAAO,OAAO,OAAO,UAAU,wBAAwB,aAAa,MAAM,WAAW,6BAA6B,EAAI,EAAE,IAAI,EAAI,EAAE,KAAK,EAAO,OAAO,EAAK,QAAQ,EAAO,QAAQ,EAAI,QAAQ,OAAO,aAAa,cAAc,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