{"version":3,"file":"BlogTable.DsePmha5.mjs","names":["useMemo","c"],"sources":["https:/framerusercontent.com/modules/1qf5ixGZ3y7gTXApqlLN/UiOYNUz8Ue4CbvzRweyt/BlogTable.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Rows: one per line (or per semicolon), cells separated by \"|\".\nconst split=text=>String(text??\"\").split(/\\r?\\n|;/).map(l=>l.trim()).filter(Boolean).map(l=>l.split(\"|\").map(c=>c.trim()));const CSS=`\n.qst{container-type:inline-size;display:block;width:100%;font-family:Figtree,\"Inter\",system-ui,sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased;--ink:#EDF3FB;--body:#CCCCCC;--muted:#8A93A3;--line:rgba(237,243,251,.14)}\n.qst,.qst *{box-sizing:border-box}\n.qst-head{border-top:1px solid var(--line);padding-top:16px}\n.qst-title{margin:0;font-size:17px;line-height:1.3;font-weight:600;letter-spacing:-.01em}\n.qst-sub{margin:4px 0 0;font-size:14px;line-height:1.45;color:var(--muted)}\n.qst-table{width:100%;margin-top:18px;border-collapse:collapse}\n.qst-table th{text-align:left;font-size:13px;font-weight:500;color:var(--muted);padding:0 16px 10px 0;border-bottom:1px solid var(--line)}\n.qst-table td{vertical-align:top;font-size:15px;line-height:1.45;color:var(--body);padding:12px 16px 12px 0;border-bottom:1px solid var(--line)}\n.qst-table td:first-child{color:var(--ink);width:46%}\n.qst-table tr.is-hot td:first-child{box-shadow:inset 2px 0 0 var(--accent);padding-left:12px}\n.qst-cap{margin:16px 0 0;font-size:14.5px;line-height:1.55;color:var(--muted)}\n.qst-cap b{margin-right:6px;font-weight:600;color:var(--ink)}\n@container (max-width:520px){\n.qst-table thead{display:none}\n.qst-table tr{display:block;padding:12px 0;border-bottom:1px solid var(--line)}\n.qst-table td{display:block;border:0;padding:0;width:auto}\n.qst-table td:first-child{width:auto;margin-bottom:4px}\n.qst-table tr.is-hot td:first-child{box-shadow:none;padding-left:0;color:var(--accent)}\n}\n`;/**\n * Blog / Table\n *\n * A small table in the same hand as the other figures: a hairline, a title,\n * rows between hairlines, the caption inside. Real text, so it reads the same\n * to a person, a screen reader and a crawler. On a phone each row stacks.\n *\n * @framerIntrinsicWidth 680\n * @framerIntrinsicHeight 260\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function BlogTable(props){const{title=\"A table\",subtitle=\"\",columns=\"Column one | Column two\",rows=\"A | B; C | D\",highlight=-1,accent=\"#00E5FF\",figure=\"\",caption=\"\",style}=props;const head=useMemo(()=>split(columns)[0]||[],[columns]);const body=useMemo(()=>split(rows),[rows]);const vars={\"--accent\":accent};return /*#__PURE__*/_jsxs(\"div\",{className:\"qst\",role:\"group\",\"aria-label\":title,style:{...style,...vars,position:\"relative\",width:\"100%\",height:\"auto\",margin:\"36px 0 28px\"},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsxs(\"div\",{className:\"qst-head\",children:[/*#__PURE__*/_jsx(\"h3\",{className:\"qst-title\",children:title}),subtitle?/*#__PURE__*/_jsx(\"p\",{className:\"qst-sub\",children:subtitle}):null]}),/*#__PURE__*/_jsxs(\"table\",{className:\"qst-table\",children:[head.length?/*#__PURE__*/_jsx(\"thead\",{children:/*#__PURE__*/_jsx(\"tr\",{children:head.map((h,i)=>/*#__PURE__*/_jsx(\"th\",{children:h},i))})}):null,/*#__PURE__*/_jsx(\"tbody\",{children:body.map((r,i)=>/*#__PURE__*/_jsx(\"tr\",{className:i===highlight?\"is-hot\":undefined,children:r.map((c,j)=>/*#__PURE__*/_jsx(\"td\",{children:c},j))},i))})]}),caption?/*#__PURE__*/_jsxs(\"p\",{className:\"qst-cap\",children:[figure?/*#__PURE__*/_jsx(\"b\",{children:figure}):null,caption]}):null]});}BlogTable.displayName=\"Blog / Table\";addPropertyControls(BlogTable,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"A table\"},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"\"},columns:{type:ControlType.String,title:\"Columns\",defaultValue:\"Column one | Column two\",description:\"Header cells separated by |\"},rows:{type:ControlType.String,title:\"Rows\",displayTextArea:true,defaultValue:\"A | B; C | D\",description:\"One row per line or ;, cells separated by |\"},highlight:{type:ControlType.Number,title:\"Highlight row\",defaultValue:-1,min:-1,max:20,step:1,description:\"-1 for none\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#00E5FF\"},figure:{type:ControlType.String,title:\"Figure label\",defaultValue:\"\"},caption:{type:ControlType.String,title:\"Caption\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogTable\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"680\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"260\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogTable.map"],"mappings":"iLAiCG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,UAAU,WAAS,GAAG,UAAQ,0BAA0B,OAAK,eAAe,YAAU,GAAG,SAAO,UAAU,SAAO,GAAG,UAAQ,GAAG,SAAO,EAAY,EAAKA,MAAY,EAAM,CAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAO,CAAC,EAAQ,EAAKA,MAAY,EAAM,CAAI,EAAE,CAAC,CAAI,CAAC,EAAQ,EAAK,CAAC,WAAW,CAAM,EAAE,OAAoB,EAAM,MAAM,CAAC,UAAU,MAAM,KAAK,QAAQ,aAAa,EAAM,MAAM,CAAC,GAAG,EAAM,GAAG,EAAK,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,OAAO,aAAa,EAAE,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,CAAG,CAAC,EAAe,EAAM,MAAM,CAAC,UAAU,WAAW,SAAS,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