{"version":3,"file":"PrimaryButton.Ca-4feOF.mjs","names":["useRef","c","_Fragment"],"sources":["https:/framerusercontent.com/modules/rTdlg9ru6T2PCmDCGYd4/1Qi7poAV1EiSVDHwrpMT/newsletter.js","https:/framerusercontent.com/modules/rVlHJhGuiWk2LiSpFzaU/qqbISqrLz78K7K2NRlcQ/PrimaryButton.js"],"sourcesContent":["/**\n * Newsletter sign-up — posts to the Mailchimp list via its JSONP endpoint.\n * JSONP (not fetch) because the endpoint sends no CORS headers; it also returns\n * a readable result, unlike a no-cors POST.\n */const ENDPOINT=\"https://womenonfood.us19.list-manage.com/subscribe/post-json\";const LIST_U=\"295624972bc68db14551eeda7\";const LIST_ID=\"bd03cf953a\";const TIMEOUT_MS=1e4;export const NEWSLETTER_MESSAGES={success:\"Bedankt voor je aanmelding!\",already:\"Dit e-mailadres is al aangemeld.\",error:\"Aanmelden lukte niet. Probeer het later opnieuw.\"};export function subscribeToNewsletter(email,extras={}){return new Promise(resolve=>{const w=window;const cb=`wofMc${Date.now()}`;const script=document.createElement(\"script\");let timer;const finish=result=>{clearTimeout(timer);delete w[cb];script.remove();resolve(result);};w[cb]=data=>{if(data?.result===\"success\")return finish({ok:true,message:NEWSLETTER_MESSAGES.success});const already=/already subscribed/i.test(data?.msg||\"\");finish({ok:false,message:already?NEWSLETTER_MESSAGES.already:NEWSLETTER_MESSAGES.error});};script.onerror=()=>finish({ok:false,message:NEWSLETTER_MESSAGES.error});timer=setTimeout(()=>finish({ok:false,message:NEWSLETTER_MESSAGES.error}),TIMEOUT_MS);const merge=Object.entries(extras).filter(([,v])=>v).map(([k,v])=>`&${k}=${encodeURIComponent(v)}`).join(\"\");script.src=`${ENDPOINT}?u=${LIST_U}&id=${LIST_ID}&EMAIL=${encodeURIComponent(email)}${merge}&c=${cb}`;document.body.appendChild(script);});}\nexport const __FramerMetadata__ = {\"exports\":{\"NEWSLETTER_MESSAGES\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"NewsletterExtras\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"NewsletterResult\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"subscribeToNewsletter\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./newsletter.map","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{semantic,typography,radius,focusCss}from\"https://framerusercontent.com/modules/HDAkrahb3ethcU2GAef2/nCb5ot8a39Uw7ZcMqia0/tokens.js\";import{easeCss,dur,prefersReducedMotion,useCardInteraction,arrowNudge,PRESS_SCALE}from\"https://framerusercontent.com/modules/YFy4SNb784n2qKl2hppy/GBtnVzB0BJq3YcX7fdeG/motion.js\";const FILL={dark:{bg:semantic.surfaceDark,fg:semantic.textOnDark,hoverBg:semantic.interactiveFill,hoverFg:semantic.textPrimary},darkOnYellow:{bg:semantic.surfaceDark,fg:semantic.textOnDark,hoverBg:semantic.surface,hoverFg:semantic.textPrimary},yellow:{bg:semantic.interactiveFill,fg:semantic.textPrimary,hoverBg:semantic.surfaceDark,hoverFg:semantic.textOnDark},yellowOnDark:{bg:semantic.interactiveFill,fg:semantic.textPrimary,hoverBg:semantic.surface,hoverFg:semantic.textPrimary},redOnDark:{bg:semantic.surfaceRed,fg:semantic.textOnDark,hoverBg:semantic.surface,hoverFg:semantic.textPrimary}};const PATHS={internal:\"M3 8h10M9 4l4 4-4 4\",external:\"M5 11l6-6M6 5h5v5\",down:\"M8 3v10M4 9l4 4 4-4\",up:\"M8 13V3M4 7l4-4 4 4\",download:\"M8 2v9M4.5 7.5L8 11l3.5-3.5M3 14h10\",check:\"M3.5 8.5l3 3 6-7\"};export function resolveIcon(icon,href){if(icon!==\"auto\")return icon;if(!href)return\"none\";if(/^https?:\\/\\//.test(href))return\"external\";if(href.startsWith(\"#\"))return\"down\";return\"internal\";}export function PrimaryButton({label,children,href,onClick,type=\"button\",disabled=false,variant=\"dark\",icon=\"auto\",download=false,compact=false,iconStroke=1.6,style}){// Hover = mouse/pen only (a tap left the swapped colour stuck on phones); keyboard focus and press too (motion.tsx)\nconst ref=useRef(null);const{active,pressed,handlers}=useCardInteraction(ref);const still=RenderTarget.current()===RenderTarget.canvas||prefersReducedMotion();const c=FILL[variant];const on=active&&!disabled;const press=pressed&&!disabled&&!still;const glyph=resolveIcon(icon,href);const external=glyph===\"external\";// Colour swap fades in over dur.short with ease.inOut (MOTION_SYSTEM §4.7) — the 0.2s spring read as abrupt (2026-09-23 QA).\n// Press: scale × PRESS_SCALE, dur.micro ease.spring (§4.7a).\nconst T=`background-color ${dur.short}s ${easeCss.inOut}, color ${dur.short}s ${easeCss.inOut}, transform ${dur.micro}s ${easeCss.spring}`;const css={display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:8,padding:compact?\"10px 16px\":\"12px 20px\",boxSizing:\"border-box\",border:\"none\",borderRadius:radius.button,textDecoration:\"none\",fontFamily:typography.label.fontFamily,fontWeight:typography.label.fontWeight,fontSize:typography.label.fontSize,letterSpacing:typography.label.letterSpacing,lineHeight:typography.label.lineHeight,backgroundColor:on?c.hoverBg:c.bg,color:on?c.hoverFg:c.fg,opacity:disabled?.6:1,cursor:disabled?\"default\":\"pointer\",transform:press?`scale(${PRESS_SCALE})`:\"none\",WebkitTapHighlightColor:\"transparent\",transition:T,...style};const content=/*#__PURE__*/_jsxs(_Fragment,{children:[children??label,glyph!==\"none\"&&/*#__PURE__*/_jsx(\"svg\",{\"aria-hidden\":\"true\",width:\"14\",height:\"14\",viewBox:\"0 0 16 16\",fill:\"none\",stroke:\"currentColor\",strokeWidth:iconStroke,strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{flexShrink:0,transform:still||glyph===\"check\"?\"none\":arrowNudge(glyph,on,press),transition:`transform ${dur.micro}s ${easeCss.spring}`,// The check pops in when the button switches to its confirmation state\nanimation:glyph===\"check\"&&!still?`wofBtnCheck ${dur.short}s ${easeCss.spring} both`:undefined},children:/*#__PURE__*/_jsx(\"path\",{d:PATHS[glyph]})},glyph)]});const events={...handlers,onClick};// Focus = the hover fill, no ring (2026-09-23). Scoped per variant so two variants on one page don't clash.\nconst focus=/*#__PURE__*/_jsx(\"style\",{children:focusCss(`.wof-btn-${variant}`,\"button\",\"surface\",{bg:c.hoverBg,fg:c.hoverFg})+`@keyframes wofBtnCheck{from{opacity:0;transform:scale(0.4)}to{opacity:1;transform:scale(1)}}`});// The focus <style> sits beside the control, not inside it, so it never joins the label text\nreturn href?/*#__PURE__*/_jsxs(_Fragment,{children:[focus,/*#__PURE__*/_jsx(\"a\",{ref:ref,className:`wof-btn wof-btn-${variant}`,href:href,download:download||undefined,target:external?\"_blank\":undefined,rel:external?\"noopener noreferrer\":undefined,...events,style:css,children:content})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[focus,/*#__PURE__*/_jsx(\"button\",{ref:ref,className:`wof-btn wof-btn-${variant}`,type:type,disabled:disabled,...events,style:css,children:content})]});}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PrimaryButtonComponent(props){const isCanvas=RenderTarget.current()===RenderTarget.canvas;// Resolve the arrow from the real link before the canvas drops the href\nreturn /*#__PURE__*/_jsx(PrimaryButton,{...props,href:isCanvas?undefined:props.href,icon:resolveIcon(props.icon??\"auto\",props.href)});}addPropertyControls(PrimaryButtonComponent,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Meer informatie\"},href:{type:ControlType.Link,title:\"Link\"},variant:{type:ControlType.Enum,title:\"Variant\",defaultValue:\"dark\",options:[\"dark\",\"darkOnYellow\",\"yellow\",\"yellowOnDark\",\"redOnDark\"],optionTitles:[\"Dark\",\"Dark on yellow\",\"Yellow\",\"Yellow on dark\",\"Red on dark\"]},icon:{type:ControlType.Enum,title:\"Arrow\",defaultValue:\"auto\",options:[\"auto\",\"internal\",\"external\",\"down\",\"download\",\"none\"],optionTitles:[\"Auto (from link)\",\"→ Internal\",\"↗ External\",\"↓ Same page\",\"Download\",\"None\"]},compact:{type:ControlType.Boolean,title:\"Compact\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PrimaryButtonComponent\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"ButtonIcon\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ButtonVariant\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resolveIcon\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PrimaryButton\":{\"type\":\"reactComponent\",\"name\":\"PrimaryButton\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"wUAIuV,SAAgB,EAAsB,EAAM,EAAO,CAAC,EAAE,CAAC,OAAO,IAAI,QAAQ,GAAS,CAAC,IAAM,EAAE,EAAa,EAAG,QAAQ,KAAK,IAAI,IAAU,EAAO,SAAS,cAAc,QAAQ,EAAM,EAAY,EAAO,GAAQ,CAAC,aAAa,CAAK,EAAE,OAAO,EAAE,GAAI,EAAO,OAAO,EAAE,EAAQ,CAAM,CAAE,EAAE,EAAE,GAAI,GAAM,CAAC,GAAG,GAAM,SAAS,UAAU,OAAO,EAAO,CAAC,GAAG,GAAK,QAAQ,EAAoB,OAAO,CAAC,EAAE,IAAM,EAAQ,sBAAsB,KAAK,GAAM,KAAK,EAAE,EAAE,EAAO,CAAC,GAAG,GAAM,QAAQ,EAAQ,EAAoB,QAAQ,EAAoB,KAAK,CAAC,CAAE,EAAE,EAAO,YAAY,EAAO,CAAC,GAAG,GAAM,QAAQ,EAAoB,KAAK,CAAC,EAAE,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