{"version":3,"file":"Gradient_ease.DYGpc4Df.mjs","names":[],"sources":["https:/framerusercontent.com/modules/8TtjecrrZM6688kaKB5n/UqCgMDXzAldaZoDF64gD/Gradient_ease.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";// Easing functions\nconst easings={linear:t=>t,easeIn:t=>t*t,easeInOut:t=>t<.5?2*t*t:-1+(4-2*t)*t,exponential:t=>t===0?0:Math.pow(1024,t-1)};/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Gradientease(props){const{gradientDirection,cornerRadius,easing,grayScale}=props;// Generate gradient stops\nconst generateGradientStops=(easingFunc,numberOfStops=30)=>{return Array.from({length:numberOfStops},(_,i)=>{const t=i/(numberOfStops-1);const easedT=easingFunc(t);return`hsla(0, 0%, ${grayScale}%, ${easedT}) ${t*100}%`;}).join(\", \");};const gradient=`linear-gradient(${gradientDirection}, ${generateGradientStops(easings[easing])})`;const style={width:\"100%\",height:\"100%\",background:gradient,borderRadius:cornerRadius};return /*#__PURE__*/_jsx(motion.div,{style:style});}Gradientease.defaultProps={gradientDirection:\"to bottom\",cornerRadius:0,easing:\"easeInOut\",grayScale:0};addPropertyControls(Gradientease,{gradientDirection:{type:ControlType.Enum,title:\"Direction\",options:[\"to left\",\"to right\",\"to top\",\"to bottom\"],optionTitles:[\"Left\",\"Right\",\"Up\",\"Down\"],displaySegmentedControl:true,optionIcons:[\"direction-left\",\"direction-right\",\"direction-up\",\"direction-down\"],defaultValue:\"to bottom\"},cornerRadius:{type:ControlType.Number,title:\"Corner Radius\",min:0,max:100,step:1,unit:\"px\"},easing:{type:ControlType.Enum,title:\"Easing\",options:[\"linear\",\"easeIn\",\"easeInOut\",\"exponential\"],optionTitles:[\"Linear\",\"Ease In\",\"Ease In-Out\",\"Exponential\"],defaultValue:\"easeInOut\"},grayScale:{type:ControlType.Number,title:\"Gray Scale\",min:0,max:100,defaultValue:0,unit:\"%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Gradientease\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"200\",\"framerDisableUnlink\":\"*\",\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gradient_ease.map"],"mappings":"6MASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,oBAAkB,eAAa,SAAO,aAAW,EAC8O,EAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAA3H,mBAAmB,EAAkB,MAAnQ,EAAW,EAAc,KAAa,MAAM,KAAK,CAAC,OAAO,EAAc,EAAE,EAAE,IAAI,CAAC,IAAM,EAAE,GAAG,EAAc,GAA8B,MAAM,eAAe,EAAU,KAA7C,EAAW,EAAE,CAA4C,IAAI,EAAE,IAAI,IAAK,CAAC,KAAK,KAAK,EAAiF,EAAQ,GAAQ,CAAC,GAA+D,aAAa,EAAa,CAAC,OAAoB,EAAK,EAAO,IAAI,CAAO,QAAM,CAAC,oBAV5a,IAAkC,IAAoD,CAC3H,EAAQ,CAAC,OAAO,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,EAAE,EAAW,OAAK,EAAE,GAAG,CASiW,EAAa,aAAa,CAAC,kBAAkB,YAAY,aAAa,EAAE,OAAO,YAAY,UAAU,EAAE,CAAC,EAAoB,EAAa,CAAC,kBAAkB,CAAC,KAAK,EAAY,KAAK,MAAM,YAAY,QAAQ,CAAC,UAAU,WAAW,SAAS,YAAY,CAAC,aAAa,CAAC,OA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