{"version":3,"file":"WithBlogCardHover.Do9KoGoS.mjs","names":["_jsx","__esmMin","init_jsx_runtime","c","ensureStyle","el","STYLE_ID","CSS","withBlogCardHover","Component","props","className","CLASS","INK","WHITE","CREAM","EASE_OUT","EASE_TEXT","C","ON","FOCUS","PREVIEW","hoverRules","init_WithBlogCardHover","s","sel"],"sources":["https:/framerusercontent.com/modules/M19Gf6Hk1SFBMnvT8d8q/ZAWbtEbHxFooW40RbE42/WithBlogCardHover.js"],"sourcesContent":["// Hover + keyboard focus for blog cards (/blog featured + grid, \"Latest posts\" on the blog post template).\n// Apply withBlogCardHover to the linked card frame. Inside it, name the layers:\n//   \"Blog cover\" - the image frame (overflow clip). Only its image scales, the frame stays put.\n//   \"Blog title\" - the title text. Gets a 1px ink underline, offset 3px (same as the site's link hover).\n//   \"Blog arrow\" - the round arrow. Its icon nudges 3px right.\n// Pure CSS, no JS state: hover only runs on devices with a real pointer ((hover: hover) and (pointer: fine)),\n// so a tap on iOS/Android navigates straight away and nothing sticks in a hover state.\n// Keyboard focus (:focus-visible) shows the same state plus a 2px ink ring.\n// withBlogCardHoverPreview forces the hover state (for canvas screenshots only, never leave it applied).\nimport{jsx as _jsx}from\"react/jsx-runtime\";const CLASS=\"pl-blog-card\";const STYLE_ID=\"pl-blog-card-hover\";const INK=\"var(--token-a5936feb-7070-4920-a1b6-15400176fff6, rgb(38, 43, 48))\";const WHITE=\"var(--token-d624bab6-2e79-4b2b-942d-b7a193232c83, rgb(255, 255, 255))\";const CREAM=\"var(--token-5faac03b-3520-402e-b6b0-fae17c157fe3, rgb(255, 246, 235))\";const EASE_OUT=\"cubic-bezier(0.22, 1, 0.36, 1)\";const EASE_TEXT=\"cubic-bezier(0.25, 0.1, 0.25, 1)\";const C=`.${CLASS}`;const ON=s=>`${C}:hover ${s}`;const FOCUS=s=>`${C}:focus-visible ${s}`;const PREVIEW=s=>`${C}.is-hover ${s}`;const hoverRules=sel=>`\n${sel(\"\").trim()} { background-color: color-mix(in srgb, ${WHITE} 50%, ${CREAM}) !important; }\n${sel('[data-framer-name=\"Blog cover\"] img')} { transform: scale(1.04) !important; }\n${sel('[data-framer-name=\"Blog title\"] .framer-text')} { text-decoration-color: ${INK} !important; }\n${sel('[data-framer-name=\"Blog arrow\"] > *')} { transform: translateX(3px) !important; }\n`;const CSS=`\n${C} { cursor: pointer; transition: background-color 0.25s ${EASE_TEXT}; -webkit-tap-highlight-color: transparent; }\n${C} [data-framer-name=\"Blog cover\"] { isolation: isolate; }\n${C} [data-framer-name=\"Blog cover\"] img { transition: transform 0.5s ${EASE_OUT}; transform-origin: 50% 50%; }\n${C} [data-framer-name=\"Blog title\"] .framer-text {\n    text-decoration-line: underline !important;\n    text-decoration-style: solid !important;\n    text-decoration-thickness: 1px !important;\n    text-underline-offset: 3px !important;\n    text-decoration-color: transparent !important;\n    transition: text-decoration-color 0.25s ${EASE_TEXT};\n}\n${C} [data-framer-name=\"Blog arrow\"] > * { transition: transform 0.25s ${EASE_OUT}; }\n${C}:focus { outline: none; }\n${C}:focus-visible { outline: 2px solid ${INK} !important; outline-offset: 3px; }\n@media (hover: hover) and (pointer: fine) {\n${hoverRules(ON)}\n}\n${hoverRules(FOCUS)}\n${hoverRules(PREVIEW)}\n@media (prefers-reduced-motion: reduce) {\n    ${C} [data-framer-name=\"Blog cover\"] img, ${C} [data-framer-name=\"Blog arrow\"] > * { transition: none; transform: none !important; }\n}\n`;function ensureStyle(){if(typeof document===\"undefined\")return;let el=document.getElementById(STYLE_ID);if(!el){el=document.createElement(\"style\");el.id=STYLE_ID;document.head.appendChild(el);}if(el.textContent!==CSS)el.textContent=CSS;}ensureStyle();export function withBlogCardHover(Component){return function BlogCardHover(props){ensureStyle();const className=[props.className,CLASS].filter(Boolean).join(\" \");return /*#__PURE__*/_jsx(Component,{...props,className:className});};}export function withBlogCardHoverPreview(Component){return function BlogCardHoverPreview(props){ensureStyle();const className=[props.className,CLASS,\"is-hover\"].filter(Boolean).join(\" \");return /*#__PURE__*/_jsx(Component,{...props,className:className});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withBlogCardHover\":{\"type\":\"reactHoc\",\"name\":\"withBlogCardHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBlogCardHoverPreview\":{\"type\":\"reactHoc\",\"name\":\"withBlogCardHoverPreview\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithBlogCardHover.map"],"mappings":"A,oGAqCE,SAASI,GAAa,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,IAAIC,EAAG,SAAS,eAAeC,CAAQ,EAAMD,IAAIA,EAAG,SAAS,cAAc,OAAO,EAAEA,EAAG,GAAGC,EAAS,SAAS,KAAK,YAAYD,CAAE,GAAMA,EAAG,cAAcE,IAAIF,EAAG,YAAYE,EAAI,CAAe,SAAgBC,EAAkBC,EAAU,CAAC,OAAO,SAAuBC,EAAM,CAACN,EAAY,EAAE,IAAMO,EAAU,CAACD,EAAM,UAAUE,CAAK,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAAE,MAAoBZ,gBAAKS,EAAU,CAAC,GAAGC,EAAgBC,WAAS,CAAC,CAAE,CAAE,C,gEA5BnbC,EAAM,eAAqBN,EAAS,qBAA2BO,EAAI,qEAA2EC,EAAM,wEAA8EC,EAAM,wEAA8EC,EAAS,iCAAuCC,EAAU,mCAAyCC,EAAE,IAAIN,IAAcO,EAAGK,GAAG,GAAGN,EAAE,SAASM,IAAUJ,EAAMI,GAAG,GAAGN,EAAE,iBAAiBM,IAAUH,EAAQG,GAAG,GAAGN,EAAE,YAAYM,IAAUF,EAAWG,GAAK;EACzlBA,EAAI,EAAE,CAAC,CAAC,KAAK,EAAE,0CAA0CX,EAAM,QAAQC,EAAM;EAC7EU,EAAI,qCAAqC,EAAE;EAC3CA,EAAI,8CAA8C,EAAE,4BAA4BZ,EAAI;EACpFY,EAAI,qCAAqC,EAAE;EACrClB,EAAI;EACVW,EAAE,yDAAyDD,EAAU;EACrEC,EAAE;EACFA,EAAE,oEAAoEF,EAAS;EAC/EE,EAAE;;;;;;8CAM0CD,EAAU;;EAEtDC,EAAE,qEAAqEF,EAAS;EAChFE,EAAE;EACFA,EAAE,sCAAsCL,EAAI;;EAE5CS,EAAWH,CAAE,EAAE;;EAEfG,EAAWF,CAAK,EAAE;EAClBE,EAAWD,CAAO,EAAE;;MAEhBH,EAAE,wCAAwCA,EAAE;;EAE6Ld,EAAY,C"}