{"version":3,"file":"Image_Grid_Reveal.BLSctPaE.mjs","names":[],"sources":["https:/framerusercontent.com/modules/9nLxutJppAcPaRPeewvY/0NSN9nG5oPS2xeV2Dzkl/Image_Grid_Reveal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 500\n * @framerIntrinsicHeight 500\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Image_Grid_Reveal(props){const{fill,gridSize,delay,trigger,gridColor}=props;const gridAmount=gridSize*gridSize;const generateRandomDelays=(numberOfItems,maxAnimationDelay)=>Array.from({length:numberOfItems},()=>Math.random()*maxAnimationDelay);const gridItems=generateRandomDelays(gridAmount,delay).map((delay,index)=>({index,delay}));return /*#__PURE__*/_jsxs(motion.div,{style:{width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"img\",{src:fill.image||\"https://i.ibb.co/t2GJF1H/placeholder.jpg\",alt:fill.altText,style:{width:\"100%\",height:\"100%\",objectFit:fill.type||\"cover\"}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:0,bottom:0,right:0,zIndex:1,display:\"grid\",gridTemplateRows:`repeat(${gridSize}, auto)`,gridTemplateColumns:`repeat(${gridSize}, 1fr)`},children:gridItems.map(({index,delay})=>/*#__PURE__*/_jsx(motion.div,{style:{backgroundColor:gridColor},initial:{opacity:1},whileInView:trigger===\"view\"?{opacity:0}:{},animate:trigger===\"appear\"?{opacity:0}:{},transition:{delay}},index))})]});}Image_Grid_Reveal.displayName=\"Image Grid Reveal\";addPropertyControls(Image_Grid_Reveal,{fill:{type:ControlType.Object,title:\"Fill\",controls:{image:{title:\"Image\",type:ControlType.Image},type:{title:\"Type\",type:ControlType.Enum,defaultValue:\"cover\",options:[\"cover\",\"contain\",\"fill\",\"none\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\",\"None\"]},altText:{title:\"Alt Text\",type:ControlType.String}}},delay:{title:\"Delay(s)\",type:ControlType.Number,defaultValue:1},gridSize:{title:\"Grid Size\",type:ControlType.Number,defaultValue:10,max:100},trigger:{title:\"Trigger\",type:ControlType.Enum,defaultValue:\"appear\",options:[\"appear\",\"view\"],optionTitles:[\"On Appear\",\"Layer in View\"]},gridColor:{title:\"Grid Color\",type:ControlType.Color,defaultValue:\"#050505\",description:\"Match it with your site's background color.\\nMore components at [Framer University](https://frameruni.link/cc).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Image_Grid_Reveal\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"500\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"500\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Image_Grid_Reveal.map"],"mappings":"oNAQG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,OAAK,WAAS,QAAM,UAAQ,aAAW,EAAoL,IAA/G,EAAc,IAAoB,MAAM,KAAK,CAAC,OAAO,EAAc,KAAK,KAAK,QAAQ,CAAC,EAAkB,EAAtJ,EAAS,EAA8L,EAAM,CAAC,KAAK,EAAM,KAAS,CAAC,QAAM,MAAA,EAAM,EAAE,CAAC,OAAoB,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,IAAI,EAAK,OAAO,2CAA2C,IAAI,EAAK,QAAQ,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,EAAK,MAAM,QAAQ,CAAC,CAAC,CAAc,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE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