{"version":3,"file":"Link.Cv1cHTep.mjs","names":["Tokens","LinkInternal"],"sources":["https:/framerusercontent.com/modules/FFVi9WaZD7zgQNL3qmno/pXNLwEzl0xlJbnQZC01Z/Link.js"],"sourcesContent":["/**\n * Link — Text link atom.\n *\n * One visual treatment (theme primary text, underline + brightness on hover, focus ring).\n * **Size** only changes type scale: Small → `/Body SM/Heavy`, Medium → `/Body MD/Heavy`, Large → `/Body LG/Heavy`.\n *\n * @framerIntrinsicWidth 280\n * @framerIntrinsicHeight auto\n * @framerSupportedLayoutWidth auto, fixed\n * @framerSupportedLayoutHeight auto\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{FRAMER_BREAKPOINT_DESCRIPTION,FRAMER_THEME_DESCRIPTION_SURFACE}from\"https://framerusercontent.com/modules/TvAAtdjNtwUg3Y1lriXj/Wh3HNug8gnAeRVrciJOW/propertyControlCopy.js\";import Tokens from\"https://framerusercontent.com/modules/trqsvmaimtqmRw7lebtr/E4VmuznAXf2PsHoCR0KU/index.js\";import{getThemeColors}from\"https://framerusercontent.com/modules/adV8xDoJ9yUM3BO0Pqib/4TrxmpCBX5ekxN3XutA5/themeHelpers.js\";import{useInteractiveStates}from\"https://framerusercontent.com/modules/Qjj44M1cHykPxkowHlEu/W9EIXILZlEXxtYuetWgb/useInteractiveStates.js\";import{coalesceLinkValue,getNewTabAriaLabel,useSmartLinkProps}from\"https://framerusercontent.com/modules/CLxohi7brohCdVDhv4L6/mAvDSabpzPuYydumkiMo/linkHelpers.js\";import{PRESERVE_CONTROL_NEWLINES}from\"https://framerusercontent.com/modules/gxwbCuOeX9Iq9kc5MH5p/k0Hn9o8CxLBqVGlxaK9j/controlTextStyles.js\";/** Typography token per size — same weight (Heavy), stepped font sizes. */const LINK_TYPOGRAPHY={small:\"/Body SM/Heavy\",medium:\"/Body MD/Heavy\",large:\"/Body LG/Heavy\"};/** Vertical padding (spacing scale keys) — larger type gets slightly more breathing room. */const LINK_PADDING_Y={small:{desktop:4,tablet:4,phone:2},medium:{desktop:8,tablet:8,phone:6},large:{desktop:12,tablet:10,phone:8}};function paddingYForSize(breakpoint,size){const cfg=LINK_PADDING_Y[size];const key=breakpoint===\"desktop\"?cfg.desktop:breakpoint===\"tablet\"?cfg.tablet:cfg.phone;return Tokens.getSpacing(key);}function resolveLinkAriaLabel(resolvedTitle,opensNewTab){const titleTrim=String(resolvedTitle??\"\").trim();const hasVisibleTitle=titleTrim.length>0;if(opensNewTab){return getNewTabAriaLabel(hasVisibleTitle?titleTrim:\"Link\");}return hasVisibleTitle?undefined:\"Link\";}const SIZE_LABELS={small:\"Small\",medium:\"Medium\",large:\"Large\"};export function createLinkPropertyControls(opts){const{sizeOptions,defaultSize,idDefault,linkPropName=\"url\"}=opts;const sizeHelp=sizeOptions.length===1?\"Text scale for this link.\":\"Small / Medium / Large — same link style, different type size.\";return{// ─── 1. Content ────────────────────────────────────────────────────────────\ntitle:{type:ControlType.String,title:\"Title\",defaultValue:\"Link\",placeholder:\"Link text…\",description:\"Type the visible link text—bind to CMS or variables for navigation labels.\"},// ─── 2. Links ──────────────────────────────────────────────────────────────\n[linkPropName]:{type:ControlType.Link,title:\"Link\",defaultValue:\"\",description:\"Set where the link goes—paste a URL or bind a Framer Link / CMS field.\"},// ─── 6. Configuration ────────────────────────────────────────────────────────\nsize:{type:ControlType.Enum,title:\"Size\",options:[...sizeOptions],optionTitles:sizeOptions.map(s=>SIZE_LABELS[s]),displaySegmentedControl:sizeOptions.length>=2&&sizeOptions.length<=3,defaultValue:defaultSize,description:sizeHelp},// ─── 7. Behavior ─────────────────────────────────────────────────────────────\nopenInNewTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Turn on when you want this URL to open in a new browser tab (external URLs may still open in a new tab by default).\"},disabled:{type:ControlType.Boolean,title:\"Disabled\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Turn on for muted styling and to block navigation.\"},// ─── 9. Advanced ─────────────────────────────────────────────────────────────\nariaLabel:{type:ControlType.String,title:\"ARIA Label\",defaultValue:\"\",placeholder:\"e.g. Link\",description:\"Accessible name. Match the Title unless the spoken name should differ (e.g. new-tab wording is applied automatically).\"},id:{type:ControlType.String,title:\"ID\",defaultValue:idDefault,placeholder:\"e.g. link-footer\",description:\"Set a unique id for anchors or analytics; change it when several links on one page would collide.\"},// ─── 10. System ──────────────────────────────────────────────────────────────\nbreakpoint:{type:ControlType.Enum,title:\"Breakpoint\",options:[\"desktop\",\"tablet\",\"phone\"],optionTitles:[\"Desktop\",\"Tablet\",\"Phone\"],displaySegmentedControl:false,defaultValue:\"desktop\",description:FRAMER_BREAKPOINT_DESCRIPTION},theme:{type:ControlType.Enum,title:\"Theme\",options:[\"default\",\"inverted\"],optionTitles:[\"Default\",\"Inverted\"],displaySegmentedControl:true,defaultValue:\"default\",description:FRAMER_THEME_DESCRIPTION_SURFACE}};}const LinkInternal=/*#__PURE__*/forwardRef(function LinkInternal(props,ref){const{breakpoint=\"desktop\",size=\"medium\",theme=\"default\",title,link,url:urlProp,disabled=false,openInNewTab=false,onClick,ariaLabel=\"\",id,style,...rest}=props;const isStaticRenderer=useIsStaticRenderer();const resolvedTitle=title??\"Link\";const colors=getThemeColors(theme);// Opt into the design-system motion treatment so hover (filter), focus\n// (outline) and the underline cross-fade together. The hook handles\n// reduced motion internally — no need for separate guards here.\nconst{isHovered,isFocused,isPressed,transition,handlers}=useInteractiveStates(disabled,{transitions:true});const url=coalesceLinkValue(urlProp,link);const smartLink=useSmartLinkProps(url,openInNewTab,{onClick:e=>{if(disabled){e.preventDefault();return;}onClick?.(e);}});const opensNewTab=smartLink.target===\"_blank\";const trimmedAria=ariaLabel.trim();const trimmedTitleResolved=resolvedTitle.trim();const autoAria=resolveLinkAriaLabel(resolvedTitle,opensNewTab);const ariaLabelResolved=trimmedAria!==\"\"&&trimmedAria!==trimmedTitleResolved?trimmedAria:autoAria;const typoPath=LINK_TYPOGRAPHY[size];const py=paddingYForSize(breakpoint,size);const underlineOffset=Tokens.getSpacing(breakpoint===\"phone\"?2:4);const resolvedHref=disabled||smartLink.href===\"\"?undefined:smartLink.href;const resolvedTarget=resolvedHref?smartLink.target:undefined;const resolvedRel=resolvedHref?smartLink.rel:undefined;const fillsWidth=style?.width===\"100%\";const linkStyle={...Tokens.getTypographyStyles(typoPath,breakpoint),display:fillsWidth?\"block\":\"inline-block\",color:colors.textPrimary,textDecoration:isHovered&&!disabled?\"underline\":\"none\",textUnderlineOffset:underlineOffset,cursor:disabled?\"not-allowed\":resolvedHref?\"pointer\":\"default\",outline:isFocused?`${Tokens.getFocusOutlineWidth()} solid ${Tokens.getColorValue(\"/Borders/border-brand-bunq\")}`:\"none\",outlineOffset:Tokens.getSpacing(4),borderRadius:Tokens.getRadius(\"radius-sm\"),paddingTop:py,paddingBottom:py,// Hook-provided transition already covers filter + outline (reduced\n// motion aware). Add `text-decoration-color` so the underline fades\n// in with the brightness on hover instead of snapping.\ntransition:transition?`${transition}, ${Tokens.getTransition(\"text-decoration-color\",\"quick\")}`:Tokens.getTransition(\"text-decoration-color\",\"quick\"),filter:Tokens.getBrightnessFilter(disabled,isHovered,isPressed),...PRESERVE_CONTROL_NEWLINES,...style};const anchorProps={id,\"href\":resolvedHref,\"target\":resolvedTarget,\"rel\":resolvedRel,\"style\":{...smartLink.style,...linkStyle},\"tabIndex\":disabled?-1:0,\"aria-disabled\":disabled,\"aria-label\":ariaLabelResolved,\"onClick\":smartLink.onClick,\"onMouseEnter\":handlers.onMouseEnter,\"onMouseLeave\":handlers.onMouseLeave,\"onMouseDown\":handlers.onMouseDown,\"onMouseUp\":handlers.onMouseUp,\"onFocus\":handlers.onFocus,\"onBlur\":handlers.onBlur,...rest};if(isStaticRenderer){return /*#__PURE__*/_jsx(\"a\",{ref:ref,...anchorProps,children:resolvedTitle});}return /*#__PURE__*/_jsx(motion.a,{ref:ref,...anchorProps,whileTap:undefined,children:resolvedTitle});});/** Plain function default export — required for Framer code-link registration (see `Button.tsx`). */export default function Link(props){const{ref,...rest}=props;return /*#__PURE__*/_jsx(LinkInternal,{...rest,ref:ref});}Link.displayName=\"Link - Atom\";addPropertyControls(Link,createLinkPropertyControls({sizeOptions:[\"small\",\"medium\",\"large\"],defaultSize:\"medium\",idDefault:\"link\"}));\nexport const __FramerMetadata__ = {\"exports\":{\"Breakpoint\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"LinkPropertyControlsOptions\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"LinkProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"Link\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"createLinkPropertyControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"LinkSize\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"8XAUo5C,SAAS,EAAgB,EAAW,EAAK,CAAC,IAAM,EAAI,EAAe,GAAY,EAAI,IAAa,UAAU,EAAI,QAAQ,IAAa,SAAS,EAAI,OAAO,EAAI,MAAM,OAAOA,EAAO,WAAW,EAAI,CAAE,SAAS,EAAqB,EAAc,EAAY,CAAC,IAAM,EAAU,OAAO,GAAe,GAAG,CAAC,MAAM,CAAO,EAAgB,EAAU,OAAO,EAA+E,OAA1E,EAAoB,EAAmB,EAAgB,EAAU,OAAO,CAAS,EAAgB,IAAA,GAAU,OAAwE,SAAgB,EAA2B,EAAK,CAAC,GAAK,CAAC,cAAY,cAAY,YAAU,eAAa,OAAO,EAAW,EAAS,EAAY,SAAS,EAAE,4BAA4B,iEAAiE,MAAM,CACxpE,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa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