{"version":3,"file":"ProgressiveBlur.CI8QBXZI.mjs","names":[],"sources":["https:/framerusercontent.com/modules/oIa9jYqVoiduNUSqRQ7h/utuZoJKJkJROgiqROlgk/ProgressiveBlur.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const computeDirection=dir=>{switch(dir){case\"toTop\":return\"to top\";case\"toLeft\":return\"to left\";case\"toRight\":return\"to right\";case\"toBottom\":default:return\"to bottom\";}};// Code component provided by Eleveight Supply™. All rights reserved 2024.\n/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ProgressiveBlur(props){const{blur,blurDirection,allCorners,radius,topLeft,topRight,bottomRight,bottomLeft}=props;const layers=[];const base=blur;const dir=computeDirection(blurDirection);for(let i=0;i<8;i++){const b=base/2**(8-i);const start=(i*12.5).toFixed(1);const mid1=(+start+12.5).toFixed(1);const mid2=(+start+25).toFixed(1);const end=(+start+37.5).toFixed(1);layers.push({blur:`${b}px`,gradient:[`rgba(0,0,0,0) ${start}%`,`rgba(0,0,0,1) ${mid1}%`,`rgba(0,0,0,1) ${mid2}%`,`rgba(0,0,0,0) ${end}%`].join(\", \")});}const cornerRadius=allCorners?`${radius}px`:`${topLeft}px ${topRight}px ${bottomRight}px ${bottomLeft}px`;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:cornerRadius,overflow:\"hidden\",background:\"none\"},children:layers.map((layer,idx)=>/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,zIndex:idx+1,pointerEvents:\"none\",backdropFilter:`blur(${layer.blur})`,WebkitBackdropFilter:`blur(${layer.blur})`,maskImage:`linear-gradient(${dir}, ${layer.gradient})`,WebkitMaskImage:`linear-gradient(${dir}, ${layer.gradient})`,borderRadius:cornerRadius}},idx))});}ProgressiveBlur.defaultProps={blur:10,blurDirection:\"toBottom\",allCorners:true,radius:0,topLeft:0,topRight:0,bottomRight:0,bottomLeft:0};addPropertyControls(ProgressiveBlur,{blur:{type:ControlType.Number,title:\"Blur\",defaultValue:10,min:0,max:100,step:1},blurDirection:{type:ControlType.SegmentedEnum,title:\"Direction\",options:[\"toBottom\",\"toTop\",\"toLeft\",\"toRight\"],optionTitles:[\"↓\",\"↑\",\"←\",\"→\"],defaultValue:\"toBottom\"},cornerRadius:{type:ControlType.FusedNumber,title:\"Radius\",toggleKey:\"allCorners\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"topLeft\",\"topRight\",\"bottomRight\",\"bottomLeft\"],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],defaultValue:0,min:0,max:200,step:1,description:\"If you need rounded corners, apply them here—don’t put them on the parent container or the blur will break.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressiveBlur\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"*\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"300\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressiveBlur.map"],"mappings":"6JASG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,gBAAc,aAAW,SAAO,UAAQ,WAAS,cAAY,cAAY,EAAY,EAAO,CAAC,EAAQ,EAAK,EAAW,EAAI,EAAiB,CAAa,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,IAAM,EAAE,EAAK,IAAI,EAAE,GAAS,GAAO,EAAE,KAAA,CAAM,QAAQ,CAAC,EAAQ,GAAM,CAAC,EAAM,KAAA,CAAM,QAAQ,CAAC,EAAQ,GAAM,CAAC,EAAM,G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