{"version":3,"file":"QuickNavCard.PVOLMtw7.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/Wt0duHw0ip2mhHo9BdcI/4qcNsmosaBwIgD66Mq9A/QuickNavCard.js"],"sourcesContent":["// Quick navigation tilt card with image icon and text description\n// Dynamic with mouse hover and press animations\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{motion,useMotionValue,useSpring,useTransform}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function QuickNavCard(props){const{icon={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Icon\"},title,description,backgroundColor,textColor,titleFont,descriptionFont,borderRadius,borderWidth,borderColor,tiltIntensity,layout}=props;const[isPressed,setIsPressed]=useState(false);const x=useMotionValue(0);const y=useMotionValue(0);const mouseXSpring=useSpring(x,{stiffness:300,damping:30});const mouseYSpring=useSpring(y,{stiffness:300,damping:30});const rotateX=useTransform(mouseYSpring,[-.5,.5],[tiltIntensity,-tiltIntensity]);const rotateY=useTransform(mouseXSpring,[-.5,.5],[-tiltIntensity,tiltIntensity]);const handleMouseMove=e=>{const rect=e.currentTarget.getBoundingClientRect();const width=rect.width;const height=rect.height;const mouseX=e.clientX-rect.left;const mouseY=e.clientY-rect.top;const xPct=mouseX/width-.5;const yPct=mouseY/height-.5;x.set(xPct);y.set(yPct);};const handleMouseLeave=()=>{x.set(0);y.set(0);};return /*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",perspective:1e3,position:\"relative\"},onMouseMove:handleMouseMove,onMouseLeave:handleMouseLeave,onMouseDown:()=>setIsPressed(true),onMouseUp:()=>setIsPressed(false),children:/*#__PURE__*/_jsxs(motion.div,{style:{width:\"100%\",height:\"100%\",backgroundColor,borderRadius,border:`${borderWidth}px solid ${borderColor}`,display:\"flex\",flexDirection:layout===\"horizontal\"?\"row\":\"column\",alignItems:\"center\",justifyContent:layout===\"horizontal\"?\"flex-start\":\"space-between\",padding:24,gap:16,cursor:\"pointer\",position:\"relative\",rotateX,rotateY,transformStyle:\"preserve-3d\"},whileHover:{scale:1.01,boxShadow:\"0 20px 40px rgba(0, 0, 0, 0.15)\"},animate:{scale:isPressed?.95:1,boxShadow:isPressed?\"0 5px 15px rgba(0, 0, 0, 0.1)\":\"0 10px 30px rgba(0, 0, 0, 0.1)\"},transition:{type:\"spring\",stiffness:400,damping:25},children:[/*#__PURE__*/_jsx(motion.div,{style:{width:80,height:80,borderRadius:12,overflow:\"hidden\",transform:\"translateZ(20px)\"},whileHover:{scale:1.1},transition:{type:\"spring\",stiffness:400,damping:20},children:/*#__PURE__*/_jsx(\"img\",{src:icon.src,alt:icon.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:layout===\"horizontal\"?\"flex-start\":\"center\",justifyContent:\"center\",gap:8,textAlign:layout===\"horizontal\"?\"left\":\"center\",transform:\"translateZ(10px)\",width:\"100%\",flex:1},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,...titleFont},children:title}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,opacity:.7,...descriptionFont},children:description})]})]})})});}addPropertyControls(QuickNavCard,{layout:{type:ControlType.Enum,title:\"Layout\",options:[\"vertical\",\"horizontal\"],optionTitles:[\"Vertical\",\"Horizontal\"],defaultValue:\"vertical\",displaySegmentedControl:true},icon:{type:ControlType.ResponsiveImage,title:\"Icon\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Quick Nav\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"Navigate quickly\",displayTextArea:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:4,min:0,max:20,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},descriptionFont:{type:ControlType.Font,title:\"Description Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},tiltIntensity:{type:ControlType.Number,title:\"Tilt Intensity\",defaultValue:15,min:0,max:30,step:1,unit:\"deg\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"QuickNavCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./QuickNavCard.map"],"mappings":"8PAKG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,CAAC,IAAI,sEAAsE,IAAI,MAAM,EAAE,QAAM,cAAY,kBAAgB,YAAU,YAAU,kBAAgB,eAAa,cAAY,cAAY,gBAAc,UAAQ,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,EAAE,EAAe,CAAC,EAAQ,EAAE,EAAe,CAAC,EAAQ,EAAa,EAAU,EAAE,CAAC,UAAU,IAAI,QAAQ,EAAE,CAAC,EAAmE,EAAQ,EAAtD,EAAU,EAAE,CAAC,UAAU,IAAI,QAAQ,EAAE,CAAyC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAc,CAAC,CAAa,CAAC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