{"version":3,"file":"shared-lib.BUBEPoKt.mjs","names":["useState","useMemo","startTransition"],"sources":["https:/framerusercontent.com/modules/Yf2kmGwJDCtuufwblkrB/16s7Af667YNmSM7I32Tu/GlassyButton.js","https:/framerusercontent.com/modules/7qIWHyQpmwXhYme3ebhc/zQeFXnL5Z01318AmnRBD/siteMetadata.js"],"sourcesContent":["// GlassyButton: A glassmorphic button with animated highlight/reflection, hover effect, and configurable light direction\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useMemo,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * GlassyButton\n *\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 48\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function GlassyButton(props){const{label,background,textColor,borderRadius,blur,lightDirection,font,style,link,hoverBackground,shadowHoverColor=\"#0000002D\",shadowHoverIntensity=1}=props;const isStatic=useIsStaticRenderer();// Hover state\nconst[hovered,setHovered]=useState(false);// Light direction mapping to gradient angles and highlight positions\nconst lightMap={\"top-left\":{angle:135,x:\"10%\",y:\"10%\"},\"top\":{angle:180,x:\"50%\",y:\"8%\"},\"top-right\":{angle:225,x:\"90%\",y:\"10%\"},\"right\":{angle:270,x:\"92%\",y:\"50%\"},\"bottom-right\":{angle:315,x:\"90%\",y:\"90%\"},\"bottom\":{angle:0,x:\"50%\",y:\"92%\"},\"bottom-left\":{angle:45,x:\"10%\",y:\"90%\"},\"left\":{angle:90,x:\"8%\",y:\"50%\"}};const{angle,x,y}=lightMap[lightDirection];// Glassy background style\nconst glassStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",borderRadius,background:hovered?`linear-gradient(${angle}deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%), ${hoverBackground}`:`linear-gradient(${angle}deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%), ${background}`,boxShadow:hovered?`0 8px 24px 0 ${shadowHoverColor}, 0 0 0 0 rgba(0,0,0,0.10)`.replace(shadowHoverColor,shadowHoverColor.replace(/[\\d.]+\\)$/,m=>`${parseFloat(m)*shadowHoverIntensity})`)):\"0 6px 18px 0 rgba(0,0,0,0.10)\",backdropFilter:`blur(${blur}px) saturate(1.2)`,WebkitBackdropFilter:`blur(${blur}px) saturate(1.2)`,border:\"1.5px solid rgba(255,255,255,0.22)\",boxSizing:\"border-box\",overflow:\"hidden\",cursor:\"pointer\",transition:\"box-shadow 0.32s cubic-bezier(.4,0,.2,1), background 0.32s cubic-bezier(.4,0,.2,1), transform 0.32s cubic-bezier(.4,0,.2,1)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transform:hovered?\"translateY(-2px)\":\"none\",...style}),[angle,background,hoverBackground,borderRadius,blur,style,hovered,shadowHoverColor,shadowHoverIntensity]);// Text style\nconst textStyle=useMemo(()=>({color:textColor,zIndex:3,userSelect:\"none\",...font,fontWeight:font?.variant===\"Bold\"?700:undefined,fontSize:font?.fontSize,letterSpacing:font?.letterSpacing,lineHeight:font?.lineHeight,textAlign:font?.textAlign,fontStyle:font?.fontStyle,fontFamily:font?.fontFamily,minWidth:\"max-content\",width:\"max-content\",pointerEvents:\"none\",transition:\"color 0.22s cubic-bezier(.4,0,.2,1)\"}),[textColor,font]);// Accessibility: role=button, tabIndex=0\nconst content=/*#__PURE__*/_jsxs(\"div\",{style:glassStyle,role:\"button\",tabIndex:0,\"aria-label\":label,onMouseEnter:()=>!isStatic&&startTransition(()=>setHovered(true)),onMouseLeave:()=>!isStatic&&startTransition(()=>setHovered(false)),children:[/*#__PURE__*/_jsx(\"span\",{style:textStyle,children:label}),/*#__PURE__*/_jsx(\"div\",{style:{pointerEvents:\"none\",position:\"absolute\",inset:0,borderRadius,border:\"1.5px solid rgba(255,255,255,0.22)\",boxShadow:\"inset 0 1.5px 8px 0 rgba(255,255,255,0.10), 0 1.5px 8px 0 rgba(0,0,0,0.06)\",zIndex:4}})]});return link?/*#__PURE__*/_jsx(\"a\",{href:link,style:{display:\"block\",width:\"100%\",height:\"100%\",textDecoration:\"none\"},tabIndex:-1,\"aria-label\":label,children:content}):content;}addPropertyControls(GlassyButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Glassy Button\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF33\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:16,min:0,max:48},blur:{type:ControlType.Number,title:\"Blur\",defaultValue:18,min:4,max:32,step:1},lightDirection:{type:ControlType.Enum,title:\"Light Dir\",options:[\"top-left\",\"top\",\"top-right\",\"right\",\"bottom-right\",\"bottom\",\"bottom-left\",\"left\"],optionTitles:[\"Top Left\",\"Top\",\"Top Right\",\"Right\",\"Bottom Right\",\"Bottom\",\"Bottom Left\",\"Left\"],defaultValue:\"top-left\",displaySegmentedControl:false},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"18px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\",textAlign:\"center\"}},link:{type:ControlType.Link,title:\"Button Link\",defaultValue:\"\"},// --- Hover group ---\nhoverBackground:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#FFFFFF66\"},shadowHoverColor:{type:ControlType.Color,title:\"Hover Shadow\",defaultValue:\"#0000002D\"},shadowHoverIntensity:{type:ControlType.Number,title:\"Shadow Intensity\",defaultValue:1,min:.5,max:2.5,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GlassyButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"160\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"48\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlassyButton.map","// Generated by Framer (f08ca78)\nexport default function metadata(params,activeLocale){return{description:\"Made with Framer\",robots:\"max-image-preview:large\",title:\"KieranPT\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"uMASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,aAAW,YAAU,eAAa,OAAK,iBAAe,OAAK,QAAM,OAAK,kBAAgB,mBAAiB,YAAY,uBAAqB,GAAG,EAAY,EAAS,GAAqB,CAC3O,CAAC,EAAQ,GAAYA,EAAS,GAAM,CACyR,CAAC,QAAM,IAAE,KAA5T,CAAC,WAAW,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAM,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAQ,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,OAAS,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,KAAO,CAAC,MAAM,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAA2B,GACjV,EAAWC,OAAa,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,eAAa,WAAW,EAAQ,mBAAmB,EAAM,gEAAgE,IAAkB,mBAAmB,EAAM,gEAAgE,IAAa,UAAU,EAAQ,gBAAgB,EAAiB,4BAA4B,QAAQ,EAAiB,EAAiB,QAAQ,YAAY,GAAG,GAAG,WAAW,EAAE,CA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