{"version":3,"file":"HoraButton.MWwGyvaF.mjs","names":["useState","startTransition","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","te","_e","p","c","init_jsx_runtime","motion","init_framer_motion_DhsWWWsN","init_framer_DcGZRLrs","ControlType","addPropertyControls","HoraButton","props","hover","setHover","outline","tone","base","ink","cream","accent","sweep","text","textHover","isFill","link","newTab","SANS","MS","EASE","ROLL","label","init_HoraButton"],"sources":["https:/framerusercontent.com/modules/x2MK4ecAwFjbVGU1cxn8/SGofi65C5cSl1bdfhsO8/HoraButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";// Phones get shorter motion: every duration below runs at 60 %.\nconst MS=typeof window!==\"undefined\"&&window.matchMedia?.(\"(max-width: 640px)\").matches?.6:1;const SANS='\"ABC Diatype Regular\", \"ABC Diatype\", system-ui, sans-serif';const EASE=[.16,1,.3,1];/**\n * Hora Button — boutique hover: the label rolls up and a colour sweep rises\n * from the bottom. Works as a link.\n *\n * @framerIntrinsicWidth 180\n * @framerIntrinsicHeight 52\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight fixed\n */const ROLL=20;export default function HoraButton(props){const{label=\"Join the waitlist\",link=\"/#waitlist\",newTab=false,tone=\"ink\",height=52,ink=\"#120C08\",cream=\"#F9F8F5\",accent=\"#E8572A\"}=props;const[hover,setHover]=useState(false);const outline=tone===\"outline\";const base=outline?\"transparent\":tone===\"ink\"?ink:tone===\"cream\"?cream:accent;// The hover always rises in the accent (an ink sweep vanished on dark sections); accent buttons sweep to ink.\nconst sweep=tone===\"accent\"?ink:accent;const text=tone===\"cream\"||outline?ink:cream;const textHover=cream;const isFill=props.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsxs(motion.a,{href:link,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined,onHoverStart:()=>startTransition(()=>setHover(true)),onHoverEnd:()=>startTransition(()=>setHover(false)),onFocus:()=>startTransition(()=>setHover(true)),onBlur:()=>startTransition(()=>setHover(false)),style:{...props.style,position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",height,padding:\"0 22px\",borderRadius:4,background:base,boxShadow:outline?`inset 0 0 0 1px color-mix(in srgb, ${ink} 28%, transparent)`:undefined,color:text,textDecoration:\"none\",overflow:\"hidden\",fontFamily:SANS,fontSize:15,lineHeight:1,whiteSpace:\"nowrap\",cursor:\"pointer\",width:isFill?\"100%\":\"auto\",minWidth:\"max-content\",boxSizing:\"border-box\"},whileTap:{scale:.98},children:[/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":\"true\",style:{position:\"absolute\",left:0,right:0,bottom:0,height:\"100%\",background:sweep,transformOrigin:\"50% 100%\",transform:\"scaleY(0)\"},initial:false,animate:{scaleY:hover?1:0},transition:{duration:.55*MS,ease:EASE}}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",display:\"block\",height:ROLL,overflow:\"hidden\"},children:/*#__PURE__*/_jsxs(motion.span,{style:{display:\"block\"},animate:{y:hover?-ROLL:0,color:hover?textHover:text},transition:{duration:.55*MS,ease:EASE},children:[/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",height:ROLL,lineHeight:`${ROLL}px`},children:label}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",height:ROLL,lineHeight:`${ROLL}px`},\"aria-hidden\":\"true\",children:label})]})})]});}addPropertyControls(HoraButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Join the waitlist\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"/#waitlist\"},newTab:{type:ControlType.Boolean,title:\"New tab\",defaultValue:false},tone:{type:ControlType.Enum,title:\"Tone\",options:[\"ink\",\"cream\",\"accent\",\"outline\"],optionTitles:[\"Ink\",\"Cream\",\"Accent\",\"Outline\"],defaultValue:\"ink\",displaySegmentedControl:true},height:{type:ControlType.Number,title:\"Height\",defaultValue:52,min:36,max:72,step:2,unit:\"px\"},ink:{type:ControlType.Color,title:\"Ink\",defaultValue:\"#120C08\"},cream:{type:ControlType.Color,title:\"Cream\",defaultValue:\"#F9F8F5\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#E8572A\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HoraButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HoraButton.map"],"mappings":"A,uPAUiB,SAAwBgB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,oBAAoB,OAAK,aAAa,SAAO,GAAM,OAAK,MAAM,SAAO,GAAG,MAAI,UAAU,QAAM,UAAU,SAAO,WAAWC,EAAW,CAACC,EAAMC,GAAUnB,EAAS,EAAK,EAAQoB,EAAQC,IAAO,UAAgBC,EAAKF,EAAQ,cAAcC,IAAO,MAAME,EAAIF,IAAO,QAAQG,EAAMC,EAC3UC,EAAML,IAAO,SAASE,EAAIE,EAAaE,EAAKN,IAAO,SAASD,EAAQG,EAAIC,EAAYI,EAAUJ,EAAYK,EAAOZ,EAAM,OAAOA,EAAM,MAAM,QAAQ,OAAO,MAAoB,gBAAMN,EAAO,EAAE,CAAC,KAAKmB,EAAK,OAAOC,EAAO,SAAS,IAAA,GAAU,IAAIA,EAAO,sBAAsB,IAAA,GAAU,iBAAiB9B,MAAoBkB,EAAS,EAAI,CAAC,EAAE,eAAelB,MAAoBkB,EAAS,EAAK,CAAC,EAAE,YAAYlB,MAAoBkB,EAAS,EAAI,CAAC,EAAE,WAAWlB,MAAoBkB,EAAS,EAAK,CAAC,EAAE,MAAM,CAAC,GAAGF,EAAM,MAAM,SAAS,WAAW,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,SAAO,QAAQ,SAAS,aAAa,EAAE,WAAWK,EAAK,UAAUF,EAAQ,sCAAsCG,EAAI,oBAA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