{"version":3,"file":"HandyduxBlogCard.CiewYd4M.mjs","names":["_Fragment","__esmMin","l","p","c","init_jsx_runtime","init_npm_react_18_3_1","addPropertyControls","Link","init_framer_BisrWwwE","ControlType","excerptParts","text","boundary","cut","formatDate","value","hdxSet","img","plain","q","w","h","k","n","HandyduxBlogCard","Heading","headingLevel","shownDate","date","preview","remainder","excerpt","image","style","cardCSS","title","link","compact","init_HandyduxBlogCard"],"sources":["https:/framerusercontent.com/modules/QU3S58Fwvz2vVRPdncq0/s7qNSaqgNkjgNp6jcv0i/HandyduxBlogCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,Link}from\"framer\";// Split without dropping or repeating any supplied text. A very long word stays intact.\nfunction excerptParts(text){if(text.length<=220)return[text,\"\"];const boundary=text.slice(160,221).search(/\\s/);const cut=boundary<0?text.indexOf(\" \",220):160+boundary;return cut<0?[text,\"\"]:[text.slice(0,cut),text.slice(cut)];}// Dates arrive as ISO strings from the CMS; older instances pass plain text.\nfunction formatDate(value){if(!value)return\"\";const t=Date.parse(value);if(Number.isNaN(t)||!/^\\d{4}-\\d{2}-\\d{2}/.test(value))return value;return new Date(t).toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\",timeZone:\"UTC\"});}// CMS photographs arrive at full size with no smaller versions listed; ask the image host for sized ones.\nfunction hdxSet(img){if(!img||!img.src)return{};if(img.srcSet)return{src:img.src,srcSet:img.srcSet};const[plain,q=\"\"]=img.src.split(\"?\");if(!/framerusercontent\\.com\\/images\\//.test(plain))return{src:img.src};const w=Number((q.match(/width=(\\d+)/)||[])[1]||img.width||0),h=Number((q.match(/height=(\\d+)/)||[])[1]||img.height||0);const k=w&&h&&h>w?w/h:1;return{src:plain+\"?scale-down-to=1024\",srcSet:[512,1024,2048].map(n=>plain+\"?scale-down-to=\"+n+\" \"+Math.round(n*k)+\"w\").join(\", \")};}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 560\n * @framerIntrinsicHeight 200\n */export default function HandyduxBlogCard({title=\"\",date=\"\",excerpt=\"\",image,link=\"\",compact=false,headingLevel=\"h2\",style}){const Heading=headingLevel===\"h3\"?\"h3\":\"h2\";const shownDate=formatDate(date);const[preview,remainder]=excerptParts(excerpt);return /*#__PURE__*/_jsxs(\"article\",{className:\"hdx-blog-card\",\"data-image\":image?.src?\"true\":undefined,style:{...style,width:\"100%\",height:\"auto\",minWidth:0},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:cardCSS}}),image?.src&&/*#__PURE__*/_jsx(\"img\",{className:\"hdx-blog-card__image\",...hdxSet(image),alt:image.alt||\"\",width:image.width,height:image.height,sizes:\"(max-width: 800px) 112px, 160px\",loading:\"lazy\",decoding:\"async\"}),/*#__PURE__*/_jsxs(\"header\",{children:[shownDate&&/*#__PURE__*/_jsx(\"p\",{className:\"hdx-blog-card__date\",children:shownDate}),title&&/*#__PURE__*/_jsx(Heading,{className:\"hdx-blog-card__title\",children:link?/*#__PURE__*/_jsx(Link,{href:link,motionChild:false,children:/*#__PURE__*/_jsx(\"a\",{href:link,children:title})}):title})]}),link&&/*#__PURE__*/_jsx(\"p\",{className:\"hdx-blog-card__more\",children:/*#__PURE__*/_jsx(Link,{href:link,motionChild:false,children:/*#__PURE__*/_jsxs(\"a\",{className:\"hdx-blog-card__read\",href:link,\"aria-label\":\"Read the article: \"+title,children:[\"Read the article\",/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",width:\"14\",height:\"14\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M5 12h14M13 6l6 6-6 6\"})})]})})}),excerpt&&/*#__PURE__*/_jsx(\"div\",{className:\"hdx-blog-card__excerpt\",children:compact?/*#__PURE__*/_jsxs(\"details\",{children:[/*#__PURE__*/_jsxs(\"summary\",{children:[\"About this article\",/*#__PURE__*/_jsxs(\"span\",{className:\"hdx-blog-card__sr\",children:[\": \",title]})]}),/*#__PURE__*/_jsx(\"p\",{children:excerpt})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"p\",{children:preview}),remainder&&/*#__PURE__*/_jsxs(\"details\",{children:[/*#__PURE__*/_jsxs(\"summary\",{children:[\"Continue excerpt\",/*#__PURE__*/_jsxs(\"span\",{className:\"hdx-blog-card__sr\",children:[\" for \",title]})]}),/*#__PURE__*/_jsx(\"p\",{children:remainder})]})]})})]});}/** Apply to the native collection's item wrapper, retaining native pagination. */export function withCompactBlogIndex(Component){return /*#__PURE__*/React.forwardRef(function CompactBlogIndex(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:indexCSS}}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,\"data-hdx-compact-blog-index\":\"true\"})]});});}const cardCSS=`\n.hdx-blog-card{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:8px 20px;padding:20px;border:1px solid #30302c30;border-radius:8px;background:#f8f7f2;color:var(--hdx-dark,#292927);font-family:Inter,\"Inter Display\",Arial,sans-serif;font-weight:400;overflow-wrap:anywhere}\n.hdx-blog-card *{box-sizing:border-box}\n.hdx-blog-card[data-image=true]{grid-template-columns:160px minmax(0,1fr)}\n.hdx-blog-card>style{display:none}\n.hdx-blog-card__image{grid-column:1;grid-row:1 / span 2;display:block;width:160px;height:140px;object-fit:contain;object-position:center;background:#efeee8;border-radius:4px}\n.hdx-blog-card>header,.hdx-blog-card__excerpt{min-width:0;grid-column:1}\n.hdx-blog-card[data-image=true]>header,.hdx-blog-card[data-image=true]>.hdx-blog-card__excerpt{grid-column:2}\n.hdx-blog-card .hdx-blog-card__title{margin:0;font-family:\"Inter Display\",Inter,Arial,sans-serif;font-size:21px;line-height:1.3;font-weight:400;letter-spacing:-.025em}\n.hdx-blog-card__more{display:none;margin:0}\n.hdx-blog-card .hdx-blog-card__title a{display:flex;align-items:center;min-height:44px;min-width:44px;color:inherit;text-decoration:none;border-radius:2px}\n.hdx-blog-card__date{margin:0 0 4px;font-size:12px;line-height:1.5;color:#62625b}\n.hdx-blog-card__excerpt p{margin:0;font-size:14px;line-height:1.6;white-space:pre-wrap}\n.hdx-blog-card summary{cursor:pointer;min-height:44px;padding:12px 0;font:400 12px/20px Inter,Arial,sans-serif;color:var(--hdx-dark-soft,#45453F)}\n.hdx-blog-card a:focus-visible,.hdx-blog-card summary:focus-visible{outline:3px solid var(--hdx-dark,#292927);outline-offset:4px}\n.hdx-blog-card__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n@media(hover:hover){.hdx-blog-card .hdx-blog-card__title a:hover{text-decoration:underline;text-underline-offset:4px}.hdx-blog-card summary:hover{text-decoration:underline}}\n@media(min-width:801px){.hdx-blog-card{gap:8px 20px}}\n@media(max-width:800px){.hdx-blog-card{padding:18px 0;gap:2px 14px;border:0;border-bottom:1px solid #0A1F4426;border-radius:0;background:none}.hdx-blog-card[data-image=true]{grid-template-columns:112px minmax(0,1fr)}.hdx-blog-card__image{grid-row:1 / span 3;width:112px;height:84px;object-fit:cover;border-radius:2px}.hdx-blog-card .hdx-blog-card__title{font-size:18px;line-height:1.3}.hdx-blog-card .hdx-blog-card__title a{display:block;min-height:0;padding:0 0 4px;color:#0A1F44}.hdx-blog-card__excerpt p{font-size:13px}.hdx-blog-card__date{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#55564f}.hdx-blog-card__more{display:block;grid-column:2}.hdx-blog-card:not([data-image=true]) .hdx-blog-card__more{grid-column:1}.hdx-blog-card__read{display:inline-flex;align-items:center;gap:8px;min-height:40px;font:500 13px/1 Inter,Arial,sans-serif;color:#0A1F44!important;text-decoration:none}.hdx-blog-card__read svg{transition:transform .3s cubic-bezier(.22,1,.36,1)}.hdx-blog-card__read:active svg{transform:translateX(3px)}.hdx-blog-card summary{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 0;list-style:none;color:#55564f}.hdx-blog-card summary::-webkit-details-marker{display:none}.hdx-blog-card summary:before{content:\"\";flex:none;width:10px;height:10px;background:linear-gradient(currentColor,currentColor) center/100% 1px no-repeat,linear-gradient(currentColor,currentColor) center/1px 100% no-repeat}.hdx-blog-card details[open] summary:before{background:linear-gradient(currentColor,currentColor) center/100% 1px no-repeat}}\n`;const indexCSS=`\n[data-hdx-compact-blog-index=true]{display:grid!important;width:100%;min-width:0;max-width:100%;height:auto!important;align-items:start!important;gap:16px!important}\n[data-hdx-compact-blog-index=true]>*{min-width:0}\n/* Leave pagination and other non-card children in source order on a full row. */\n[data-hdx-compact-blog-index=true]>:not(.hdx-blog-card):not(:has(.hdx-blog-card)){grid-column:1 / -1}\n@media(min-width:801px){[data-hdx-compact-blog-index=true]{grid-template-columns:repeat(2,minmax(0,1fr))!important}}\n@media(max-width:800px){[data-hdx-compact-blog-index=true]{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}}\n`;addPropertyControls(HandyduxBlogCard,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},date:{type:ControlType.Date,title:\"Date\"},excerpt:{type:ControlType.String,title:\"Excerpt\",defaultValue:\"\",displayTextArea:true},image:{type:ControlType.ResponsiveImage,title:\"Image\"},link:{type:ControlType.Link,title:\"Link\"},compact:{type:ControlType.Boolean,title:\"Compact\",defaultValue:false},headingLevel:{type:ControlType.Enum,title:\"Heading\",options:[\"h2\",\"h3\"],optionTitles:[\"H2 (archive)\",\"H3 (inside a section)\"],defaultValue:\"h2\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"HandyduxBlogCardProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"HandyduxBlogCard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"560\",\"framerContractVersion\":\"1\"}},\"withCompactBlogIndex\":{\"type\":\"reactHoc\",\"name\":\"withCompactBlogIndex\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HandyduxBlogCard.map"],"mappings":"A,wLACA,SAASW,EAAa,EAAK,CAAC,GAAGC,EAAK,QAAQ,IAAI,MAAM,CAACA,EAAK,EAAE,EAAE,IAAMC,EAASD,EAAK,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,IAAI,EAAQE,EAAID,EAAS,EAAED,EAAK,QAAQ,IAAI,GAAG,EAAE,IAAIC,EAAS,OAAOC,EAAI,EAAE,CAACF,EAAK,EAAE,EAAE,CAACA,EAAK,MAAM,EAAEE,CAAG,EAAEF,EAAK,MAAME,CAAG,CAAC,CAAE,CACnO,SAASC,EAAW,EAAM,CAAC,GAAG,CAACC,EAAM,MAAM,GAAG,IAAM,EAAE,KAAK,MAAMA,CAAK,EAAqE,OAAhE,OAAO,MAAM,CAAC,GAAG,CAAC,qBAAqB,KAAKA,CAAK,EAASA,EAAa,IAAI,KAAK,CAAC,CAAC,CAAC,mBAAmB,QAAQ,CAAC,MAAM,QAAQ,IAAI,UAAU,KAAK,UAAU,SAAS,KAAK,CAAC,CAAE,CACtP,SAASC,EAAO,EAAI,CAAC,GAAG,CAACC,GAAK,CAACA,EAAI,IAAI,MAAM,CAAC,EAAE,GAAGA,EAAI,OAAO,MAAM,CAAC,IAAIA,EAAI,IAAI,OAAOA,EAAI,MAAM,EAAE,GAAK,CAACC,EAAMC,EAAE,IAAIF,EAAI,IAAI,MAAM,GAAG,EAAE,GAAG,CAAC,mCAAmC,KAAKC,CAAK,EAAE,MAAM,CAAC,IAAID,EA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