{"version":3,"file":"Button.DoyqpfoJ.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","p","_e","addPropertyControls","init_framer_BisrWwwE","ControlType","init_Theme","BorderBeam","useThemed","init_Beam","Button","props","plays","setPlays","on","setOn","down","setDown","m","label","href","file","link","main","downloadName","newTab","sweep","n","style","outline","fill","hoverFill","border","shadow","hoverText","text","FONT","EASE","init_Button"],"sources":["https:/framerusercontent.com/modules/tzpMEyl2Ru57cU6FQiwS/1OlK5Twvbe4Ws3U8pv5W/Button.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useThemed}from\"https://framerusercontent.com/modules/jYqoRpmY6VqjJkuqrZFt/0li4qo5YNAXpTRQJWu7H/Theme.js\";import{BorderBeam}from\"https://framerusercontent.com/modules/ZS56WtEawyvM6WIJNsdZ/3BpQTD3YV6QdtJgDvhuo/Beam.js\";const FONT='\"Inter\", \"Inter Placeholder\", sans-serif';const EASE=\"cubic-bezier(0.22, 1, 0.36, 1)\";/**\n * Square button. On hover a second colour wipes up from the bottom edge and the label inverts.\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Button(props){props=useThemed(props);const{label=\"Get in touch\",link=\"\",file=\"\",downloadName=\"\",newTab=false,outline=false,fill=\"#0B0C0E\",text=\"#FFFFFF\",border=\"#0B0C0E\",hoverFill=\"#0B0C0E\",hoverText=\"#FFFFFF\",shadow=false,sweep=false,ink=\"#0B0C0E\",style}=props;const[plays,setPlays]=useState(0);const[on,setOn]=useState(false);const[down,setDown]=useState(false);const m=/^(.*?)(\\s*[↗→↓])$/.exec(label);const href=file||link||undefined;const main=m?m[1]:label,arrow=m?m[2].trim():\"\";const diag=arrow===\"↗\",downArrow=arrow===\"↓\";return /*#__PURE__*/_jsxs(\"a\",{href:href,download:file?downloadName||true:undefined,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined,onPointerEnter:()=>{setOn(true);if(sweep)setPlays(n=>n+1);},onPointerLeave:()=>{setOn(false);setDown(false);},onPointerDown:()=>setDown(true),onPointerUp:()=>setDown(false),onFocus:()=>{setOn(true);if(sweep)setPlays(n=>n+1);},onBlur:()=>setOn(false),style:{...style,position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:8,boxSizing:\"border-box\",padding:\"13px 20px\",borderRadius:0,overflow:\"hidden\",textDecoration:\"none\",whiteSpace:\"nowrap\",cursor:\"pointer\",background:outline?\"transparent\":fill,boxShadow:(sweep?\"inset 0 0 0 0 transparent\":\"inset 0 0 0 1px \"+(on?hoverFill:outline?border:fill))+(shadow&&!on&&!down?\", 0 1px 2px rgba(11,12,14,0.08), 0 3px 8px rgba(11,12,14,0.06)\":\", 0 0 0 rgba(11,12,14,0), 0 0 0 rgba(11,12,14,0)\"),color:on?hoverText:text,fontFamily:FONT,fontSize:14,fontWeight:500,lineHeight:\"20px\",letterSpacing:\"-0.005em\",transform:down?\"scale(0.98)\":\"none\",transition:\"color 0.3s \"+EASE+\", box-shadow 0.3s \"+EASE+\", transform 0.15s \"+EASE,WebkitTapHighlightColor:\"transparent\"},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",inset:0,background:hoverFill,transform:on?\"scaleY(1)\":\"scaleY(0)\",transformOrigin:on?\"50% 100%\":\"50% 0%\",transition:\"transform 0.45s \"+EASE}}),sweep&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",inset:0,boxShadow:\"inset 0 0 0 1px \"+border,pointerEvents:\"none\",zIndex:1}}),sweep&&plays>0&&/*#__PURE__*/_jsx(BorderBeam,{ink:ink},plays),/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",zIndex:3},children:main})]});}addPropertyControls(Button,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Get in touch\"},link:{type:ControlType.Link,title:\"Link\"},file:{type:ControlType.File,title:\"Download file\",allowedFileTypes:[\"pdf\"]},downloadName:{type:ControlType.String,title:\"File name\",defaultValue:\"\",hidden:p=>!p.file},newTab:{type:ControlType.Boolean,title:\"New tab\",defaultValue:false},outline:{type:ControlType.Boolean,title:\"Outline\",defaultValue:false},fill:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#0B0C0E\",hidden:p=>p.outline},text:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},border:{type:ControlType.Color,title:\"Border\",defaultValue:\"#0B0C0E\",hidden:p=>!p.outline},hoverFill:{type:ControlType.Color,title:\"Hover fill\",defaultValue:\"#0B0C0E\"},hoverText:{type:ControlType.Color,title:\"Hover text\",defaultValue:\"#FFFFFF\"},shadow:{type:ControlType.Boolean,title:\"Shadow\",defaultValue:false},sweep:{type:ControlType.Boolean,title:\"Border sweep\",defaultValue:false,description:\"Keeps the border on hover and runs a dark segment around it.\"},ink:{type:ControlType.Color,title:\"Sweep\",defaultValue:\"#0B0C0E\",hidden:p=>!p.sweep}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Button\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,uPAIG,SAAwBc,EAAO,EAAM,CAAC,EAAMF,EAAUG,CAAK,EAAE,GAAK,CAAC,QAAM,eAAe,OAAK,GAAG,OAAK,GAAG,eAAa,GAAG,SAAO,GAAM,UAAQ,GAAM,OAAK,UAAU,OAAK,UAAU,SAAO,UAAU,YAAU,UAAU,YAAU,UAAU,SAAO,GAAM,QAAM,GAAM,MAAI,UAAU,SAAOA,EAAW,CAACC,EAAMC,GAAUjB,EAAS,CAAC,EAAO,CAACkB,EAAGC,GAAOnB,EAAS,EAAK,EAAO,CAACoB,EAAKC,GAASrB,EAAS,EAAK,EAAQ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