{"version":3,"file":"AnimatedGradientBorder.D5dwrtrn.mjs","names":[],"sources":["https:/framerusercontent.com/modules/zIIymVGoACbGMaVbmnrw/UmFcP4qJd36gUlycbNKU/AnimatedGradientBorder.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useMotionValue,useTransform,animate}from\"framer-motion\";import{useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export default function AnimatedGradientBorder(props){const{shineColor,borderColor,shineRange}=props;const startAngle=props.randomize?0:props.startAngle;const inset=props.borderWidth;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const angle=useMotionValue(!isCanvas&&props.randomize?Math.random()*360:0);useEffect(()=>{if(!isCanvas){animate(angle,angle.get()+(props.direction==\"ccw\"?-360:360),{duration:props.duration,repeat:Infinity,ease:\"linear\"});}},[]);const gradientStops=props.shineStyle==\"sharp\"?props.direction==\"ccw\"?`${shineColor} 0, ${borderColor} ${shineRange}deg`:`${borderColor} ${360-shineRange}deg, ${shineColor} 360deg`:`${shineColor} 0, ${borderColor} ${shineRange/2}deg, ${borderColor} ${360-shineRange/2}deg,${shineColor} 360deg`;return /*#__PURE__*/ _jsx(motion.div,{style:{backgroundImage:isCanvas?`conic-gradient(from ${startAngle}deg, ${gradientStops})`:useTransform([angle],([value])=>`conic-gradient(from ${startAngle+value}deg, ${gradientStops})`),borderRadius:props.radiusIsMixed?`${props.radiusTopLeft}px ${props.radiusTopRight}px ${props.radiusBottomRight}px ${props.radiusBottomLeft}px`:`${props.radius}px`,...props.style},children:/*#__PURE__*/ _jsx(\"div\",{style:{position:\"absolute\",inset:inset,backgroundColor:props.fill,borderRadius:props.radiusIsMixed?`${props.radiusTopLeft-inset}px ${props.radiusTopRight-inset}px ${props.radiusBottomRight-inset}px ${props.radiusBottomLeft-inset}px`:`${props.radius-inset}px`}})});};AnimatedGradientBorder.displayName=\"Animated Gradient Border\";addPropertyControls(AnimatedGradientBorder,{borderWidth:{type:ControlType.Number,defaultValue:4,min:1,step:1,title:\"Width\"},shineStyle:{type:ControlType.Enum,defaultValue:\"sharp\",options:[\"smooth\",\"sharp\"],optionTitles:[\"Smooth\",\"Sharp\"],displaySegmentedControl:true,title:\"Style\"},shineRange:{type:ControlType.Number,defaultValue:45,min:1,max:180,step:1,unit:\"\\xb0\"},shineColor:{type:ControlType.Color,defaultValue:\"#6019FA\",title:\"Shine\"},borderColor:{type:ControlType.Color,defaultValue:\"#EDEDED\",title:\"Border\"},duration:{type:ControlType.Number,defaultValue:5,min:.1,description:\"Seconds to rotate 360\\xb0\"},direction:{type:ControlType.Enum,defaultValue:\"cw\",options:[\"cw\",\"ccw\"],optionTitles:[\"Clockwise\",\"Counterclockwise\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},randomize:{type:ControlType.Boolean,defaultValue:true,description:\"Random start angle.\"},startAngle:{type:ControlType.Number,defaultValue:0,min:-360,max:360,unit:\"\\xb0\",hidden:props=>props.randomize},fill:{type:ControlType.Color,defaultValue:\"#FFF\"},radius:{type:ControlType.FusedNumber,defaultValue:20,toggleKey:\"radiusIsMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"radiusTopLeft\",\"radiusTopRight\",\"radiusBottomRight\",\"radiusBottomLeft\",],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedGradientBorder\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedGradientBorder.map"],"mappings":"wPAGI,SAAwB,EAAuB,EAAM,CAAC,GAAK,CAAC,aAAW,cAAY,cAAY,EAAY,EAAW,EAAM,UAAU,EAAE,EAAM,WAAiB,EAA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