{"version":3,"file":"BackgroundBoxes.Bad0mLGP.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/ejk4V7570VMdYd0TU9RB/0d3IZgcUQU3VbzZYQrFC/BackgroundBoxes.js"],"sourcesContent":["// Background Boxes - Animated grid with hover effects and random colors\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Background Boxes - Animated grid with hover effects\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BackgroundBoxes(props){const{rows=150,cols=100,boxWidth=64,boxHeight=32,borderColor=\"#374151\",borderWidth=1,showCrosses=true,crossColor=\"#374151\",hoverColors=[\"#7DD3FC\",\"#F9A8D4\",\"#86EFAC\",\"#FDE047\",\"#FCA5A5\",\"#D8B4FE\",\"#93C5FD\",\"#A5B4FC\",\"#C4B5FD\"],skewX=-48,skewY=14,scale=.675,rotation=0,translateX=-40,translateY=-60,style}=props;const rowsArray=useMemo(()=>new Array(rows).fill(1),[rows]);const colsArray=useMemo(()=>new Array(cols).fill(1),[cols]);const getRandomColor=()=>{return hoverColors[Math.floor(Math.random()*hoverColors.length)];};const transformStyle=`translate(${translateX}%, ${translateY}%) skewX(${skewX}deg) skewY(${skewY}deg) scale(${scale}) rotate(${rotation}deg) translateZ(0)`;return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"25%\",top:\"-25%\",display:\"flex\",transform:transformStyle,width:\"100%\",height:\"100%\",zIndex:0,padding:\"16px\"},children:rowsArray.map((_,i)=>/*#__PURE__*/_jsx(motion.div,{style:{width:`${boxWidth}px`,height:`${boxHeight}px`,borderLeft:`${borderWidth}px solid ${borderColor}`,position:\"relative\"},children:colsArray.map((_,j)=>/*#__PURE__*/_jsx(motion.div,{whileHover:{backgroundColor:getRandomColor(),transition:{duration:0}},animate:{transition:{duration:2}},style:{width:`${boxWidth}px`,height:`${boxHeight}px`,borderRight:`${borderWidth}px solid ${borderColor}`,borderTop:`${borderWidth}px solid ${borderColor}`,position:\"relative\"},children:showCrosses&&j%2===0&&i%2===0?/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:\"1.5\",stroke:\"currentColor\",style:{position:\"absolute\",height:\"24px\",width:\"40px\",top:\"-14px\",left:\"-22px\",color:crossColor,strokeWidth:\"1px\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"M12 6v12m6-6H6\"})}):null},`col${j}`))},`row${i}`))})});}addPropertyControls(BackgroundBoxes,{rows:{type:ControlType.Number,title:\"Rows\",defaultValue:150,min:10,max:300,step:10,displayStepper:true},cols:{type:ControlType.Number,title:\"Columns\",defaultValue:100,min:10,max:200,step:10,displayStepper:true},boxWidth:{type:ControlType.Number,title:\"Box Width\",defaultValue:64,min:20,max:100,step:4,unit:\"px\"},boxHeight:{type:ControlType.Number,title:\"Box Height\",defaultValue:32,min:10,max:80,step:2,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#374151\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:5,step:1,unit:\"px\"},showCrosses:{type:ControlType.Boolean,title:\"Show Crosses\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},crossColor:{type:ControlType.Color,title:\"Cross Color\",defaultValue:\"#374151\",hidden:({showCrosses})=>!showCrosses},hoverColors:{type:ControlType.Array,title:\"Hover Colors\",control:{type:ControlType.Color},defaultValue:[\"#7DD3FC\",\"#F9A8D4\",\"#86EFAC\",\"#FDE047\",\"#FCA5A5\",\"#D8B4FE\",\"#93C5FD\",\"#A5B4FC\",\"#C4B5FD\"],maxCount:15},skewX:{type:ControlType.Number,title:\"Skew X\",defaultValue:-48,min:-90,max:90,step:1,unit:\"deg\"},skewY:{type:ControlType.Number,title:\"Skew Y\",defaultValue:14,min:-90,max:90,step:1,unit:\"deg\"},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:.675,min:.1,max:2,step:.025},rotation:{type:ControlType.Number,title:\"Rotation\",defaultValue:0,min:-180,max:180,step:1,unit:\"deg\"},translateX:{type:ControlType.Number,title:\"Translate X\",defaultValue:-40,min:-100,max:100,step:5,unit:\"%\"},translateY:{type:ControlType.Number,title:\"Translate Y\",defaultValue:-60,min:-100,max:100,step:5,unit:\"%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackgroundBoxes\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackgroundBoxes.map"],"mappings":"2NAMG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,IAAI,OAAK,IAAI,WAAS,GAAG,YAAU,GAAG,cAAY,UAAU,cAAY,EAAE,cAAY,GAAK,aAAW,UAAU,cAAY,CAAC,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,UAAU,CAAC,QAAM,IAAI,QAAM,GAAG,QAAM,KAAK,WAAS,EAAE,aAAW,IAAI,aAAW,IAAI,SAAO,EAAY,EAAUA,MAAgB,MAAM,EAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAK,CAAC,CAAO,EAAUA,MAAgB,MAAM,EAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAK,CAAC,CAAO,MAA2B,EAAY,KAAK,MAAM,KAAK,QAAQ,CAAC,EAAY,OAAO,EAAU,EAAe,aAAa,EAAW,KAAK,EAAW,WAAW,EAAM,aAAa,EAAM,aAAa,EAAM,WAAW,EAAS,oBAAoB,OAAoB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