{"version":3,"file":"HoverFrame.DF5POL92.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/sfKkFv9E9R6fWbkySCEm/qNFpABC53m5tKBqtq8Uo/HoverFrame.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Hover Frame with Text\n *\n * A frame and text layer that share a hover state.\n * Hovering the frame changes the border, fill, and text colors.\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 80\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function HoverFrame(props){const{text=\"Hover me\",borderColor=\"#CCCCCC\",hoverBorderColor=\"#000000\",backgroundColor=\"#FFFFFF\",hoverBackgroundColor=\"#000000\",textColor=\"#000000\",hoverTextColor=\"#FFFFFF\",borderWidth=2,borderRadius=8,paddingTop=16,paddingBottom=16,paddingLeft=16,paddingRight=16,font,gap=0,link=\"\",openInNewTab=false}=props;const[isHovered,setIsHovered]=useState(false);const handleMouseEnter=()=>{startTransition(()=>setIsHovered(true));};const handleMouseLeave=()=>{startTransition(()=>setIsHovered(false));};const handleClick=()=>{if(!link)return;if(openInNewTab){window.open(link,\"_blank\",\"noopener,noreferrer\");}else{window.location.href=link;}};const currentBorderColor=isHovered?hoverBorderColor:borderColor;const currentBackgroundColor=isHovered?hoverBackgroundColor:backgroundColor;const currentTextColor=isHovered?hoverTextColor:textColor;const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",border:`${borderWidth}px solid ${currentBorderColor}`,backgroundColor:currentBackgroundColor,borderRadius,paddingTop,paddingBottom,paddingLeft,paddingRight,gap,cursor:link?\"pointer\":\"default\",transition:\"all 0.2s ease\",...isFixedWidth?{}:{minWidth:\"max-content\"}},onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,onClick:handleClick,role:link?\"link\":undefined,tabIndex:link?0:undefined,children:/*#__PURE__*/_jsx(\"span\",{style:{color:currentTextColor,transition:\"color 0.2s ease\",...font},children:text})});}addPropertyControls(HoverFrame,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hover me\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#CCCCCC\"},hoverBorderColor:{type:ControlType.Color,title:\"Hover Border\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#FFFFFF\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:2,min:0,max:20,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:100,step:1,unit:\"px\"},paddingTop:{type:ControlType.Number,title:\"Padding Top\",defaultValue:16,min:0,max:100,step:1,unit:\"px\"},paddingBottom:{type:ControlType.Number,title:\"Padding Bottom\",defaultValue:16,min:0,max:100,step:1,unit:\"px\"},paddingLeft:{type:ControlType.Number,title:\"Padding Left\",defaultValue:16,min:0,max:100,step:1,unit:\"px\"},paddingRight:{type:ControlType.Number,title:\"Padding Right\",defaultValue:16,min:0,max:100,step:1,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},link:{type:ControlType.Link,title:\"Link URL\",defaultValue:\"\"},openInNewTab:{type:ControlType.Boolean,title:\"Open In New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HoverFrame\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"200\",\"framerIntrinsicHeight\":\"80\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HoverFrame.map"],"mappings":"0LAWG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,OAAK,WAAW,cAAY,UAAU,mBAAiB,UAAU,kBAAgB,UAAU,uBAAqB,UAAU,YAAU,UAAU,iBAAe,UAAU,cAAY,EAAE,eAAa,EAAE,aAAW,GAAG,gBAAc,GAAG,cAAY,GAAG,eAAa,GAAG,OAAK,MAAI,EAAE,OAAK,GAAG,eAAa,IAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,MAAqB,CAAC,MAAoB,EAAa,EAAI,CAAC,CAAE,EAAQ,MAAqB,CAAC,MAAoB,EAAa,EAAK,CAAC,CAAE,EAAQ,MAAgB,CAAK,IAAe,EAAc,EAAO,KAAK,EAAK,SAAS,qBAAqB,EAAQ,EAAO,SAAS,KAAK,EAAM,EAAQ,EAAmB,EAAU,EAAiB,EAAkB,EAAuB,EAAU,EAAqB,EAAsB,EAAiB,EAAU,EAAe,EAAgB,EAAa,GAAO,OAAO,EAAM,MAAM,QAAQ,OAAO,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,QAAQ,OAAO,cAAc,SAAS,eAAe,SAAS,WAAW,SAAS,OAAO,GAAG,EAAY,WAAW,IAAqB,gBAAgB,EAAuB,eAAa,aAAW,gBAAc,cAAY,eAAa,MAAI,OAAO,EAAK,UAAU,UAAU,WAAW,gBAAgB,GAAG,EAAa,CAAC,EAAE,CAAC,SAAS,aAAa,CAAC,EAAE,a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