{"version":3,"file":"SupaLinkButton.DkuHgsSd.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/g7uBHVpczHAK1vfFmjgE/bd4tSpZ7Fw6Fh5NT0Eqq/SupaLinkButton.js"],"sourcesContent":["// supagateway-runtime v1 — installed by the SupaGateway plugin. Updates overwrite this file.\n//\n// The kit's text-level affordances — \"Cerrar sesión\", \"Editar\", \"Eliminar\", \"Ir al acceso de\n// miembros\" — shared so their hover is written once instead of fifteen times. Every component\n// keeps building the resting appearance itself (styles.linkButton, or the anchor's own colour)\n// and hands it here untouched: this file only adds the colour change on top, driven by the\n// linkHoverColor property control the host component exposes. Inline styles cannot express\n// :hover, so the state lives in React.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";// Deliberately quicker than SupaButton's 0.4 s panel: a label that takes almost half a second to\n// acknowledge the cursor reads as lag, not as motion design.\nconst DURATION=\"0.2s\";const EASING=\"ease\";// A media query cannot live inside an inline style, so the preference is read from matchMedia.\n// Guarded for SSR and for export renders, where there is no window.\nfunction useReducedMotion(){const[reducedMotion,setReducedMotion]=useState(false);useEffect(()=>{if(typeof window===\"undefined\"||typeof window.matchMedia!==\"function\")return;const query=window.matchMedia(\"(prefers-reduced-motion: reduce)\");setReducedMotion(query.matches);const handleChange=event=>setReducedMotion(event.matches);query.addEventListener(\"change\",handleChange);return()=>query.removeEventListener(\"change\",handleChange);},[]);return reducedMotion;}/** The kit's secondary action: a button that looks like a link. */export function SupaLinkButton(props){const{style,hoverColor,children,type=\"button\",disabled=false,onClick}=props;const[hovered,setHovered]=useState(false);const[focused,setFocused]=useState(false);const reducedMotion=useReducedMotion();// A disabled link must not react at all — it is already dimmed to 0.6 by the host style, and\n// a colour change would advertise an action that will not run. Keyboard focus reacts too, so\n// the affordance is not mouse-only.\nconst raised=!disabled&&(hovered||focused);return /*#__PURE__*/_jsx(\"button\",{type:type,disabled:disabled,onClick:onClick,onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),onFocus:()=>setFocused(true),onBlur:()=>setFocused(false),style:{...style,color:raised?hoverColor:style.color,transition:reducedMotion?\"none\":`color ${DURATION} ${EASING}`},children:children});}/** A real anchor (navigation), styled by the same two controls as SupaLinkButton. */export function SupaTextLink(props){const{href,color,hoverColor,children,style}=props;const[hovered,setHovered]=useState(false);const[focused,setFocused]=useState(false);const reducedMotion=useReducedMotion();return /*#__PURE__*/_jsx(\"a\",{href:href,onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),onFocus:()=>setFocused(true),onBlur:()=>setFocused(false),style:{...style,color:hovered||focused?hoverColor:color,transition:reducedMotion?\"none\":`color ${DURATION} ${EASING}`},children:children});}\nexport const __FramerMetadata__ = {\"exports\":{\"SupaLinkButton\":{\"type\":\"reactComponent\",\"name\":\"SupaLinkButton\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"SupaTextLink\":{\"type\":\"reactComponent\",\"name\":\"SupaTextLink\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SupaLinkButton.map"],"mappings":"uIAYA,SAAS,GAAkB,CAAC,GAAK,CAAC,EAAc,GAAkBA,EAAS,EAAK,EAAyW,OAAvW,MAAc,CAAC,GAAU,IAAS,QAAa,OAAO,EAAO,YAAa,WAAW,OAAO,IAAM,EAAM,EAAO,WAAW,kCAAkC,EAAE,EAAiB,EAAM,OAAO,EAAE,IAAM,EAAa,GAAO,EAAiB,EAAM,OAAO,EAAgD,OAA9C,EAAM,iBAAiB,SAAS,CAAY,MAAY,EAAM,oBAAoB,SAAS,CAAY,CAAE,EAAE,CAAC,CAAC,EAAS,CAAc,CAAoE,SAAgB,EAAe,EAAM,CAAC,GAAK,CAAC,QAAM,aAAW,WAAS,OAAK,SAAS,WAAS,GAAM,WAAS,EAAW,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAO,CAAC,EAAQ,GAAYA,E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