{"version":3,"file":"ASCIIButton_2.DBW-PVMX.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/7Zs6jl36aEqZHHzQxbOY/WNmiLsca51OMTOvLd1Xa/ASCIIButton_2.js"],"sourcesContent":["// Fix: ensure valid Framer defaults/typing for link+file props and element selection\n// ASCII-style button with customizable border, text, and styling options\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ASCIIButton(props){const{label=\"hello world\",backgroundColor=\"#000000\",textColor=\"#00FF00\",insideBorderColor=\"#00FF00\",insideBorderWidth=1,size=\"normal\",paddingVertical=12,paddingHorizontal=24,hoverEffect=true,hoverBackgroundColor=\"#00FF00\",hoverTextColor=\"#000000\",linkType=\"url\",link,uploadedFile=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",openInNewTab=false,onClick,style,buttonWidth=\"fit\"}=props;// Determine the effective href based on link type\nconst href=linkType===\"upload\"&&uploadedFile?uploadedFile:linkType===\"url\"&&link?link:undefined;const ButtonElement=href?\"a\":\"button\";const linkProps=href?{href,target:openInNewTab?\"_blank\":\"_self\",rel:openInNewTab?\"noopener noreferrer\":undefined}:{};const[isHovered,setIsHovered]=useState(false);const wrapperStyle={position:\"relative\",display:\"inline-block\",width:buttonWidth===\"full\"?\"100%\":\"max-content\",...style};const buttonStyle={backgroundColor:isHovered&&hoverEffect?hoverBackgroundColor:backgroundColor,color:isHovered&&hoverEffect?hoverTextColor:textColor,border:\"none\",paddingTop:(size===\"small\"?10:14)+insideBorderWidth,paddingBottom:(size===\"small\"?10:14)+insideBorderWidth,paddingLeft:(size===\"small\"?16:24)+insideBorderWidth,paddingRight:(size===\"small\"?16:24)+insideBorderWidth,cursor:\"pointer\",transition:hoverEffect?\"background-color 0.2s ease, color 0.2s ease\":\"none\",userSelect:\"none\",display:\"inline-block\",width:buttonWidth===\"full\"?\"100%\":\"auto\",position:\"relative\",minWidth:buttonWidth===\"full\"?0:\"max-content\",textDecoration:\"none\",fontFamily:\"Arimo, sans-serif\",fontWeight:700,fontSize:size===\"small\"?\"14px\":\"17px\",lineHeight:\"1em\",textAlign:\"center\"};const innerBorderContainerStyle={position:\"absolute\",top:insideBorderWidth,left:insideBorderWidth,right:insideBorderWidth,bottom:insideBorderWidth,pointerEvents:\"none\",overflow:\"visible\"};return /*#__PURE__*/_jsx(\"div\",{style:wrapperStyle,children:/*#__PURE__*/_jsxs(ButtonElement,{style:buttonStyle,onClick:onClick,...!href?{type:\"button\"}:{},...linkProps,onMouseEnter:()=>{if(hoverEffect){startTransition(()=>setIsHovered(true));}},onMouseLeave:()=>{if(hoverEffect){startTransition(()=>setIsHovered(false));}},children:[!(isHovered&&hoverEffect)&&/*#__PURE__*/_jsx(\"div\",{style:innerBorderContainerStyle,children:/*#__PURE__*/_jsx(\"svg\",{width:\"100%\",height:\"100%\",viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"rect\",{x:\"0\",y:\"0\",width:\"100\",height:\"100\",fill:\"none\",stroke:insideBorderColor,strokeWidth:insideBorderWidth,vectorEffect:\"non-scaling-stroke\"})})}),label]})});}addPropertyControls(ASCIIButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"hello world\"},buttonWidth:{type:ControlType.Enum,title:\"Width\",options:[\"fit\",\"full\"],optionTitles:[\"Fit Content\",\"Full Width\"],defaultValue:\"fit\",displaySegmentedControl:true},linkType:{type:ControlType.Enum,title:\"Link Type\",options:[\"url\",\"upload\"],optionTitles:[\"URL\",\"Upload\"],defaultValue:\"url\",displaySegmentedControl:true},link:{type:ControlType.Link,title:\"Link URL\",defaultValue:\"\",hidden:({linkType})=>linkType!==\"url\"},// Rename fileLink control to match the uploadedFile prop in ASCIIButtonProps\nuploadedFile:{type:ControlType.File,title:\"Upload File\",allowedFileTypes:[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\",\"pdf\",\"doc\",\"docx\",\"txt\"],hidden:({linkType})=>linkType!==\"upload\"},openInNewTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:({linkType,link})=>linkType===\"url\"&&!link},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#00FF00\"},insideBorderColor:{type:ControlType.Color,title:\"Inside Border Color\",defaultValue:\"#00FF00\"},insideBorderWidth:{type:ControlType.Number,title:\"Inside Border Width\",defaultValue:1,min:1,max:10,step:1,unit:\"px\"},size:{type:ControlType.Enum,title:\"Size\",options:[\"small\",\"normal\"],optionTitles:[\"Small\",\"Normal\"],defaultValue:\"normal\",displaySegmentedControl:true},paddingVertical:{type:ControlType.Number,title:\"Padding Y\",defaultValue:12,min:0,max:50,step:1,unit:\"px\",hidden:()=>true},paddingHorizontal:{type:ControlType.Number,title:\"Padding X\",defaultValue:24,min:0,max:100,step:1,unit:\"px\",hidden:()=>true},hoverEffect:{type:ControlType.Boolean,title:\"Hover Effect\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},hoverBackgroundColor:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#00FF00\",hidden:({hoverEffect})=>!hoverEffect},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#000000\",hidden:({hoverEffect})=>!hoverEffect}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ASCIIButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ASCIIButton_2.map"],"mappings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