{"version":3,"file":"Fade_Pattern_1.DrnlQPHN.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/oJ75GDhSbGo8fBobbBv1/HeS5FZPeEWlR8o2qrb7a/Fade_Pattern_1.js"],"sourcesContent":["// FadePattern made out of small rounded squares with random opacities, responsive layer with color control and fade to transparent at bottom\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function FadePattern(props){const{squareColor=\"#000000\",squareSize=8,spacing=4,rows=20,columns=30,borderRadius=2,fadeIntensity=.8}=props;const squares=useMemo(()=>{const squareElements=[];for(let row=0;row<rows;row++){for(let col=0;col<columns;col++){const randomOpacity=Math.random();const fadeProgress=row/(rows-1);const fadeMultiplier=1-fadeProgress*fadeIntensity;const finalOpacity=randomOpacity*fadeMultiplier;squareElements.push(/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:col*(squareSize+spacing),top:row*(squareSize+spacing),width:squareSize,height:squareSize,backgroundColor:squareColor,opacity:finalOpacity,borderRadius:borderRadius}},`${row}-${col}`));}}return squareElements;},[squareColor,squareSize,spacing,rows,columns,borderRadius,fadeIntensity]);const containerWidth=columns*(squareSize+spacing)-spacing;const containerHeight=rows*(squareSize+spacing)-spacing;const isFixedWidth=props?.style&&props.style.width===\"100%\";const isFixedHeight=props?.style&&props.style.height===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",overflow:\"hidden\",width:isFixedWidth?\"100%\":containerWidth,height:isFixedHeight?\"100%\":containerHeight,minWidth:isFixedWidth?\"100%\":containerWidth,minHeight:isFixedHeight?\"100%\":containerHeight},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:containerWidth,height:containerHeight,transform:isFixedWidth||isFixedHeight?`scale(${Math.min(isFixedWidth?((props?.style?.width)||containerWidth)/containerWidth:1,isFixedHeight?((props?.style?.height)||containerHeight)/containerHeight:1)})`:\"none\",transformOrigin:\"top left\"},children:squares})});}addPropertyControls(FadePattern,{squareColor:{type:ControlType.Color,title:\"Square Color\",defaultValue:\"#000000\"},squareSize:{type:ControlType.Number,title:\"Square Size\",defaultValue:8,min:2,max:20,step:1,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Spacing\",defaultValue:4,min:0,max:20,step:1,unit:\"px\"},rows:{type:ControlType.Number,title:\"Rows\",defaultValue:20,min:5,max:200,step:1},columns:{type:ControlType.Number,title:\"Columns\",defaultValue:30,min:5,max:200,step:1},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:2,min:0,max:10,step:.5,unit:\"px\"},fadeIntensity:{type:ControlType.Number,title:\"Fade Intensity\",defaultValue:.8,min:0,max:1,step:.1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FadePattern\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Fade_Pattern_1.map"],"mappings":"2KAIG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,cAAY,UAAU,aAAW,EAAE,UAAQ,EAAE,OAAK,GAAG,UAAQ,GAAG,eAAa,EAAE,gBAAc,IAAI,EAAY,EAAQA,MAAY,CAAC,IAAM,EAAe,EAAE,CAAC,IAAI,IAAI,EAAI,EAAE,EAAI,EAAK,IAAO,IAAI,IAAI,EAAI,EAAE,EAAI,EAAQ,IAAM,CAAqH,IAAM,EAAtG,KAAK,QAAQ,EAAsD,EAAlC,GAAK,EAAK,GAAuC,GAA8D,EAAe,KAAkB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,KAAK,GAAK,EAAW,GAAS,IAAI,GAAK,EAAW,GAAS,MAAM,EAAW,OAAO,EAAW,gBAAgB,EAAY,QAAQ,EAA0B,eAAa,CA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