@stackshift-ui/blog 7.0.0-beta.0 → 7.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import{lazy as i}from"react";import{jsx as b}from"react/jsx-runtime";var g={variant_a:i(()=>import("./blog_a.mjs")),variant_b:i(()=>import("./blog_b.mjs")),variant_c:i(()=>import("./blog_c.mjs")),variant_d:i(()=>import("./blog_d.mjs"))},y="Blog",B=({data:o})=>{var s,t,e,p,l,u,m,v,c;let n=o==null?void 0:o.variant,r=n&&g[n],f={subtitle:(t=(s=o==null?void 0:o.variants)==null?void 0:s.subtitle)!=null?t:void 0,title:(p=(e=o==null?void 0:o.variants)==null?void 0:e.title)!=null?p:void 0,posts:(m=((l=o==null?void 0:o.variants)==null?void 0:l.posts)||((u=o==null?void 0:o.variants)==null?void 0:u.blogPosts))!=null?m:void 0,primaryButton:(c=(v=o==null?void 0:o.variants)==null?void 0:v.primaryButton)!=null?c:void 0};return r?b(r,{...f}):null};B.displayName=y;export{B as a};
@@ -1 +0,0 @@
1
- import{a as b}from"./chunk-PC6NMI3O.mjs";import{Button as w}from"@stackshift-ui/button";import{Container as N}from"@stackshift-ui/container";import{Flex as u}from"@stackshift-ui/flex";import{Heading as h}from"@stackshift-ui/heading";import{Image as k}from"@stackshift-ui/image";import{Link as P}from"@stackshift-ui/link";import{Section as y}from"@stackshift-ui/section";import{Text as v}from"@stackshift-ui/text";import{Fragment as t,jsx as l,jsxs as m}from"react/jsx-runtime";function A({subtitle:e,title:d,posts:a,primaryButton:c}){return l(y,{className:"py-20 bg-background",children:m(N,{maxWidth:1280,children:[l(F,{subtitle:e,title:d}),l(L,{posts:a}),l(S,{primaryButton:c})]})})}function F({subtitle:e,title:d}){return m("div",{className:"mb-16 text-center",children:[e?l(v,{weight:"bold",className:"text-secondary",children:e}):null,d?l(h,{fontSize:"3xl",children:d}):null]})}function L({posts:e}){var c,x,f,n;if(!e)return null;let d=6,a=0;return m(u,{gap:4,className:"flex-col lg:flex-row",children:[m("div",{className:"w-full space-y-5 lg:w-1/2",children:[(c=e==null?void 0:e.slice(a,a+1))==null?void 0:c.map((i,r)=>l(g,{post:i},r)),l(u,{gap:4,className:"flex-col lg:flex-row",children:(x=e==null?void 0:e.slice(a+1,a+3))==null?void 0:x.map((i,r)=>l(g,{post:i},r))})]}),m("div",{className:"w-full space-y-5 lg:w-1/2",children:[l(u,{gap:4,className:"flex-col lg:flex-row",children:(f=e==null?void 0:e.slice(a+3,a+5))==null?void 0:f.map((i,r)=>l(g,{post:i},r))}),(n=e==null?void 0:e.slice(a+5,d))==null?void 0:n.map((i,r)=>l(g,{post:i},r))]})]})}function g({post:e,key:d}){var a,c,x,f;return m("div",{className:"relative w-full h-64 rounded",children:[e!=null&&e.mainImage?l(k,{className:"relative object-cover w-full h-full overflow-hidden rounded-md",src:`${e==null?void 0:e.mainImage}`,alt:(a=e==null?void 0:e.alt)!=null?a:`blog-variantA-image-${d}`,sizes:"(min-width: 1540px) 740px, (min-width: 1280px) 612px, (min-width: 1040px) 484px, (min-width: 780px) 736px, (min-width: 680px) 608px, calc(94.44vw - 15px)"}):null,l("div",{className:"absolute inset-0 bg-gray-900 rounded-md opacity-75"}),m("div",{className:"absolute inset-0 flex flex-col items-start p-6",children:[e!=null&&e.categories?l("div",{className:"absolute flex left-5 top-5",children:(c=e==null?void 0:e.categories)==null?void 0:c.map((n,i)=>l("span",{className:"px-3 py-1 mb-auto mr-3 text-sm font-bold uppercase bg-white rounded-full text-primary",children:n==null?void 0:n.title},i))}):null,m(u,{align:"center",className:"mt-auto",children:[l("span",{className:"mt-auto text-sm text-gray-500",children:e!=null&&e.publishedAt?b(new Date(e==null?void 0:e.publishedAt),"dd MMM, yyyy"):""}),(e==null?void 0:e.authors)&&m(t,{children:[l("span",{className:"mx-2 w-1 h-1 bg-gray-500 rounded-full"}),l("div",{className:"flex mt-auto text-sm text-gray-500",children:(x=e==null?void 0:e.authors)==null?void 0:x.map((n,i,{length:r})=>m(t,{children:[l(v,{className:"italic",fontSize:"sm",children:n==null?void 0:n.name}),i+1!==r?l("span",{children:"\xA0,\xA0"}):null]}))})]})]}),e!=null&&e.title?l(P,{className:"text-lg font-bold text-white transform hover:scale-110 hover:text-secondary motion-reduce:transform-none",href:`/${e==null?void 0:e.link}`,children:((f=e==null?void 0:e.title)==null?void 0:f.length)>40?(e==null?void 0:e.title.substring(0,40))+"...":e==null?void 0:e.title}):null]})]})}function S({primaryButton:e}){return e!=null&&e.label?l("div",{className:"mt-10 text-center",children:l(w,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}):null}export{A as a};