{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/A0RMhtJ49NPlOntYXJOl/Abo0zez5rTgIsVXSoPHU/FadeIt.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";// Code component provided by Eleveight Supply. All rights reserved 2024.\nfunction generateMaskImage(easing,direction){let cssDirection;switch(direction){case\"to right\":cssDirection=\"to left\";break;case\"to left\":cssDirection=\"to right\";break;case\"to top\":cssDirection=\"to bottom\";break;case\"to bottom\":cssDirection=\"to top\";break;default:cssDirection=\"to bottom\";}switch(easing){case\"linear\":return`linear-gradient(${cssDirection}, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 25%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 75%, rgba(0,0,0,1) 100%)`;case\"ease-in\":return`linear-gradient(${cssDirection}, rgba(0,0,0,0) 10%, rgba(0,0,0,0.2) 30%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,1) 90%)`;case\"ease-out\":return`linear-gradient(${cssDirection}, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 80%)`;case\"ease-in-out\":return`linear-gradient(${cssDirection}, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 15%, rgba(0,0,0,0.2) 25%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,1) 100%)`;}}/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any-prefer-fit\n * @framerSupportedLayoutHeight any-prefer-fit\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n */export default function FadeIt({children,type,image,gradientDirection,maskEasing,isMixed,topLeft,topRight,bottomRight,bottomLeft}){const borderRadius=isMixed?`${topLeft}px ${topRight}px ${bottomRight}px ${bottomLeft}px`:`${topLeft}px`;const contentStyle={width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",position:\"relative\",WebkitMaskImage:generateMaskImage(maskEasing,gradientDirection),maskImage:generateMaskImage(maskEasing,gradientDirection),objectFit:\"cover\",borderRadius:type===\"image\"?borderRadius:\"0px\"};return /*#__PURE__*/_jsxs(Frame,{background:null,style:contentStyle,children:[type===\"component\"&&React.Children.count(children)===0&&/*#__PURE__*/_jsx(\"div\",{style:{width:\"200px\",height:\"200px\",background:\"#333\",color:\"#FFFFFF\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",textAlign:\"center\"},children:\"Connect to a frame\"}),type===\"component\"&&React.Children.count(children)>0&&/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\"},children:children}),type===\"image\"&&!image&&/*#__PURE__*/_jsx(\"div\",{style:{...contentStyle,background:\"#555\",width:\"250px\",height:\"200px\",display:\"flex\",color:\"#FFFFFF\",textAlign:\"center\"},children:\"Upload an image\"}),type===\"image\"&&image&&/*#__PURE__*/_jsx(\"img\",{style:contentStyle,src:image.src,alt:\"Uploaded image\"})]});}FadeIt.defaultProps={type:\"image\",maskDirection:180,maskEasing:\"linear\",isMixed:false,topLeft:0,topRight:0,bottomRight:0,bottomLeft:0};addPropertyControls(FadeIt,{type:{type:ControlType.Enum,options:[\"image\",\"component\"],optionTitles:[\"Image\",\"Frame\"],defaultValue:\"image\",displaySegmentedControl:true,segmentedControlDirection:\"horizontal\"},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\"},maskEasing:{type:ControlType.Enum,title:\"Mask Easing\",options:[\"linear\",\"ease-in\",\"ease-out\",\"ease-in-out\"],optionTitles:[\"Linear\",\"Ease-In\",\"Ease-Out\",\"Ease-In-Out\"],defaultValue:\"linear\"},radius:{type:ControlType.FusedNumber,title:\"Radius\",defaultValue:0,toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"topLeft\",\"topRight\",\"bottomRight\",\"bottomLeft\"],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0,hidden:({type})=>type!==\"image\"},children:{type:ControlType.ComponentInstance,hidden:({type})=>type===\"image\"},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:({type})=>type===\"component\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FadeIt\",\"slots\":[\"children\"],\"annotations\":{\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"any-prefer-fit\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"any-prefer-fit\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FadeIt.map"],
  "mappings": "8GACA,SAASA,EAAkBC,EAAOC,EAAU,CAAC,IAAIC,EAAa,OAAOD,EAAU,CAAC,IAAI,WAAWC,EAAa,UAAU,MAAM,IAAI,UAAUA,EAAa,WAAW,MAAM,IAAI,SAASA,EAAa,YAAY,MAAM,IAAI,YAAYA,EAAa,SAAS,MAAM,QAAQA,EAAa,WAAY,CAAC,OAAOF,EAAO,CAAC,IAAI,SAAS,MAAM,mBAAmBE,CAAY,yGAAyG,IAAI,UAAU,MAAM,mBAAmBA,CAAY,oFAAoF,IAAI,WAAW,MAAM,mBAAmBA,CAAY,yCAAyC,IAAI,cAAc,MAAM,mBAAmBA,CAAY,8HAA+H,CAAC,CAQr1B,SAARC,EAAwB,CAAC,SAAAC,EAAS,KAAAC,EAAK,MAAAC,EAAM,kBAAAC,EAAkB,WAAAC,EAAW,QAAAC,EAAQ,QAAAC,EAAQ,SAAAC,EAAS,YAAAC,EAAY,WAAAC,CAAU,EAAE,CAAC,IAAMC,EAAaL,EAAQ,GAAGC,CAAO,MAAMC,CAAQ,MAAMC,CAAW,MAAMC,CA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K,0BAA0B,YAAY,EAAE,kBAAkB,CAAC,KAAKA,EAAY,KAAK,MAAM,YAAY,QAAQ,CAAC,UAAU,WAAW,SAAS,WAAW,EAAE,aAAa,CAAC,OAAO,QAAQ,KAAK,MAAM,EAAE,wBAAwB,GAAK,YAAY,CAAC,iBAAiB,kBAAkB,eAAe,gBAAgB,EAAE,aAAa,WAAW,EAAE,WAAW,CAAC,KAAKA,EAAY,KAAK,MAAM,cAAc,QAAQ,CAAC,SAAS,UAAU,WAAW,aAAa,EAAE,aAAa,CAAC,SAAS,UAAU,WAAW,aAAa,EAAE,aAAa,QAAQ,EAAE,OAAO,CAAC,KAAKA,EAAY,YAAY,MAAM,SAAS,aAAa,EAAE,UAAU,UAAU,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,UAAU,WAAW,cAAc,YAAY,EAAE,YAAY,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,KAAAhB,CAAI,IAAIA,IAAO,OAAO,EAAE,SAAS,CAAC,KAAKgB,EAAY,kBAAkB,OAAO,CAAC,CAAC,KAAAhB,CAAI,IAAIA,IAAO,OAAO,EAAE,MAAM,CAAC,KAAKgB,EAAY,gBAAgB,MAAM,QAAQ,OAAO,CAAC,CAAC,KAAAhB,CAAI,IAAIA,IAAO,WAAW,CAAC,CAAC",
  "names": ["generateMaskImage", "easing", "direction", "cssDirection", "FadeIt", "children", "type", "image", "gradientDirection", "maskEasing", "isMixed", "topLeft", "topRight", "bottomRight", "bottomLeft", "borderRadius", "contentStyle", "u", "Frame", "j", "p", "addPropertyControls", "ControlType"]
}
