{"version":3,"file":"IconHoverText.wHGKnBio.mjs","names":["useState","useMemo"],"sources":["https:/framerusercontent.com/modules/ZB4RsNDrgEUVWbEziNmp/SB0JC83sLKPbDUvn9wbO/IconHoverText.js"],"sourcesContent":["// Icon with animated text component - SVG icon above text with hover animation and customizable properties\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * Icon with Animated Text\n * \n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function IconHoverText(props){const{icon={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Icon\"},iconSize=32,iconColor=\"#000000\",iconHoverColor=\"#0099FF\",text=\"About Us\",font,textColor=\"#000000\",hoverTextColor=\"#0099FF\",link=\"\",gap=12,alignment=\"center\",layout=\"vertical\",showBorder=true,borderColor=\"#333333\",borderWidth=2,borderRadius=16,backgroundColor=\"transparent\",hoverBackgroundColor=\"transparent\",padding=\"40px\",hoverBorderColor=\"#0099FF\",hoverBorderWidth=2,animationDuration=.3,animationDelay=.02}=props;const[isHovered,setIsHovered]=useState(false);const handleClick=()=>{if(link&&typeof window!==\"undefined\"){if(link.startsWith(\"http\")||link.startsWith(\"mailto:\")||link.startsWith(\"tel:\")){window.open(link,\"_blank\");}else{window.location.href=link;}}};const containerStyle={display:\"flex\",flexDirection:layout===\"vertical\"?\"column\":\"row\",alignItems:alignment===\"left\"?\"flex-start\":alignment===\"right\"?\"flex-end\":\"center\",justifyContent:\"center\",gap:`${gap}px`,cursor:link?\"pointer\":\"default\",padding:padding,backgroundColor:backgroundColor,border:showBorder?`${borderWidth}px solid ${borderColor}`:\"none\",borderRadius:`${borderRadius}px`,...props.style};const iconStyle={width:`${iconSize}px`,height:`${iconSize}px`,flexShrink:0};// Create letters array for animation\nconst letters=useMemo(()=>{return text.split(\"\").map((letter,index)=>({letter:letter===\" \"?\"\\xa0\":letter,index}));},[text]);return /*#__PURE__*/_jsxs(motion.div,{style:containerStyle,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),onClick:link?handleClick:undefined,animate:{borderColor:isHovered?hoverBorderColor:borderColor,borderWidth:isHovered?hoverBorderWidth:borderWidth,backgroundColor:isHovered?hoverBackgroundColor:backgroundColor},transition:{duration:animationDuration,ease:\"easeOut\"},children:[/*#__PURE__*/_jsx(motion.div,{style:{...iconStyle,backgroundColor:iconColor,mask:`url(${icon.src}) no-repeat center / contain`,WebkitMask:`url(${icon.src}) no-repeat center / contain`},animate:{backgroundColor:isHovered?iconHoverColor:iconColor},transition:{duration:animationDuration,ease:\"easeOut\"}}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",position:\"relative\",textAlign:alignment,...font},children:letters.map(({letter,index})=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"inline-block\",position:\"relative\",overflow:\"hidden\",height:\"1.2em\"},children:[/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\",color:textColor,...font},animate:{y:isHovered?\"-100%\":0,color:isHovered?hoverTextColor:textColor},transition:{duration:animationDuration,delay:index*animationDelay,ease:\"easeOut\"},children:letter}),/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\",position:\"absolute\",left:0,top:\"100%\",color:hoverTextColor,...font},animate:{y:isHovered?\"-100%\":0},transition:{duration:animationDuration,delay:index*animationDelay,ease:\"easeOut\"},children:letter})]},index))})]});}addPropertyControls(IconHoverText,{icon:{type:ControlType.ResponsiveImage,title:\"SVG Icon\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:32,min:16,max:128,step:1,unit:\"px\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},iconHoverColor:{type:ControlType.Color,title:\"Icon Hover Color\",defaultValue:\"#0099FF\"},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:1,min:.5,max:5,step:.5,unit:\"px\"},text:{type:ControlType.String,title:\"Text\",defaultValue:\"About Us\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#0099FF\"},link:{type:ControlType.Link,title:\"Link\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:48,step:1,unit:\"px\"},alignment:{type:ControlType.Enum,title:\"Alignment\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"center\",displaySegmentedControl:true},showBorder:{type:ControlType.Boolean,title:\"Show Border\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#333333\",hidden:({showBorder})=>!showBorder},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:2,min:1,max:10,step:1,unit:\"px\",hidden:({showBorder})=>!showBorder},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\",hidden:({showBorder})=>!showBorder},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"transparent\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background Color\",defaultValue:\"transparent\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"40px\"},hoverBorderColor:{type:ControlType.Color,title:\"Hover Border Color\",defaultValue:\"#0099FF\",hidden:({showBorder})=>!showBorder},hoverBorderWidth:{type:ControlType.Number,title:\"Hover Border Width\",defaultValue:2,min:1,max:10,step:1,unit:\"px\",hidden:({showBorder})=>!showBorder},animationDuration:{type:ControlType.Number,title:\"Animation Duration\",defaultValue:.3,min:.1,max:2,step:.1,unit:\"s\"},animationDelay:{type:ControlType.Number,title:\"Animation Delay\",defaultValue:.02,min:0,max:.1,step:.01,unit:\"s\"},layout:{type:ControlType.Enum,title:\"Layout Direction\",options:[\"vertical\",\"horizontal\"],optionTitles:[\"Vertical\",\"Horizontal\"],defaultValue:\"vertical\",displaySegmentedControl:true},layoutType:{type:ControlType.Enum,title:\"Layout Type\",options:[\"stack\",\"grid\"],optionTitles:[\"Stack\",\"Grid\"],defaultValue:\"stack\",displaySegmentedControl:true},distribution:{type:ControlType.Enum,title:\"Distribution\",options:[\"start\",\"center\",\"end\",\"space-between\",\"space-around\",\"space-evenly\"],optionTitles:[\"Start\",\"Center\",\"End\",\"Space Between\",\"Space Around\",\"Space Evenly\"],defaultValue:\"center\"},itemAlignment:{type:ControlType.Enum,title:\"Item Alignment\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Start\",\"Center\",\"End\"],defaultValue:\"center\",displaySegmentedControl:true},wrap:{type:ControlType.Boolean,title:\"Wrap\",defaultValue:false,enabledTitle:\"Wrap\",disabledTitle:\"No Wrap\"},layoutGap:{type:ControlType.Number,title:\"Layout Gap\",defaultValue:12,min:0,max:100,step:1,unit:\"px\"},layoutPadding:{type:ControlType.Object,title:\"Layout Padding\",controls:{top:{type:ControlType.Number,title:\"Top\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},right:{type:ControlType.Number,title:\"Right\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},bottom:{type:ControlType.Number,title:\"Bottom\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},left:{type:ControlType.Number,title:\"Left\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"}},defaultValue:{top:0,right:0,bottom:0,left:0}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IconHoverText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IconHoverText.map"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