{"version":3,"file":"Image_Grid_Reveal.D2O2XALO.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,CAAa,MAAM,KAAK,OAAO,EAAE,CAAiB,EAAkB,CAAvK,EAAS,EAA8L,CAAK,CAAC,CAAC,KAAK,EAAM,KAAS,CAAC,QAAM,OAAK,EAAE,EAAE,OAAoB,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,MAAM,EAAE,SAAS,CAAc,EAAK,MAAM,CAAC,IAAI,EAAK,OAAO,2CAA2C,IAAI,EAAK,QAAQ,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,EAAK,MAAM,OAAO,CAAC,CAAC,EAAe,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,E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