@stackshift-ui/app-promo 6.0.2 → 6.0.4-beta.0
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.
- package/dist/app-promo.js +1 -1
- package/dist/app-promo.mjs +1 -1
- package/dist/app-promo_a.js +1 -1
- package/dist/app-promo_a.mjs +1 -1
- package/dist/app-promo_b.js +1 -1
- package/dist/app-promo_b.mjs +1 -1
- package/dist/app-promo_c.js +1 -1
- package/dist/app-promo_c.mjs +1 -1
- package/dist/chunk-75ZMG3QX.mjs +1 -0
- package/dist/chunk-VYDG5YDD.mjs +1 -0
- package/dist/{chunk-DOIJ5GHV.mjs → chunk-YISSMRJL.mjs} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +12 -11
- package/src/app-promo.test.tsx +13 -0
- package/src/app-promo.tsx +39 -0
- package/src/app-promo_a.tsx +172 -0
- package/src/app-promo_b.tsx +191 -0
- package/src/app-promo_c.tsx +137 -0
- package/src/helper/index.ts +14 -0
- package/src/index.ts +7 -0
- package/src/types.ts +412 -0
- package/dist/chunk-HEASXD32.mjs +0 -1
- package/dist/chunk-UHCXH5CS.mjs +0 -1
- /package/dist/{chunk-G2VBXDZJ.mjs → chunk-WA4PS4TA.mjs} +0 -0
package/dist/app-promo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ut=Object.create;var f=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var xt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var d=(t,r)=>()=>(t&&(r=t(t=0)),r);var x=(t,r)=>{for(var e in r)f(t,e,{get:r[e],enumerable:!0})},B=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of dt(r))!wt.call(t,n)&&n!==e&&f(t,n,{get:()=>r[n],enumerable:!(i=ft(r,n))||i.enumerable});return t};var H=(t,r,e)=>(e=t!=null?ut(xt(t)):{},B(r||!t||!t.__esModule?f(e,"default",{value:t,enumerable:!0}):e,t)),ht=t=>B(f({},"__esModule",{value:!0}),t);var w,j=d(()=>{"use strict";w=t=>{var r,e,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(e=(r=t==null?void 0:t.internalLink)==null?void 0:r.toLowerCase())!=null&&e.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"}});var K={};x(K,{AppPromo_A:()=>J,default:()=>J});function J({logo:t,subtitle:r,title:e,images:i=[]}){var s;let[n,m]=(0,h.useState)(0),c=()=>{i!=null&&i.length&&(n!==i.length-1?m(n+1):m(n=0))},u=()=>{i!=null&&i.length&&m(n!==0?n-1:n=i.length-1)};return(0,a.jsx)(E.Section,{className:"o-16 overflow-hidden bg-background",children:(0,a.jsxs)(V.Container,{className:"relative text-center",maxWidth:448,children:[(0,a.jsx)(bt,{logo:t}),(0,a.jsx)(vt,{subtitle:r,title:e}),(0,a.jsx)(kt,{images:i}),(0,a.jsx)(Ct,{image:i[n].image,alt:(s=i[n].alt)!=null?s:`appPromo-variantA-image-${n}`}),(0,a.jsx)(gt,{arrowLeftClick:u,arrowRightClick:c})]})})}function bt({logo:t}){var r;return t!=null&&t.image?(0,a.jsx)(M.Link,{"aria-label":`Go to ${w(t)==="/"?"home page":w(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:w(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(G.Image,{src:t==null?void 0:t.image,width:50,height:56,alt:(r=t==null?void 0:t.alt)!=null?r:"appPromo-logo"})}):null}function vt({subtitle:t,title:r}){return(0,a.jsxs)(h.default.Fragment,{children:[t?(0,a.jsx)(q.Text,{className:"mb-3 text-secondary",children:t}):null,r?(0,a.jsx)(W.Heading,{type:"h1",fontSize:"3xl",className:"mb-8",children:r}):null]})}function g({src:t,alt:r,positionClass:e}){return t?(0,a.jsx)("img",{className:`absolute object-contain h-80 rounded-t-2xl ${e}`,src:t,sizes:"218px",width:218,height:320,alt:r}):null}function kt({images:t}){var r,e,i,n,m,c;return(0,a.jsxs)("div",{className:"hidden h-72 sm:block",children:[(r=t==null?void 0:t[0])!=null&&r.image?(0,a.jsx)(g,{src:(e=t==null?void 0:t[0])==null?void 0:e.image,alt:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(i=t==null?void 0:t[1])!=null&&i.image?(0,a.jsx)(g,{src:(n=t==null?void 0:t[1])==null?void 0:n.image,alt:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(m=t==null?void 0:t[2])!=null&&m.image?(0,a.jsx)(g,{src:(c=t==null?void 0:t[2])==null?void 0:c.image,alt:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function Ct({image:t,alt:r}){return t?(0,a.jsx)("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:(0,a.jsx)("img",{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:r})}):null}function gt({arrowLeftClick:t,arrowRightClick:r}){return(0,a.jsxs)(D.Flex,{justify:"between",className:"mb-16 sm:hidden",children:[(0,a.jsx)(P.SwiperButton,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),(0,a.jsx)(P.SwiperButton,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:r})]})}var V,D,W,G,M,E,P,q,h,a,O=d(()=>{"use strict";V=require("@stackshift-ui/container"),D=require("@stackshift-ui/flex"),W=require("@stackshift-ui/heading"),G=require("@stackshift-ui/image"),M=require("@stackshift-ui/link"),E=require("@stackshift-ui/section"),P=require("@stackshift-ui/swiper-button"),q=require("@stackshift-ui/text"),h=H(require("react"));j();a=require("react/jsx-runtime")});var rt={};x(rt,{AppPromo_B:()=>tt,default:()=>tt});function tt({subtitle:t,title:r,description:e,statistics:i,images:n}){let[m,c]=p.default.useState(0);return(0,o.jsx)(E.Section,{className:"o-16 overflow-hidden bg-background",children:(0,o.jsxs)(U.Container,{className:"relative text-center",maxWidth:1280,children:[(0,o.jsxs)("div",{className:"w-full mt-8 lg:w-1/2",children:[(0,o.jsx)(Pt,{subtitle:t,title:r,description:e}),(0,o.jsx)(Nt,{statistics:i})]}),(0,o.jsx)(D.Flex,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:(0,o.jsx)(Lt,{images:n,currentPosition:m,arrowLeftClick:()=>{n!=null&&n.length&&c(m!==0?m-1:m=n.length-1)},arrowRightClick:()=>{n!=null&&n.length&&(m!==n.length-1?c(m+1):c(m=0))}})})]})})}function Pt({subtitle:t,title:r,description:e}){return(0,o.jsxs)(p.default.Fragment,{children:[t?(0,o.jsx)(q.Text,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,r?(0,o.jsx)(W.Heading,{type:"h1",fontSize:"3xl",className:"mt-3 text-center md:text-left",children:r}):null,e?(0,o.jsx)(q.Text,{className:"mt-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:e}):null]})}function Nt({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:(0,o.jsx)(p.default.Fragment,{children:(0,o.jsx)(D.Flex,{wrap:!0,children:t==null?void 0:t.map((r,e)=>(0,o.jsxs)("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[(0,o.jsx)(q.Text,{muted:!0,className:"mb-3",children:r==null?void 0:r.label}),(0,o.jsx)("span",{className:"text-xl text-gray-500 font-bold",children:r==null?void 0:r.value})]},e))})})}function Lt({images:t,currentPosition:r,arrowLeftClick:e,arrowRightClick:i}){return t?(0,o.jsx)(p.default.Fragment,{children:t.length>1?(0,o.jsx)(yt,{arrowLeftClick:e,arrowRightClick:i,children:(0,o.jsx)(Q,{images:t,currentPosition:r})}):(0,o.jsx)(Q,{images:t,currentPosition:r})}):null}function yt({children:t,arrowLeftClick:r,arrowRightClick:e}){return(0,o.jsxs)(p.default.Fragment,{children:[(0,o.jsx)(P.SwiperButton,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:r}),t,(0,o.jsx)(P.SwiperButton,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:e})]})}function Q({images:t,currentPosition:r}){var e,i,n;return(e=t==null?void 0:t[r])!=null&&e.image?(0,o.jsx)("div",{className:"object-contain w-1/2 mr-2",children:(0,o.jsx)(G.Image,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[r].image}`,sizes:"100vw",width:500,height:850,alt:(n=(i=t[r])==null?void 0:i.alt)!=null?n:`appPromo-variantB-image-${r}`})}):null}var U,D,W,G,E,P,q,p,o,et=d(()=>{"use strict";U=require("@stackshift-ui/container"),p=H(require("react")),o=require("react/jsx-runtime")});var mt={};x(mt,{AppPromo_C:()=>at,default:()=>at});function at({subtitle:t,title:r,description:e,features:i,images:n}){return(0,o.jsx)(E.Section,{className:"py-20 bg-background",children:(0,o.jsx)(lt.Container,{maxWidth:1280,children:(0,o.jsxs)(D.Flex,{align:"center",wrap:!0,gap:8,children:[(0,o.jsx)(It,{subtitle:t,title:r,description:e,features:i}),(0,o.jsx)(Rt,{images:n})]})})})}function It({subtitle:t,title:r,description:e,features:i}){return(0,o.jsxs)("div",{className:"max-w-xl space-y-5",children:[t?(0,o.jsx)(q.Text,{weight:"bold",className:"text-sm md:text-lg lg:text-xl text-secondary",children:t}):null,r?(0,o.jsx)(nt.Heading,{type:"h1",fontSize:"3xl",children:r}):null,e?(0,o.jsx)(q.Text,{muted:!0,className:"text-sm md:text-lg lg:text-xl",children:e}):null,(0,o.jsx)(St,{features:i})]})}function St({features:t}){return t?(0,o.jsx)("ul",{className:"mb-8",children:t.map((r,e)=>(0,o.jsxs)(D.Flex,{as:"li",align:"center",className:"mb-3",children:[(0,o.jsx)(At,{}),(0,o.jsx)(q.Text,{className:"text-sm md:text-lg lg:text-xl",weight:"bold",muted:!0,children:r})]},e))}):null}function Rt({images:t}){return t?(0,o.jsxs)(D.Flex,{align:"center",className:"w-full transform -rotate-12 lg:w-1/2",children:[(0,o.jsx)(y,{images:t,start:0,end:1}),(0,o.jsx)("div",{className:"w-full",children:t==null?void 0:t.slice(1,3).map((r,e)=>(0,o.jsx)(y,{images:[r],start:0,end:1},e))}),(0,o.jsx)(y,{images:t,start:3,end:4})]}):null}function y({images:t,start:r,end:e}){var i;return(i=t==null?void 0:t[r])!=null&&i.image?(0,o.jsx)("div",{className:"w-full",children:t.slice(r,e).map((n,m)=>{var c;return(0,o.jsx)(G.Image,{className:"object-cover",src:`${n.image}`,sizes:"100vw",width:500,height:850,alt:(c=n.alt)!=null?c:`appPromo-variantC-image-${m}`},m)})}):null}function At(){return(0,o.jsx)("svg",{className:"w-5 h-5 mr-2 text-primary-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}var nt,q,G,E,lt,D,o,ct=d(()=>{"use strict";nt=require("@stackshift-ui/heading"),lt=require("@stackshift-ui/container")});var zt={};x(zt,{AppPromo:()=>st});module.exports=ht(zt);var C=require("react"),Ft={variant_a:(0,C.lazy)(()=>Promise.resolve().then(()=>(O(),K))),variant_b:(0,C.lazy)(()=>Promise.resolve().then(()=>(et(),rt))),variant_c:(0,C.lazy)(()=>Promise.resolve().then(()=>(ct(),mt)))},Tt="AppPromo",st=({data:t})=>{var n,m,c,u,s,I,S,R,A,F,T,z,_,$;let r=t==null?void 0:t.variant,e=r&&Ft[r],i={logo:(m=(n=t==null?void 0:t.variants)==null?void 0:n.logo)!=null?m:void 0,subtitle:(u=(c=t==null?void 0:t.variants)==null?void 0:c.subtitle)!=null?u:void 0,title:(I=(s=t==null?void 0:t.variants)==null?void 0:s.title)!=null?I:void 0,description:(R=(S=t==null?void 0:t.variants)==null?void 0:S.description)!=null?R:void 0,statistics:(F=(A=t==null?void 0:t.variants)==null?void 0:A.stats)!=null?F:void 0,features:(z=(T=t==null?void 0:t.variants)==null?void 0:T.tags)!=null?z:void 0,images:($=(_=t==null?void 0:t.variants)==null?void 0:_.images)!=null?$:void 0};return e?(0,o.jsx)(e,{...i}):null};st.displayName=Tt;0&&(module.exports={AppPromo});
|
|
1
|
+
"use strict";var st=Object.create;var h=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var b=(t,r)=>()=>(t&&(r=t(t=0)),r);var v=(t,r)=>{for(var e in r)h(t,e,{get:r[e],enumerable:!0})},H=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of xt(r))!wt.call(t,n)&&n!==e&&h(t,n,{get:()=>r[n],enumerable:!(i=ft(r,n))||i.enumerable});return t};var j=(t,r,e)=>(e=t!=null?st(dt(t)):{},H(r||!t||!t.__esModule?h(e,"default",{value:t,enumerable:!0}):e,t)),ht=t=>H(h({},"__esModule",{value:!0}),t);var k,V=b(()=>{"use strict";k=t=>{var r,e,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(e=(r=t==null?void 0:t.internalLink)==null?void 0:r.toLowerCase())!=null&&e.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"}});var K={};v(K,{AppPromo_A:()=>J,default:()=>J});function J({logo:t,subtitle:r,title:e,images:i=[]}){var p;let[n,c]=(0,P.useState)(0),m=()=>{i!=null&&i.length&&(n!==i.length-1?c(n+1):c(n=0))},u=()=>{i!=null&&i.length&&c(n!==0?n-1:n=i.length-1)};return(0,a.jsx)(E.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,a.jsxs)(D.Container,{className:"relative text-center",maxWidth:448,children:[(0,a.jsx)(bt,{logo:t}),(0,a.jsx)(vt,{subtitle:r,title:e}),(0,a.jsx)(kt,{images:i}),(0,a.jsx)(Ct,{image:i[n].image,alt:(p=i[n].alt)!=null?p:`appPromo-variantA-image-${n}`}),(0,a.jsx)(Pt,{arrowLeftClick:u,arrowRightClick:m})]})})}function bt({logo:t}){var r;return t!=null&&t.image?(0,a.jsx)(M.Link,{"aria-label":`Go to ${k(t)==="/"?"home page":k(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:k(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(C.Image,{src:t==null?void 0:t.image,width:50,height:56,alt:(r=t==null?void 0:t.alt)!=null?r:"appPromo-logo"})}):null}function vt({subtitle:t,title:r}){return(0,a.jsxs)(P.default.Fragment,{children:[t?(0,a.jsx)(q.Text,{className:"mb-3 text-secondary",children:t}):null,r?(0,a.jsx)(G.Heading,{type:"h1",fontSize:"3xl",className:"mb-8",children:r}):null]})}function g({src:t,alt:r,positionClass:e}){return t?(0,a.jsx)(C.Image,{className:`absolute object-contain h-80 rounded-t-2xl ${e}`,src:t,sizes:"218px",width:218,height:320,alt:r}):null}function kt({images:t}){var r,e,i,n,c,m,u,p,f,x,d,w;return(0,a.jsxs)("div",{className:"hidden h-72 sm:block",children:[(r=t==null?void 0:t[0])!=null&&r.image?(0,a.jsx)(g,{src:(e=t==null?void 0:t[0])==null?void 0:e.image,alt:(n=(i=t==null?void 0:t[0])==null?void 0:i.alt)!=null?n:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(c=t==null?void 0:t[1])!=null&&c.image?(0,a.jsx)(g,{src:(m=t==null?void 0:t[1])==null?void 0:m.image,alt:(p=(u=t==null?void 0:t[1])==null?void 0:u.alt)!=null?p:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(f=t==null?void 0:t[2])!=null&&f.image?(0,a.jsx)(g,{src:(x=t==null?void 0:t[2])==null?void 0:x.image,alt:(w=(d=t==null?void 0:t[2])==null?void 0:d.alt)!=null?w:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function Ct({image:t,alt:r}){return t?(0,a.jsx)("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:(0,a.jsx)(C.Image,{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:r})}):null}function Pt({arrowLeftClick:t,arrowRightClick:r}){return(0,a.jsxs)(W.Flex,{justify:"between",className:"mb-16 sm:hidden",children:[(0,a.jsx)(R.SwiperButton,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),(0,a.jsx)(R.SwiperButton,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:r})]})}var D,W,G,C,M,E,R,q,P,a,O=b(()=>{"use strict";D=require("@stackshift-ui/container"),W=require("@stackshift-ui/flex"),G=require("@stackshift-ui/heading"),C=require("@stackshift-ui/image"),M=require("@stackshift-ui/link"),E=require("@stackshift-ui/section"),R=require("@stackshift-ui/swiper-button"),q=require("@stackshift-ui/text"),P=j(require("react"));V();a=require("react/jsx-runtime")});var rt={};v(rt,{AppPromo_B:()=>tt,default:()=>tt});function tt({subtitle:t,title:r,description:e,statistics:i,images:n}){let[c,m]=s.default.useState(0);return(0,o.jsx)(E.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,o.jsx)(U.Container,{className:"relative text-center",maxWidth:1280,children:(0,o.jsxs)(W.Flex,{justify:"between",className:"flex-col md:flex-row",children:[(0,o.jsxs)("div",{className:"w-full mt-8 lg:w-1/2",children:[(0,o.jsx)(Nt,{subtitle:t,title:r,description:e}),(0,o.jsx)(Lt,{statistics:i})]}),(0,o.jsx)(W.Flex,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:(0,o.jsx)(yt,{images:n,currentPosition:c,arrowLeftClick:()=>{n!=null&&n.length&&m(c!==0?c-1:c=n.length-1)},arrowRightClick:()=>{n!=null&&n.length&&(c!==n.length-1?m(c+1):m(c=0))}})})]})})})}function Nt({subtitle:t,title:r,description:e}){return(0,o.jsxs)(s.default.Fragment,{children:[t?(0,o.jsx)(q.Text,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,r?(0,o.jsx)(G.Heading,{type:"h1",fontSize:"3xl",className:"mt-3 text-center md:text-left",children:r}):null,e?(0,o.jsx)(q.Text,{className:"mt-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:e}):null]})}function Lt({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:(0,o.jsx)(s.default.Fragment,{children:(0,o.jsx)(W.Flex,{wrap:!0,children:t==null?void 0:t.map((r,e)=>(0,o.jsxs)("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[(0,o.jsx)(q.Text,{muted:!0,className:"mb-3",children:r==null?void 0:r.label}),(0,o.jsx)("span",{className:"text-xl text-gray-500 font-bold",children:r==null?void 0:r.value})]},e))})})}function yt({images:t,currentPosition:r,arrowLeftClick:e,arrowRightClick:i}){return t?(0,o.jsx)(s.default.Fragment,{children:t.length>1?(0,o.jsx)(It,{arrowLeftClick:e,arrowRightClick:i,children:(0,o.jsx)(Q,{images:t,currentPosition:r})}):(0,o.jsx)(Q,{images:t,currentPosition:r})}):null}function It({children:t,arrowLeftClick:r,arrowRightClick:e}){return(0,o.jsxs)(s.default.Fragment,{children:[(0,o.jsx)(R.SwiperButton,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:r}),t,(0,o.jsx)(R.SwiperButton,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:e})]})}function Q({images:t,currentPosition:r}){var e,i,n;return(e=t==null?void 0:t[r])!=null&&e.image?(0,o.jsx)("div",{className:"object-contain w-1/2 mr-2",children:(0,o.jsx)(C.Image,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[r].image}`,sizes:"100vw",width:500,height:850,alt:(n=(i=t[r])==null?void 0:i.alt)!=null?n:`appPromo-variantB-image-${r}`})}):null}var U,W,G,C,E,R,q,s,o,et=b(()=>{"use strict";U=require("@stackshift-ui/container"),s=j(require("react")),o=require("react/jsx-runtime")});var ct={};v(ct,{AppPromo_C:()=>at,default:()=>at});function at({subtitle:t,title:r,description:e,features:i,images:n}){return(0,o.jsx)(E.Section,{className:"py-20 bg-background",children:(0,o.jsx)(nt.Container,{maxWidth:1280,children:(0,o.jsxs)(W.Flex,{align:"center",wrap:!0,gap:8,children:[(0,o.jsx)(St,{subtitle:t,title:r,description:e,features:i}),(0,o.jsx)(Rt,{images:n})]})})})}function St({subtitle:t,title:r,description:e,features:i}){return(0,o.jsxs)("div",{className:"max-w-xl space-q-5",children:[t?(0,o.jsx)(q.Text,{weight:"bold",className:"text-sm md:text-lg lg:text-xl text-secondary",children:t}):null,r?(0,o.jsx)(G.Heading,{type:"h1",fontSize:"3xl",children:r}):null,e?(0,o.jsx)(q.Text,{muted:!0,className:"text-sm md:text-lg lg:text-xl",children:e}):null,(0,o.jsx)(gt,{features:i})]})}function gt({features:t}){return t?(0,o.jsx)("ul",{className:"mb-8",children:t.map((r,e)=>(0,o.jsxs)(W.Flex,{as:"li",align:"center",className:"mb-3",children:[(0,o.jsx)(At,{}),(0,o.jsx)(q.Text,{className:"text-sm md:text-lg lg:text-xl",weight:"bold",muted:!0,children:r})]},e))}):null}function Rt({images:t}){return t?(0,o.jsxs)(W.Flex,{align:"center",className:"w-full transform -rotate-12 lg:w-1/2",children:[(0,o.jsx)(F,{images:t,start:0,end:1}),(0,o.jsx)("div",{className:"w-full",children:t==null?void 0:t.slice(1,3).map((r,e)=>(0,o.jsx)(F,{images:[r],start:0,end:1},e))}),(0,o.jsx)(F,{images:t,start:3,end:4})]}):null}function F({images:t,start:r,end:e}){var i;return(i=t==null?void 0:t[r])!=null&&i.image?(0,o.jsx)("div",{className:"w-full",children:t.slice(r,e).map((n,c)=>{var m;return(0,o.jsx)(C.Image,{className:"object-cover",src:`${n.image}`,sizes:"100vw",width:500,height:850,alt:(m=n.alt)!=null?m:`appPromo-variantC-image-${c}`},c)})}):null}function At(){return(0,o.jsx)("svg",{className:"w-5 h-5 mr-2 text-primary-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}var nt,W,G,C,E,q,o,mt=b(()=>{"use strict";nt=require("@stackshift-ui/container")});var zt={};v(zt,{AppPromo:()=>pt});module.exports=ht(zt);var S=require("react"),Ft={variant_a:(0,S.lazy)(()=>Promise.resolve().then(()=>(O(),K))),variant_b:(0,S.lazy)(()=>Promise.resolve().then(()=>(et(),rt))),variant_c:(0,S.lazy)(()=>Promise.resolve().then(()=>(mt(),ct)))},Tt="AppPromo",pt=({data:t})=>{var n,c,m,u,p,f,x,d,w,T,z,_,$,B;let r=t==null?void 0:t.variant,e=r&&Ft[r],i={logo:(c=(n=t==null?void 0:t.variants)==null?void 0:n.logo)!=null?c:void 0,subtitle:(u=(m=t==null?void 0:t.variants)==null?void 0:m.subtitle)!=null?u:void 0,title:(f=(p=t==null?void 0:t.variants)==null?void 0:p.title)!=null?f:void 0,description:(d=(x=t==null?void 0:t.variants)==null?void 0:x.description)!=null?d:void 0,statistics:(T=(w=t==null?void 0:t.variants)==null?void 0:w.stats)!=null?T:void 0,features:(_=(z=t==null?void 0:t.variants)==null?void 0:z.tags)!=null?_:void 0,images:(B=($=t==null?void 0:t.variants)==null?void 0:$.images)!=null?B:void 0};return e?(0,o.jsx)(e,{...i}):null};pt.displayName=Tt;0&&(module.exports={AppPromo});
|
package/dist/app-promo.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-WA4PS4TA.mjs";export{a as AppPromo};
|
package/dist/app-promo_a.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var S=Object.create;var o=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var $=(t,r)=>{for(var i in r)o(t,i,{get:r[i],enumerable:!0})},L=(t,r,i,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of T(r))!F.call(t,a)&&a!==i&&o(t,a,{get:()=>r[a],enumerable:!(e=R(r,a))||e.enumerable});return t};var j=(t,r,i)=>(i=t!=null?S(z(t)):{},L(r||!t||!t.__esModule?o(i,"default",{value:t,enumerable:!0}):i,t)),B=t=>L(o({},"__esModule",{value:!0}),t);var V={};$(V,{AppPromo_A:()=>I,default:()=>I});module.exports=B(V);var P=require("@stackshift-ui/container"),C=require("@stackshift-ui/flex"),v=require("@stackshift-ui/heading"),d=require("@stackshift-ui/image"),N=require("@stackshift-ui/link"),A=require("@stackshift-ui/section"),b=require("@stackshift-ui/swiper-button"),y=require("@stackshift-ui/text"),m=j(require("react"));var f=t=>{var r,i,e;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(i=(r=t==null?void 0:t.internalLink)==null?void 0:r.toLowerCase())!=null&&i.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(e=t==null?void 0:t.externalLink)!=null?e:"/"};var n=require("react/jsx-runtime");function I({logo:t,subtitle:r,title:i,images:e=[]}){var p;let[a,l]=(0,m.useState)(0),c=()=>{e!=null&&e.length&&(a!==e.length-1?l(a+1):l(a=0))},u=()=>{e!=null&&e.length&&l(a!==0?a-1:a=e.length-1)};return(0,n.jsx)(A.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,n.jsxs)(P.Container,{className:"relative text-center",maxWidth:448,children:[(0,n.jsx)(G,{logo:t}),(0,n.jsx)(H,{subtitle:r,title:i}),(0,n.jsx)(_,{images:e}),(0,n.jsx)(E,{image:e[a].image,alt:(p=e[a].alt)!=null?p:`appPromo-variantA-image-${a}`}),(0,n.jsx)(M,{arrowLeftClick:u,arrowRightClick:c})]})})}function G({logo:t}){var r;return t!=null&&t.image?(0,n.jsx)(N.Link,{"aria-label":`Go to ${f(t)==="/"?"home page":f(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:f(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.jsx)(d.Image,{src:t==null?void 0:t.image,width:50,height:56,alt:(r=t==null?void 0:t.alt)!=null?r:"appPromo-logo"})}):null}function H({subtitle:t,title:r}){return(0,n.jsxs)(m.default.Fragment,{children:[t?(0,n.jsx)(y.Text,{className:"mb-3 text-secondary",children:t}):null,r?(0,n.jsx)(v.Heading,{type:"h1",fontSize:"3xl",className:"mb-8",children:r}):null]})}function h({src:t,alt:r,positionClass:i}){return t?(0,n.jsx)(d.Image,{className:`absolute object-contain h-80 rounded-t-2xl ${i}`,src:t,sizes:"218px",width:218,height:320,alt:r}):null}function _({images:t}){var r,i,e,a,l,c,u,p,k,s,w,x;return(0,n.jsxs)("div",{className:"hidden h-72 sm:block",children:[(r=t==null?void 0:t[0])!=null&&r.image?(0,n.jsx)(h,{src:(i=t==null?void 0:t[0])==null?void 0:i.image,alt:(a=(e=t==null?void 0:t[0])==null?void 0:e.alt)!=null?a:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(l=t==null?void 0:t[1])!=null&&l.image?(0,n.jsx)(h,{src:(c=t==null?void 0:t[1])==null?void 0:c.image,alt:(p=(u=t==null?void 0:t[1])==null?void 0:u.alt)!=null?p:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(k=t==null?void 0:t[2])!=null&&k.image?(0,n.jsx)(h,{src:(s=t==null?void 0:t[2])==null?void 0:s.image,alt:(x=(w=t==null?void 0:t[2])==null?void 0:w.alt)!=null?x:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function E({image:t,alt:r}){return t?(0,n.jsx)("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:(0,n.jsx)(d.Image,{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:r})}):null}function M({arrowLeftClick:t,arrowRightClick:r}){return(0,n.jsxs)(C.Flex,{justify:"between",className:"mb-16 sm:hidden",children:[(0,n.jsx)(b.SwiperButton,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),(0,n.jsx)(b.SwiperButton,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:r})]})}0&&(module.exports={AppPromo_A});
|
package/dist/app-promo_a.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-VYDG5YDD.mjs";import"./chunk-KQFO7OZP.mjs";export{a as AppPromo_A,a as default};
|
package/dist/app-promo_b.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=Object.create;var m=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var v=Object.create;var m=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var F=(t,e)=>{for(var o in e)m(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of s(e))!R.call(t,l)&&l!==o&&m(t,l,{get:()=>e[l],enumerable:!(n=k(e,l))||n.enumerable});return t};var S=(t,e,o)=>(o=t!=null?v(N(t)):{},d(e||!t||!t.__esModule?m(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>d(m({},"__esModule",{value:!0}),t);var A={};F(A,{AppPromo_B:()=>C,default:()=>C});module.exports=P(A);var g=require("@stackshift-ui/container"),f=require("@stackshift-ui/flex"),x=require("@stackshift-ui/heading"),h=require("@stackshift-ui/image"),b=require("@stackshift-ui/section"),p=require("@stackshift-ui/swiper-button"),u=require("@stackshift-ui/text"),i=S(require("react")),r=require("react/jsx-runtime");function C({subtitle:t,title:e,description:o,statistics:n,images:l}){let[a,c]=i.default.useState(0);return(0,r.jsx)(b.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,r.jsx)(g.Container,{className:"relative text-center",maxWidth:1280,children:(0,r.jsxs)(f.Flex,{justify:"between",className:"flex-col md:flex-row",children:[(0,r.jsxs)("div",{className:"w-full mt-8 lg:w-1/2",children:[(0,r.jsx)(I,{subtitle:t,title:e,description:o}),(0,r.jsx)(L,{statistics:n})]}),(0,r.jsx)(f.Flex,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:(0,r.jsx)(y,{images:l,currentPosition:a,arrowLeftClick:()=>{l!=null&&l.length&&c(a!==0?a-1:a=l.length-1)},arrowRightClick:()=>{l!=null&&l.length&&(a!==l.length-1?c(a+1):c(a=0))}})})]})})})}function I({subtitle:t,title:e,description:o}){return(0,r.jsxs)(i.default.Fragment,{children:[t?(0,r.jsx)(u.Text,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,e?(0,r.jsx)(x.Heading,{type:"h1",fontSize:"3xl",className:"mt-3 text-center md:text-left",children:e}):null,o?(0,r.jsx)(u.Text,{className:"mt-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:o}):null]})}function L({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:(0,r.jsx)(i.default.Fragment,{children:(0,r.jsx)(f.Flex,{wrap:!0,children:t==null?void 0:t.map((e,o)=>(0,r.jsxs)("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[(0,r.jsx)(u.Text,{muted:!0,className:"mb-3",children:e==null?void 0:e.label}),(0,r.jsx)("span",{className:"text-xl text-gray-500 font-bold",children:e==null?void 0:e.value})]},o))})})}function y({images:t,currentPosition:e,arrowLeftClick:o,arrowRightClick:n}){return t?(0,r.jsx)(i.default.Fragment,{children:t.length>1?(0,r.jsx)(T,{arrowLeftClick:o,arrowRightClick:n,children:(0,r.jsx)(w,{images:t,currentPosition:e})}):(0,r.jsx)(w,{images:t,currentPosition:e})}):null}function T({children:t,arrowLeftClick:e,arrowRightClick:o}){return(0,r.jsxs)(i.default.Fragment,{children:[(0,r.jsx)(p.SwiperButton,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:e}),t,(0,r.jsx)(p.SwiperButton,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:o})]})}function w({images:t,currentPosition:e}){var o,n,l;return(o=t==null?void 0:t[e])!=null&&o.image?(0,r.jsx)("div",{className:"object-contain w-1/2 mr-2",children:(0,r.jsx)(h.Image,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[e].image}`,sizes:"100vw",width:500,height:850,alt:(l=(n=t[e])==null?void 0:n.alt)!=null?l:`appPromo-variantB-image-${e}`})}):null}0&&(module.exports={AppPromo_B});
|
package/dist/app-promo_b.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-75ZMG3QX.mjs";export{a as AppPromo_B,a as default};
|
package/dist/app-promo_c.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var h=(e,r)=>{for(var l in r)m(e,l,{get:r[l],enumerable:!0})},b=(e,r,l,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of v(r))!N.call(e,a)&&a!==l&&m(e,a,{get:()=>r[a],enumerable:!(n=w(r,a))||n.enumerable});return e};var y=e=>b(m({},"__esModule",{value:!0}),e);var F={};h(F,{AppPromo_C:()=>x,default:()=>x});module.exports=y(F);var p=require("@stackshift-ui/
|
|
1
|
+
"use strict";var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var h=(e,r)=>{for(var l in r)m(e,l,{get:r[l],enumerable:!0})},b=(e,r,l,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of v(r))!N.call(e,a)&&a!==l&&m(e,a,{get:()=>r[a],enumerable:!(n=w(r,a))||n.enumerable});return e};var y=e=>b(m({},"__esModule",{value:!0}),e);var F={};h(F,{AppPromo_C:()=>x,default:()=>x});module.exports=y(F);var p=require("@stackshift-ui/container"),i=require("@stackshift-ui/flex"),d=require("@stackshift-ui/heading"),g=require("@stackshift-ui/image"),f=require("@stackshift-ui/section"),o=require("@stackshift-ui/text"),t=require("react/jsx-runtime");function x({subtitle:e,title:r,description:l,features:n,images:a}){return(0,t.jsx)(f.Section,{className:"py-20 bg-background",children:(0,t.jsx)(p.Container,{maxWidth:1280,children:(0,t.jsxs)(i.Flex,{align:"center",wrap:!0,gap:8,children:[(0,t.jsx)(I,{subtitle:e,title:r,description:l,features:n}),(0,t.jsx)(P,{images:a})]})})})}function I({subtitle:e,title:r,description:l,features:n}){return(0,t.jsxs)("div",{className:"max-w-xl space-y-5",children:[e?(0,t.jsx)(o.Text,{weight:"bold",className:"text-sm md:text-lg lg:text-xl text-secondary",children:e}):null,r?(0,t.jsx)(d.Heading,{type:"h1",fontSize:"3xl",children:r}):null,l?(0,t.jsx)(o.Text,{muted:!0,className:"text-sm md:text-lg lg:text-xl",children:l}):null,(0,t.jsx)(C,{features:n})]})}function C({features:e}){return e?(0,t.jsx)("ul",{className:"mb-8",children:e.map((r,l)=>(0,t.jsxs)(i.Flex,{as:"li",align:"center",className:"mb-3",children:[(0,t.jsx)(k,{}),(0,t.jsx)(o.Text,{className:"text-sm md:text-lg lg:text-xl",weight:"bold",muted:!0,children:r})]},l))}):null}function P({images:e}){return e?(0,t.jsxs)(i.Flex,{align:"center",className:"w-full transform -rotate-12 lg:w-1/2",children:[(0,t.jsx)(s,{images:e,start:0,end:1}),(0,t.jsx)("div",{className:"w-full",children:e==null?void 0:e.slice(1,3).map((r,l)=>(0,t.jsx)(s,{images:[r],start:0,end:1},l))}),(0,t.jsx)(s,{images:e,start:3,end:4})]}):null}function s({images:e,start:r,end:l}){var n;return(n=e==null?void 0:e[r])!=null&&n.image?(0,t.jsx)("div",{className:"w-full",children:e.slice(r,l).map((a,u)=>{var c;return(0,t.jsx)(g.Image,{className:"object-cover",src:`${a.image}`,sizes:"100vw",width:500,height:850,alt:(c=a.alt)!=null?c:`appPromo-variantC-image-${u}`},u)})}):null}function k(){return(0,t.jsx)("svg",{className:"w-5 h-5 mr-2 text-primary-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}0&&(module.exports={AppPromo_C});
|
package/dist/app-promo_c.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-YISSMRJL.mjs";export{a as AppPromo_C,a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Container as w}from"@stackshift-ui/container";import{Flex as f}from"@stackshift-ui/flex";import{Heading as g}from"@stackshift-ui/heading";import{Image as x}from"@stackshift-ui/image";import{Section as h}from"@stackshift-ui/section";import{SwiperButton as p}from"@stackshift-ui/swiper-button";import{Text as u}from"@stackshift-ui/text";import c from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function b({subtitle:t,title:e,description:o,statistics:a,images:l}){let[n,m]=c.useState(0);return r(h,{className:"pt-16 overflow-hidden bg-background",children:r(w,{className:"relative text-center",maxWidth:1280,children:i(f,{justify:"between",className:"flex-col md:flex-row",children:[i("div",{className:"w-full mt-8 lg:w-1/2",children:[r(C,{subtitle:t,title:e,description:o}),r(v,{statistics:a})]}),r(f,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:r(k,{images:l,currentPosition:n,arrowLeftClick:()=>{l!=null&&l.length&&m(n!==0?n-1:n=l.length-1)},arrowRightClick:()=>{l!=null&&l.length&&(n!==l.length-1?m(n+1):m(n=0))}})})]})})})}function C({subtitle:t,title:e,description:o}){return i(c.Fragment,{children:[t?r(u,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,e?r(g,{type:"h1",fontSize:"3xl",className:"mt-3 text-center md:text-left",children:e}):null,o?r(u,{className:"mt-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:o}):null]})}function v({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:r(c.Fragment,{children:r(f,{wrap:!0,children:t==null?void 0:t.map((e,o)=>i("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[r(u,{muted:!0,className:"mb-3",children:e==null?void 0:e.label}),r("span",{className:"text-xl text-gray-500 font-bold",children:e==null?void 0:e.value})]},o))})})}function k({images:t,currentPosition:e,arrowLeftClick:o,arrowRightClick:a}){return t?r(c.Fragment,{children:t.length>1?r(s,{arrowLeftClick:o,arrowRightClick:a,children:r(d,{images:t,currentPosition:e})}):r(d,{images:t,currentPosition:e})}):null}function s({children:t,arrowLeftClick:e,arrowRightClick:o}){return i(c.Fragment,{children:[r(p,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:e}),t,r(p,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:o})]})}function d({images:t,currentPosition:e}){var o,a,l;return(o=t==null?void 0:t[e])!=null&&o.image?r("div",{className:"object-contain w-1/2 mr-2",children:r(x,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[e].image}`,sizes:"100vw",width:500,height:850,alt:(l=(a=t[e])==null?void 0:a.alt)!=null?l:`appPromo-variantB-image-${e}`})}):null}export{b as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u}from"./chunk-KQFO7OZP.mjs";import{Container as k}from"@stackshift-ui/container";import{Flex as s}from"@stackshift-ui/flex";import{Heading as C}from"@stackshift-ui/heading";import{Image as m}from"@stackshift-ui/image";import{Link as v}from"@stackshift-ui/link";import{Section as L}from"@stackshift-ui/section";import{SwiperButton as P}from"@stackshift-ui/swiper-button";import{Text as N}from"@stackshift-ui/text";import A,{useState as I}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function S({logo:t,subtitle:n,title:i,images:o=[]}){var a;let[e,l]=I(0),c=()=>{o!=null&&o.length&&(e!==o.length-1?l(e+1):l(e=0))},p=()=>{o!=null&&o.length&&l(e!==0?e-1:e=o.length-1)};return r(L,{className:"pt-16 overflow-hidden bg-background",children:f(k,{className:"relative text-center",maxWidth:448,children:[r(y,{logo:t}),r(R,{subtitle:n,title:i}),r(T,{images:o}),r(z,{image:o[e].image,alt:(a=o[e].alt)!=null?a:`appPromo-variantA-image-${e}`}),r(F,{arrowLeftClick:p,arrowRightClick:c})]})})}function y({logo:t}){var n;return t!=null&&t.image?r(v,{"aria-label":`Go to ${u(t)==="/"?"home page":u(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:u(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:r(m,{src:t==null?void 0:t.image,width:50,height:56,alt:(n=t==null?void 0:t.alt)!=null?n:"appPromo-logo"})}):null}function R({subtitle:t,title:n}){return f(A.Fragment,{children:[t?r(N,{className:"mb-3 text-secondary",children:t}):null,n?r(C,{type:"h1",fontSize:"3xl",className:"mb-8",children:n}):null]})}function d({src:t,alt:n,positionClass:i}){return t?r(m,{className:`absolute object-contain h-80 rounded-t-2xl ${i}`,src:t,sizes:"218px",width:218,height:320,alt:n}):null}function T({images:t}){var n,i,o,e,l,c,p,a,h,b,w,x;return f("div",{className:"hidden h-72 sm:block",children:[(n=t==null?void 0:t[0])!=null&&n.image?r(d,{src:(i=t==null?void 0:t[0])==null?void 0:i.image,alt:(e=(o=t==null?void 0:t[0])==null?void 0:o.alt)!=null?e:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(l=t==null?void 0:t[1])!=null&&l.image?r(d,{src:(c=t==null?void 0:t[1])==null?void 0:c.image,alt:(a=(p=t==null?void 0:t[1])==null?void 0:p.alt)!=null?a:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(h=t==null?void 0:t[2])!=null&&h.image?r(d,{src:(b=t==null?void 0:t[2])==null?void 0:b.image,alt:(x=(w=t==null?void 0:t[2])==null?void 0:w.alt)!=null?x:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function z({image:t,alt:n}){return t?r("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:r(m,{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:n})}):null}function F({arrowLeftClick:t,arrowRightClick:n}){return f(s,{justify:"between",className:"mb-16 sm:hidden",children:[r(P,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),r(P,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:n})]})}export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Container as p}from"@stackshift-ui/container";import{Flex as s}from"@stackshift-ui/flex";import{Heading as d}from"@stackshift-ui/heading";import{Image as g}from"@stackshift-ui/image";import{Section as f}from"@stackshift-ui/section";import{Text as m}from"@stackshift-ui/text";import{jsx as t,jsxs as o}from"react/jsx-runtime";function x({subtitle:e,title:r,description:l,features:a,images:n}){return t(f,{className:"py-20 bg-background",children:t(p,{maxWidth:1280,children:o(s,{align:"center",wrap:!0,gap:8,children:[t(w,{subtitle:e,title:r,description:l,features:a}),t(N,{images:n})]})})})}function w({subtitle:e,title:r,description:l,features:a}){return o("div",{className:"max-w-xl space-y-5",children:[e?t(m,{weight:"bold",className:"text-sm md:text-lg lg:text-xl text-secondary",children:e}):null,r?t(d,{type:"h1",fontSize:"3xl",children:r}):null,l?t(m,{muted:!0,className:"text-sm md:text-lg lg:text-xl",children:l}):null,t(v,{features:a})]})}function v({features:e}){return e?t("ul",{className:"mb-8",children:e.map((r,l)=>o(s,{as:"li",align:"center",className:"mb-3",children:[t(h,{}),t(m,{className:"text-sm md:text-lg lg:text-xl",weight:"bold",muted:!0,children:r})]},l))}):null}function N({images:e}){return e?o(s,{align:"center",className:"w-full transform -rotate-12 lg:w-1/2",children:[t(i,{images:e,start:0,end:1}),t("div",{className:"w-full",children:e==null?void 0:e.slice(1,3).map((r,l)=>t(i,{images:[r],start:0,end:1},l))}),t(i,{images:e,start:3,end:4})]}):null}function i({images:e,start:r,end:l}){var a;return(a=e==null?void 0:e[r])!=null&&a.image?t("div",{className:"w-full",children:e.slice(r,l).map((n,u)=>{var c;return t(g,{className:"object-cover",src:`${n.image}`,sizes:"100vw",width:500,height:850,alt:(c=n.alt)!=null?c:`appPromo-variantC-image-${u}`},u)})}):null}function h(){return t("svg",{className:"w-5 h-5 mr-2 text-primary-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:t("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}export{x as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var ut=Object.create;var f=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var x=(t,r)=>()=>(t&&(r=t(t=0)),r);var d=(t,r)=>{for(var e in r)f(t,e,{get:r[e],enumerable:!0})},G=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of xt(r))!wt.call(t,n)&&n!==e&&f(t,n,{get:()=>r[n],enumerable:!(i=ft(r,n))||i.enumerable});return t};var M=(t,r,e)=>(e=t!=null?ut(dt(t)):{},G(r||!t||!t.__esModule?f(e,"default",{value:t,enumerable:!0}):e,t)),ht=t=>G(f({},"__esModule",{value:!0}),t);var w,E=x(()=>{"use strict";w=t=>{var r,e,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(e=(r=t==null?void 0:t.internalLink)==null?void 0:r.toLowerCase())!=null&&e.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"}});var Y={};d(Y,{AppPromo_A:()=>N,default:()=>N});function N({logo:t,subtitle:r,title:e,images:i=[]}){var p;let[n,m]=(0,h.useState)(0),c=()=>{i!=null&&i.length&&(n!==i.length-1?m(n+1):m(n=0))},u=()=>{i!=null&&i.length&&m(n!==0?n-1:n=i.length-1)};return(0,a.jsx)(U.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,a.jsxs)(q.Container,{className:"relative text-center",maxWidth:448,children:[(0,a.jsx)(bt,{logo:t}),(0,a.jsx)(vt,{subtitle:r,title:e}),(0,a.jsx)(kt,{images:i}),(0,a.jsx)(Ct,{image:i[n].image,alt:(p=i[n].alt)!=null?p:`appPromo-variantA-image-${n}`}),(0,a.jsx)(gt,{arrowLeftClick:u,arrowRightClick:c})]})})}function bt({logo:t}){var r;return t!=null&&t.image?(0,a.jsx)(Q.Link,{"aria-label":`Go to ${w(t)==="/"?"home page":w(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:w(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(O.Image,{src:t==null?void 0:t.image,width:50,height:56,alt:(r=t==null?void 0:t.alt)!=null?r:"appPromo-logo"})}):null}function vt({subtitle:t,title:r}){return(0,a.jsxs)(h.default.Fragment,{children:[t?(0,a.jsx)(X.Text,{className:"mb-3 text-secondary",children:t}):null,r?(0,a.jsx)(K.Heading,{type:"h1",fontSize:"3xl",className:"mb-8",children:r}):null]})}function g({src:t,alt:r,positionClass:e}){return t?(0,a.jsx)("img",{className:`absolute object-contain h-80 rounded-t-2xl ${e}`,src:t,sizes:"218px",width:218,height:320,alt:r}):null}function kt({images:t}){var r,e,i,n,m,c;return(0,a.jsxs)("div",{className:"hidden h-72 sm:block",children:[(r=t==null?void 0:t[0])!=null&&r.image?(0,a.jsx)(g,{src:(e=t==null?void 0:t[0])==null?void 0:e.image,alt:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(i=t==null?void 0:t[1])!=null&&i.image?(0,a.jsx)(g,{src:(n=t==null?void 0:t[1])==null?void 0:n.image,alt:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(m=t==null?void 0:t[2])!=null&&m.image?(0,a.jsx)(g,{src:(c=t==null?void 0:t[2])==null?void 0:c.image,alt:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function Ct({image:t,alt:r}){return t?(0,a.jsx)("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:(0,a.jsx)("img",{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:r})}):null}function gt({arrowLeftClick:t,arrowRightClick:r}){return(0,a.jsxs)(J.Flex,{justify:"between",className:"mb-16 sm:hidden",children:[(0,a.jsx)(P.SwiperButton,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),(0,a.jsx)(P.SwiperButton,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:r})]})}var q,J,K,O,Q,U,P,X,h,a,L=x(()=>{"use strict";q=require("@stackshift-ui/container"),J=require("@stackshift-ui/flex"),K=require("@stackshift-ui/heading"),O=require("@stackshift-ui/image"),Q=require("@stackshift-ui/link"),U=require("@stackshift-ui/section"),P=require("@stackshift-ui/swiper-button"),X=require("@stackshift-ui/text"),h=M(require("react"));E();a=require("react/jsx-runtime")});var it={};d(it,{AppPromo_B:()=>S,default:()=>S});function S({subtitle:t,title:r,description:e,statistics:i,images:n}){let[m,c]=s.default.useState(0);return(0,o.jsx)(U.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,o.jsxs)(tt.Container,{className:"relative text-center",maxWidth:1280,children:[(0,o.jsxs)("div",{className:"w-full mt-8 lg:w-1/2",children:[(0,o.jsx)(Pt,{subtitle:t,title:r,description:e}),(0,o.jsx)(Nt,{statistics:i})]}),(0,o.jsx)(J.Flex,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:(0,o.jsx)(Lt,{images:n,currentPosition:m,arrowLeftClick:()=>{n!=null&&n.length&&c(m!==0?m-1:m=n.length-1)},arrowRightClick:()=>{n!=null&&n.length&&(m!==n.length-1?c(m+1):c(m=0))}})})]})})}function Pt({subtitle:t,title:r,description:e}){return(0,o.jsxs)(s.default.Fragment,{children:[t?(0,o.jsx)(X.Text,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,r?(0,o.jsx)(K.Heading,{type:"h1",fontSize:"3xl",className:"mt-3 text-center md:text-left",children:r}):null,e?(0,o.jsx)(X.Text,{className:"mt-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:e}):null]})}function Nt({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:(0,o.jsx)(s.default.Fragment,{children:(0,o.jsx)(J.Flex,{wrap:!0,children:t==null?void 0:t.map((r,e)=>(0,o.jsxs)("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[(0,o.jsx)(X.Text,{muted:!0,className:"mb-3",children:r==null?void 0:r.label}),(0,o.jsx)("span",{className:"text-xl text-gray-500 font-bold",children:r==null?void 0:r.value})]},e))})})}function Lt({images:t,currentPosition:r,arrowLeftClick:e,arrowRightClick:i}){return t?(0,o.jsx)(s.default.Fragment,{children:t.length>1?(0,o.jsx)(yt,{arrowLeftClick:e,arrowRightClick:i,children:(0,o.jsx)(Z,{images:t,currentPosition:r})}):(0,o.jsx)(Z,{images:t,currentPosition:r})}):null}function yt({children:t,arrowLeftClick:r,arrowRightClick:e}){return(0,o.jsxs)(s.default.Fragment,{children:[(0,o.jsx)(P.SwiperButton,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:r}),t,(0,o.jsx)(P.SwiperButton,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:e})]})}function Z({images:t,currentPosition:r}){var e,i,n;return(e=t==null?void 0:t[r])!=null&&e.image?(0,o.jsx)("div",{className:"object-contain w-1/2 mr-2",children:(0,o.jsx)(O.Image,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[r].image}`,sizes:"100vw",width:500,height:850,alt:(n=(i=t[r])==null?void 0:i.alt)!=null?n:`appPromo-variantB-image-${r}`})}):null}var tt,J,K,O,U,P,X,s,o,R=x(()=>{"use strict";tt=require("@stackshift-ui/container"),s=M(require("react")),o=require("react/jsx-runtime")});var ct={};d(ct,{AppPromo_C:()=>F,default:()=>F});function F({subtitle:t,title:r,description:e,features:i,images:n}){return(0,o.jsx)(U.Section,{className:"py-20 bg-background",children:(0,o.jsx)(mt.Container,{maxWidth:1280,children:(0,o.jsxs)(J.Flex,{align:"center",wrap:!0,gap:8,children:[(0,o.jsx)(It,{subtitle:t,title:r,description:e,features:i}),(0,o.jsx)(Rt,{images:n})]})})})}function It({subtitle:t,title:r,description:e,features:i}){return(0,o.jsxs)("div",{className:"max-w-xl space-P-5",children:[t?(0,o.jsx)(X.Text,{weight:"bold",className:"text-sm md:text-lg lg:text-xl text-secondary",children:t}):null,r?(0,o.jsx)(ot.Heading,{type:"h1",fontSize:"3xl",children:r}):null,e?(0,o.jsx)(X.Text,{muted:!0,className:"text-sm md:text-lg lg:text-xl",children:e}):null,(0,o.jsx)(St,{features:i})]})}function St({features:t}){return t?(0,o.jsx)("ul",{className:"mb-8",children:t.map((r,e)=>(0,o.jsxs)(J.Flex,{as:"li",align:"center",className:"mb-3",children:[(0,o.jsx)(At,{}),(0,o.jsx)(X.Text,{className:"text-sm md:text-lg lg:text-xl",weight:"bold",muted:!0,children:r})]},e))}):null}function Rt({images:t}){return t?(0,o.jsxs)(J.Flex,{align:"center",className:"w-full transform -rotate-12 lg:w-1/2",children:[(0,o.jsx)(A,{images:t,start:0,end:1}),(0,o.jsx)("div",{className:"w-full",children:t==null?void 0:t.slice(1,3).map((r,e)=>(0,o.jsx)(A,{images:[r],start:0,end:1},e))}),(0,o.jsx)(A,{images:t,start:3,end:4})]}):null}function A({images:t,start:r,end:e}){var i;return(i=t==null?void 0:t[r])!=null&&i.image?(0,o.jsx)("div",{className:"w-full",children:t.slice(r,e).map((n,m)=>{var c;return(0,o.jsx)(O.Image,{className:"object-cover",src:`${n.image}`,sizes:"100vw",width:500,height:850,alt:(c=n.alt)!=null?c:`appPromo-variantC-image-${m}`},m)})}):null}function At(){return(0,o.jsx)("svg",{className:"w-5 h-5 mr-2 text-primary-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}var ot,X,O,U,mt,J,o,T=x(()=>{"use strict";ot=require("@stackshift-ui/heading"),mt=require("@stackshift-ui/container")});var zt={};d(zt,{AppPromo:()=>pt,AppPromo_A:()=>N,AppPromo_B:()=>S,AppPromo_C:()=>F});module.exports=ht(zt);var C=require("react"),Ft={variant_a:(0,C.lazy)(()=>Promise.resolve().then(()=>(L(),Y))),variant_b:(0,C.lazy)(()=>Promise.resolve().then(()=>(R(),it))),variant_c:(0,C.lazy)(()=>Promise.resolve().then(()=>(T(),ct)))},Tt="AppPromo",pt=({data:t})=>{var n,m,c,u,p,z,_,$,B,H,j,V,D,W;let r=t==null?void 0:t.variant,e=r&&Ft[r],i={logo:(m=(n=t==null?void 0:t.variants)==null?void 0:n.logo)!=null?m:void 0,subtitle:(u=(c=t==null?void 0:t.variants)==null?void 0:c.subtitle)!=null?u:void 0,title:(z=(p=t==null?void 0:t.variants)==null?void 0:p.title)!=null?z:void 0,description:($=(_=t==null?void 0:t.variants)==null?void 0:_.description)!=null?$:void 0,statistics:(H=(B=t==null?void 0:t.variants)==null?void 0:B.stats)!=null?H:void 0,features:(V=(j=t==null?void 0:t.variants)==null?void 0:j.tags)!=null?V:void 0,images:(W=(D=t==null?void 0:t.variants)==null?void 0:D.images)!=null?W:void 0};return e?(0,o.jsx)(e,{...i}):null};pt.displayName=Tt;L();R();T();0&&(module.exports={AppPromo,AppPromo_A,AppPromo_B,AppPromo_C});
|
|
2
|
+
"use strict";var st=Object.create;var h=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var b=(t,r)=>()=>(t&&(r=t(t=0)),r);var v=(t,r)=>{for(var e in r)h(t,e,{get:r[e],enumerable:!0})},M=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of xt(r))!wt.call(t,n)&&n!==e&&h(t,n,{get:()=>r[n],enumerable:!(i=ft(r,n))||i.enumerable});return t};var E=(t,r,e)=>(e=t!=null?st(dt(t)):{},M(r||!t||!t.__esModule?h(e,"default",{value:t,enumerable:!0}):e,t)),ht=t=>M(h({},"__esModule",{value:!0}),t);var k,q=b(()=>{"use strict";k=t=>{var r,e,i;return t!=null&&t.internalLink&&(t==null?void 0:t.type)==="linkInternal"?(e=(r=t==null?void 0:t.internalLink)==null?void 0:r.toLowerCase())!=null&&e.includes("home")?"/":`/${t.internalLink}`:t!=null&&t.externalLink&&(t==null?void 0:t.type)==="linkExternal"&&(i=t==null?void 0:t.externalLink)!=null?i:"/"}});var Y={};v(Y,{AppPromo_A:()=>A,default:()=>A});function A({logo:t,subtitle:r,title:e,images:i=[]}){var p;let[n,m]=(0,P.useState)(0),c=()=>{i!=null&&i.length&&(n!==i.length-1?m(n+1):m(n=0))},u=()=>{i!=null&&i.length&&m(n!==0?n-1:n=i.length-1)};return(0,a.jsx)(U.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,a.jsxs)(J.Container,{className:"relative text-center",maxWidth:448,children:[(0,a.jsx)(bt,{logo:t}),(0,a.jsx)(vt,{subtitle:r,title:e}),(0,a.jsx)(kt,{images:i}),(0,a.jsx)(Ct,{image:i[n].image,alt:(p=i[n].alt)!=null?p:`appPromo-variantA-image-${n}`}),(0,a.jsx)(Pt,{arrowLeftClick:u,arrowRightClick:c})]})})}function bt({logo:t}){var r;return t!=null&&t.image?(0,a.jsx)(Q.Link,{"aria-label":`Go to ${k(t)==="/"?"home page":k(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:k(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(C.Image,{src:t==null?void 0:t.image,width:50,height:56,alt:(r=t==null?void 0:t.alt)!=null?r:"appPromo-logo"})}):null}function vt({subtitle:t,title:r}){return(0,a.jsxs)(P.default.Fragment,{children:[t?(0,a.jsx)(X.Text,{className:"mb-3 text-secondary",children:t}):null,r?(0,a.jsx)(O.Heading,{type:"h1",fontSize:"3xl",className:"mb-8",children:r}):null]})}function g({src:t,alt:r,positionClass:e}){return t?(0,a.jsx)(C.Image,{className:`absolute object-contain h-80 rounded-t-2xl ${e}`,src:t,sizes:"218px",width:218,height:320,alt:r}):null}function kt({images:t}){var r,e,i,n,m,c,u,p,f,x,d,w;return(0,a.jsxs)("div",{className:"hidden h-72 sm:block",children:[(r=t==null?void 0:t[0])!=null&&r.image?(0,a.jsx)(g,{src:(e=t==null?void 0:t[0])==null?void 0:e.image,alt:(n=(i=t==null?void 0:t[0])==null?void 0:i.alt)!=null?n:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(m=t==null?void 0:t[1])!=null&&m.image?(0,a.jsx)(g,{src:(c=t==null?void 0:t[1])==null?void 0:c.image,alt:(p=(u=t==null?void 0:t[1])==null?void 0:u.alt)!=null?p:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(f=t==null?void 0:t[2])!=null&&f.image?(0,a.jsx)(g,{src:(x=t==null?void 0:t[2])==null?void 0:x.image,alt:(w=(d=t==null?void 0:t[2])==null?void 0:d.alt)!=null?w:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function Ct({image:t,alt:r}){return t?(0,a.jsx)("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:(0,a.jsx)(C.Image,{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:r})}):null}function Pt({arrowLeftClick:t,arrowRightClick:r}){return(0,a.jsxs)(K.Flex,{justify:"between",className:"mb-16 sm:hidden",children:[(0,a.jsx)(R.SwiperButton,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),(0,a.jsx)(R.SwiperButton,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:r})]})}var J,K,O,C,Q,U,R,X,P,a,F=b(()=>{"use strict";J=require("@stackshift-ui/container"),K=require("@stackshift-ui/flex"),O=require("@stackshift-ui/heading"),C=require("@stackshift-ui/image"),Q=require("@stackshift-ui/link"),U=require("@stackshift-ui/section"),R=require("@stackshift-ui/swiper-button"),X=require("@stackshift-ui/text"),P=E(require("react"));q();a=require("react/jsx-runtime")});var it={};v(it,{AppPromo_B:()=>z,default:()=>z});function z({subtitle:t,title:r,description:e,statistics:i,images:n}){let[m,c]=s.default.useState(0);return(0,o.jsx)(U.Section,{className:"pt-16 overflow-hidden bg-background",children:(0,o.jsx)(tt.Container,{className:"relative text-center",maxWidth:1280,children:(0,o.jsxs)(K.Flex,{justify:"between",className:"flex-col md:flex-row",children:[(0,o.jsxs)("div",{className:"w-full U-8 lg:w-1/2",children:[(0,o.jsx)(Nt,{subtitle:t,title:r,description:e}),(0,o.jsx)(Lt,{statistics:i})]}),(0,o.jsx)(K.Flex,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:(0,o.jsx)(yt,{images:n,currentPosition:m,arrowLeftClick:()=>{n!=null&&n.length&&c(m!==0?m-1:m=n.length-1)},arrowRightClick:()=>{n!=null&&n.length&&(m!==n.length-1?c(m+1):c(m=0))}})})]})})})}function Nt({subtitle:t,title:r,description:e}){return(0,o.jsxs)(s.default.Fragment,{children:[t?(0,o.jsx)(X.Text,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,r?(0,o.jsx)(O.Heading,{type:"h1",fontSize:"3xl",className:"U-3 text-center md:text-left",children:r}):null,e?(0,o.jsx)(X.Text,{className:"U-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:e}):null]})}function Lt({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:(0,o.jsx)(s.default.Fragment,{children:(0,o.jsx)(K.Flex,{wrap:!0,children:t==null?void 0:t.map((r,e)=>(0,o.jsxs)("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[(0,o.jsx)(X.Text,{muted:!0,className:"mb-3",children:r==null?void 0:r.label}),(0,o.jsx)("span",{className:"text-xl text-gray-500 font-bold",children:r==null?void 0:r.value})]},e))})})}function yt({images:t,currentPosition:r,arrowLeftClick:e,arrowRightClick:i}){return t?(0,o.jsx)(s.default.Fragment,{children:t.length>1?(0,o.jsx)(It,{arrowLeftClick:e,arrowRightClick:i,children:(0,o.jsx)(Z,{images:t,currentPosition:r})}):(0,o.jsx)(Z,{images:t,currentPosition:r})}):null}function It({children:t,arrowLeftClick:r,arrowRightClick:e}){return(0,o.jsxs)(s.default.Fragment,{children:[(0,o.jsx)(R.SwiperButton,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:r}),t,(0,o.jsx)(R.SwiperButton,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:e})]})}function Z({images:t,currentPosition:r}){var e,i,n;return(e=t==null?void 0:t[r])!=null&&e.image?(0,o.jsx)("div",{className:"object-contain w-1/2 mr-2",children:(0,o.jsx)(C.Image,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[r].image}`,sizes:"100vw",width:500,height:850,alt:(n=(i=t[r])==null?void 0:i.alt)!=null?n:`appPromo-variantB-image-${r}`})}):null}var tt,K,O,C,U,R,X,s,o,_=b(()=>{"use strict";tt=require("@stackshift-ui/container"),s=E(require("react")),o=require("react/jsx-runtime")});var ct={};v(ct,{AppPromo_C:()=>B,default:()=>B});function B({subtitle:t,title:r,description:e,features:i,images:n}){return(0,o.jsx)(U.Section,{className:"py-20 bg-background",children:(0,o.jsx)(ot.Container,{maxWidth:1280,children:(0,o.jsxs)(K.Flex,{align:"center",wrap:!0,gap:8,children:[(0,o.jsx)(St,{subtitle:t,title:r,description:e,features:i}),(0,o.jsx)(Rt,{images:n})]})})})}function St({subtitle:t,title:r,description:e,features:i}){return(0,o.jsxs)("div",{className:"max-w-xl space-X-5",children:[t?(0,o.jsx)(X.Text,{weight:"bold",className:"text-sm md:text-lg lg:text-xl text-secondary",children:t}):null,r?(0,o.jsx)(O.Heading,{type:"h1",fontSize:"3xl",children:r}):null,e?(0,o.jsx)(X.Text,{muted:!0,className:"text-sm md:text-lg lg:text-xl",children:e}):null,(0,o.jsx)(gt,{features:i})]})}function gt({features:t}){return t?(0,o.jsx)("ul",{className:"mb-8",children:t.map((r,e)=>(0,o.jsxs)(K.Flex,{as:"li",align:"center",className:"mb-3",children:[(0,o.jsx)(At,{}),(0,o.jsx)(X.Text,{className:"text-sm md:text-lg lg:text-xl",weight:"bold",muted:!0,children:r})]},e))}):null}function Rt({images:t}){return t?(0,o.jsxs)(K.Flex,{align:"center",className:"w-full transform -rotate-12 lg:w-1/2",children:[(0,o.jsx)($,{images:t,start:0,end:1}),(0,o.jsx)("div",{className:"w-full",children:t==null?void 0:t.slice(1,3).map((r,e)=>(0,o.jsx)($,{images:[r],start:0,end:1},e))}),(0,o.jsx)($,{images:t,start:3,end:4})]}):null}function $({images:t,start:r,end:e}){var i;return(i=t==null?void 0:t[r])!=null&&i.image?(0,o.jsx)("div",{className:"w-full",children:t.slice(r,e).map((n,m)=>{var c;return(0,o.jsx)(C.Image,{className:"object-cover",src:`${n.image}`,sizes:"100vw",width:500,height:850,alt:(c=n.alt)!=null?c:`appPromo-variantC-image-${m}`},m)})}):null}function At(){return(0,o.jsx)("svg",{className:"w-5 h-5 mr-2 text-primary-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}var ot,K,O,C,U,X,o,H=b(()=>{"use strict";ot=require("@stackshift-ui/container")});var zt={};v(zt,{AppPromo:()=>pt,AppPromo_A:()=>A,AppPromo_B:()=>z,AppPromo_C:()=>B});module.exports=ht(zt);var S=require("react"),Ft={variant_a:(0,S.lazy)(()=>Promise.resolve().then(()=>(F(),Y))),variant_b:(0,S.lazy)(()=>Promise.resolve().then(()=>(_(),it))),variant_c:(0,S.lazy)(()=>Promise.resolve().then(()=>(H(),ct)))},Tt="AppPromo",pt=({data:t})=>{var n,m,c,u,p,f,x,d,w,j,V,D,W,G;let r=t==null?void 0:t.variant,e=r&&Ft[r],i={logo:(m=(n=t==null?void 0:t.variants)==null?void 0:n.logo)!=null?m:void 0,subtitle:(u=(c=t==null?void 0:t.variants)==null?void 0:c.subtitle)!=null?u:void 0,title:(f=(p=t==null?void 0:t.variants)==null?void 0:p.title)!=null?f:void 0,description:(d=(x=t==null?void 0:t.variants)==null?void 0:x.description)!=null?d:void 0,statistics:(j=(w=t==null?void 0:t.variants)==null?void 0:w.stats)!=null?j:void 0,features:(D=(V=t==null?void 0:t.variants)==null?void 0:V.tags)!=null?D:void 0,images:(G=(W=t==null?void 0:t.variants)==null?void 0:W.images)!=null?G:void 0};return e?(0,o.jsx)(e,{...i}):null};pt.displayName=Tt;F();_();H();0&&(module.exports={AppPromo,AppPromo_A,AppPromo_B,AppPromo_C});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as t}from"./chunk-
|
|
2
|
+
"use strict";import{a as t}from"./chunk-WA4PS4TA.mjs";import{a as o}from"./chunk-VYDG5YDD.mjs";import{a as r}from"./chunk-75ZMG3QX.mjs";import{a as e}from"./chunk-YISSMRJL.mjs";import"./chunk-KQFO7OZP.mjs";export{t as AppPromo,o as AppPromo_A,r as AppPromo_B,e as AppPromo_C};
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/app-promo",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.4-beta.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"module": "./dist/index.mjs",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
11
|
-
"dist/**"
|
|
11
|
+
"dist/**",
|
|
12
|
+
"src"
|
|
12
13
|
],
|
|
13
14
|
"author": "WebriQ <info@webriq.com>",
|
|
14
15
|
"devDependencies": {
|
|
@@ -33,15 +34,15 @@
|
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@stackshift-ui/scripts": "6.0.2",
|
|
36
|
-
"@stackshift-ui/
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/link": "6.0.
|
|
42
|
-
"@stackshift-ui/
|
|
43
|
-
"@stackshift-ui/
|
|
44
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/system": "6.0.3",
|
|
38
|
+
"@stackshift-ui/swiper-button": "6.0.3",
|
|
39
|
+
"@stackshift-ui/heading": "6.0.3",
|
|
40
|
+
"@stackshift-ui/image": "6.0.3",
|
|
41
|
+
"@stackshift-ui/section": "6.0.3",
|
|
42
|
+
"@stackshift-ui/link": "6.0.3",
|
|
43
|
+
"@stackshift-ui/text": "6.0.3",
|
|
44
|
+
"@stackshift-ui/flex": "6.0.3",
|
|
45
|
+
"@stackshift-ui/container": "6.0.3"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"@types/react": "16.8 - 19",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cleanup, render, screen } from "@testing-library/react";
|
|
2
|
+
import { afterEach, describe, test } from "vitest";
|
|
3
|
+
import { AppPromo } from "./app-promo";
|
|
4
|
+
|
|
5
|
+
describe.concurrent("app-promo", () => {
|
|
6
|
+
afterEach(cleanup);
|
|
7
|
+
|
|
8
|
+
test.skip("Dummy test - test if renders without errors", ({ expect }) => {
|
|
9
|
+
const clx = "my-class";
|
|
10
|
+
render(<AppPromo />);
|
|
11
|
+
expect(screen.getByTestId("{ kebabCase name }}").classList).toContain(clx);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { lazy } from "react";
|
|
2
|
+
import { SectionsProps, Logo, StatItems, Images } from "./types";
|
|
3
|
+
|
|
4
|
+
const Variants = {
|
|
5
|
+
variant_a: lazy(() => import("./app-promo_a")),
|
|
6
|
+
variant_b: lazy(() => import("./app-promo_b")),
|
|
7
|
+
variant_c: lazy(() => import("./app-promo_c")),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export interface AppPromoProps {
|
|
11
|
+
logo?: Logo;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
statistics?: StatItems[];
|
|
16
|
+
features?: string[];
|
|
17
|
+
images?: Images[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const displayName = "AppPromo";
|
|
21
|
+
|
|
22
|
+
export const AppPromo: React.FC<SectionsProps> = ({ data }) => {
|
|
23
|
+
const variant = data?.variant;
|
|
24
|
+
const Variant = variant && Variants[variant as keyof typeof Variants];
|
|
25
|
+
|
|
26
|
+
const props = {
|
|
27
|
+
logo: data?.variants?.logo ?? undefined,
|
|
28
|
+
subtitle: data?.variants?.subtitle ?? undefined,
|
|
29
|
+
title: data?.variants?.title ?? undefined,
|
|
30
|
+
description: data?.variants?.description ?? undefined,
|
|
31
|
+
statistics: data?.variants?.stats ?? undefined,
|
|
32
|
+
features: data?.variants?.tags ?? undefined,
|
|
33
|
+
images: data?.variants?.images ?? undefined,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return Variant ? <Variant {...props} /> : null;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
AppPromo.displayName = displayName;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Container } from "@stackshift-ui/container";
|
|
2
|
+
import { Flex } from "@stackshift-ui/flex";
|
|
3
|
+
import { Heading } from "@stackshift-ui/heading";
|
|
4
|
+
import { Image } from "@stackshift-ui/image";
|
|
5
|
+
import { Link } from "@stackshift-ui/link";
|
|
6
|
+
import { Section } from "@stackshift-ui/section";
|
|
7
|
+
import { SwiperButton } from "@stackshift-ui/swiper-button";
|
|
8
|
+
import { Text } from "@stackshift-ui/text";
|
|
9
|
+
import React, { useState } from "react";
|
|
10
|
+
import { AppPromoProps } from ".";
|
|
11
|
+
import { logoLink } from "./helper";
|
|
12
|
+
import { Images, Logo } from "./types";
|
|
13
|
+
|
|
14
|
+
export default function AppPromo_A({ logo, subtitle, title, images = [] }: AppPromoProps) {
|
|
15
|
+
//for image carousel
|
|
16
|
+
let [currentPosition, setCurrentPosition] = useState(0); // Initial image index value
|
|
17
|
+
|
|
18
|
+
const arrowRightClick = () => {
|
|
19
|
+
if (images?.length) {
|
|
20
|
+
currentPosition !== images.length - 1 // Check index length
|
|
21
|
+
? setCurrentPosition(currentPosition + 1)
|
|
22
|
+
: setCurrentPosition((currentPosition = 0));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const arrowLeftClick = () => {
|
|
27
|
+
if (images?.length) {
|
|
28
|
+
currentPosition !== 0 // Check index length
|
|
29
|
+
? setCurrentPosition(currentPosition - 1)
|
|
30
|
+
: setCurrentPosition((currentPosition = images.length - 1));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Section className="pt-16 overflow-hidden bg-background">
|
|
36
|
+
<Container className="relative text-center" maxWidth={448}>
|
|
37
|
+
<LogoSection logo={logo} />
|
|
38
|
+
<SubtitleAndTitleText subtitle={subtitle} title={title} />
|
|
39
|
+
<PromoImagesGroup images={images} />
|
|
40
|
+
|
|
41
|
+
{/* mobile image view less than 640px */}
|
|
42
|
+
<MobileImageView
|
|
43
|
+
image={images[currentPosition].image}
|
|
44
|
+
alt={images[currentPosition].alt ?? `appPromo-variantA-image-${currentPosition}`}
|
|
45
|
+
/>
|
|
46
|
+
<SwiperButtons arrowLeftClick={arrowLeftClick} arrowRightClick={arrowRightClick} />
|
|
47
|
+
</Container>
|
|
48
|
+
</Section>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function LogoSection({ logo }: { logo?: Logo }) {
|
|
53
|
+
if (!logo?.image) return null;
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Link
|
|
57
|
+
aria-label={`Go to ${logoLink(logo) === "/" ? "home page" : logoLink(logo)}`}
|
|
58
|
+
className="inline-block p-5 mb-8 bg-white rounded-lg"
|
|
59
|
+
href={logoLink(logo)}
|
|
60
|
+
target={logo?.linkTarget}
|
|
61
|
+
rel={logo?.linkTarget === "_blank" ? "noopener noreferrer" : ""}>
|
|
62
|
+
<Image src={logo?.image} width={50} height={56} alt={logo?.alt ?? "appPromo-logo"} />
|
|
63
|
+
</Link>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function SubtitleAndTitleText({ subtitle, title }: { subtitle?: string; title?: string }) {
|
|
68
|
+
return (
|
|
69
|
+
<React.Fragment>
|
|
70
|
+
{subtitle ? <Text className="mb-3 text-secondary">{subtitle}</Text> : null}
|
|
71
|
+
{title ? (
|
|
72
|
+
<Heading type="h1" fontSize="3xl" className="mb-8">
|
|
73
|
+
{title}
|
|
74
|
+
</Heading>
|
|
75
|
+
) : null}
|
|
76
|
+
</React.Fragment>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface PromoImageProps {
|
|
81
|
+
src: any;
|
|
82
|
+
alt: string;
|
|
83
|
+
positionClass: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function PromoImage({ src, alt, positionClass }: PromoImageProps) {
|
|
87
|
+
if (!src) return null;
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<Image
|
|
91
|
+
className={`absolute object-contain h-80 rounded-t-2xl ${positionClass}`}
|
|
92
|
+
src={src}
|
|
93
|
+
sizes="218px"
|
|
94
|
+
width={218}
|
|
95
|
+
height={320}
|
|
96
|
+
alt={alt}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function PromoImagesGroup({ images }: { images: Images[] }) {
|
|
102
|
+
return (
|
|
103
|
+
<div className="hidden h-72 sm:block">
|
|
104
|
+
{images?.[0]?.image ? (
|
|
105
|
+
<PromoImage
|
|
106
|
+
src={images?.[0]?.image}
|
|
107
|
+
alt={images?.[0]?.alt ?? "appPromo-variantA-image-1"}
|
|
108
|
+
positionClass="bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"
|
|
109
|
+
/>
|
|
110
|
+
) : null}
|
|
111
|
+
{images?.[1]?.image ? (
|
|
112
|
+
<PromoImage
|
|
113
|
+
src={images?.[1]?.image}
|
|
114
|
+
alt={images?.[1]?.alt ?? "appPromo-variantA-image-2"}
|
|
115
|
+
positionClass="bottom-0 left-0 -mb-24"
|
|
116
|
+
/>
|
|
117
|
+
) : null}
|
|
118
|
+
{images?.[2]?.image ? (
|
|
119
|
+
<PromoImage
|
|
120
|
+
src={images?.[2]?.image}
|
|
121
|
+
alt={images?.[2]?.alt ?? "appPromo-variantA-image-3"}
|
|
122
|
+
positionClass="bottom-0 right-0 -mb-24"
|
|
123
|
+
/>
|
|
124
|
+
) : null}
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function MobileImageView({ image, alt }: { image: any; alt: string }) {
|
|
130
|
+
if (!image) return null;
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<div className="object-contain w-1/2 mx-auto sm:hidden">
|
|
134
|
+
<Image
|
|
135
|
+
className="object-contain w-full h-full"
|
|
136
|
+
src={image}
|
|
137
|
+
sizes="(min-width: 520px) 224px, 45vw"
|
|
138
|
+
width={500}
|
|
139
|
+
height={850}
|
|
140
|
+
alt={alt}
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function SwiperButtons({
|
|
147
|
+
arrowLeftClick,
|
|
148
|
+
arrowRightClick,
|
|
149
|
+
}: {
|
|
150
|
+
arrowLeftClick: () => void;
|
|
151
|
+
arrowRightClick: () => void;
|
|
152
|
+
}) {
|
|
153
|
+
return (
|
|
154
|
+
<Flex justify="between" className="mb-16 sm:hidden">
|
|
155
|
+
<SwiperButton
|
|
156
|
+
type="left"
|
|
157
|
+
ariaLabel="Left Arrow button"
|
|
158
|
+
className="order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1"
|
|
159
|
+
onClick={arrowLeftClick}
|
|
160
|
+
/>
|
|
161
|
+
|
|
162
|
+
<SwiperButton
|
|
163
|
+
type="right"
|
|
164
|
+
ariaLabel="Right Arrow button"
|
|
165
|
+
className="order-2"
|
|
166
|
+
onClick={arrowRightClick}
|
|
167
|
+
/>
|
|
168
|
+
</Flex>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { AppPromo_A };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { Container } from "@stackshift-ui/container";
|
|
2
|
+
import { Flex } from "@stackshift-ui/flex";
|
|
3
|
+
import { Heading } from "@stackshift-ui/heading";
|
|
4
|
+
import { Image } from "@stackshift-ui/image";
|
|
5
|
+
import { Section } from "@stackshift-ui/section";
|
|
6
|
+
import { SwiperButton } from "@stackshift-ui/swiper-button";
|
|
7
|
+
import { Text } from "@stackshift-ui/text";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { AppPromoProps } from ".";
|
|
10
|
+
import { Images, StatItems } from "./types";
|
|
11
|
+
|
|
12
|
+
export default function AppPromo_B({
|
|
13
|
+
subtitle,
|
|
14
|
+
title,
|
|
15
|
+
description,
|
|
16
|
+
statistics,
|
|
17
|
+
images,
|
|
18
|
+
}: AppPromoProps) {
|
|
19
|
+
//for image carousel
|
|
20
|
+
let [currentPosition, setCurrentPosition] = React.useState(0); // Initial image index value
|
|
21
|
+
|
|
22
|
+
const arrowRightClick = () => {
|
|
23
|
+
if (images?.length) {
|
|
24
|
+
currentPosition !== images.length - 1 // Check index length
|
|
25
|
+
? setCurrentPosition(currentPosition + 1)
|
|
26
|
+
: setCurrentPosition((currentPosition = 0));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const arrowLeftClick = () => {
|
|
31
|
+
if (images?.length) {
|
|
32
|
+
currentPosition !== 0 // Check index length
|
|
33
|
+
? setCurrentPosition(currentPosition - 1)
|
|
34
|
+
: setCurrentPosition((currentPosition = images.length - 1));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Section className="pt-16 overflow-hidden bg-background">
|
|
40
|
+
<Container className="relative text-center" maxWidth={1280}>
|
|
41
|
+
<Flex justify="between" className="flex-col md:flex-row">
|
|
42
|
+
<div className="w-full mt-8 lg:w-1/2">
|
|
43
|
+
<SubtitleTitleDescriptionText
|
|
44
|
+
subtitle={subtitle}
|
|
45
|
+
title={title}
|
|
46
|
+
description={description}
|
|
47
|
+
/>
|
|
48
|
+
<StatisticsData statistics={statistics} />
|
|
49
|
+
</div>
|
|
50
|
+
<Flex align="center" justify="center" gap={8} className="w-full 2xl:w-1/2">
|
|
51
|
+
<ImageCarousel
|
|
52
|
+
images={images}
|
|
53
|
+
currentPosition={currentPosition}
|
|
54
|
+
arrowLeftClick={arrowLeftClick}
|
|
55
|
+
arrowRightClick={arrowRightClick}
|
|
56
|
+
/>
|
|
57
|
+
</Flex>
|
|
58
|
+
</Flex>
|
|
59
|
+
</Container>
|
|
60
|
+
</Section>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function SubtitleTitleDescriptionText({
|
|
65
|
+
subtitle,
|
|
66
|
+
title,
|
|
67
|
+
description,
|
|
68
|
+
}: {
|
|
69
|
+
subtitle?: string;
|
|
70
|
+
title?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
}) {
|
|
73
|
+
return (
|
|
74
|
+
<React.Fragment>
|
|
75
|
+
{subtitle ? (
|
|
76
|
+
<Text weight="bold" className="text-center md:text-left text-secondary">
|
|
77
|
+
{subtitle}
|
|
78
|
+
</Text>
|
|
79
|
+
) : null}
|
|
80
|
+
{title ? (
|
|
81
|
+
<Heading type="h1" fontSize="3xl" className="mt-3 text-center md:text-left">
|
|
82
|
+
{title}
|
|
83
|
+
</Heading>
|
|
84
|
+
) : null}
|
|
85
|
+
{description ? (
|
|
86
|
+
<Text className="mt-3 mb-10 leading-loose text-center break-words md:text-left" muted>
|
|
87
|
+
{description}
|
|
88
|
+
</Text>
|
|
89
|
+
) : null}
|
|
90
|
+
</React.Fragment>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function StatisticsData({ statistics }: { statistics?: StatItems[] }) {
|
|
95
|
+
if (!statistics || statistics?.length <= 0) return null;
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<React.Fragment>
|
|
99
|
+
<Flex wrap>
|
|
100
|
+
{statistics?.map((items, index) => (
|
|
101
|
+
<div className="w-full mb-8 text-center md:text-left lg:w-1/2" key={index}>
|
|
102
|
+
<Text muted className="mb-3">
|
|
103
|
+
{items?.label}
|
|
104
|
+
</Text>
|
|
105
|
+
<span className="text-xl text-gray-500 font-bold">{items?.value}</span>
|
|
106
|
+
</div>
|
|
107
|
+
))}
|
|
108
|
+
</Flex>
|
|
109
|
+
</React.Fragment>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
interface ImageCarouselProps {
|
|
114
|
+
images?: Images[];
|
|
115
|
+
currentPosition: number;
|
|
116
|
+
arrowLeftClick: () => void;
|
|
117
|
+
arrowRightClick: () => void;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function ImageCarousel({
|
|
121
|
+
images,
|
|
122
|
+
currentPosition,
|
|
123
|
+
arrowLeftClick,
|
|
124
|
+
arrowRightClick,
|
|
125
|
+
}: ImageCarouselProps) {
|
|
126
|
+
if (!images) return null;
|
|
127
|
+
return (
|
|
128
|
+
<React.Fragment>
|
|
129
|
+
{images.length > 1 ? (
|
|
130
|
+
<SwiperControls arrowLeftClick={arrowLeftClick} arrowRightClick={arrowRightClick}>
|
|
131
|
+
<ImagesSection images={images} currentPosition={currentPosition} />
|
|
132
|
+
</SwiperControls>
|
|
133
|
+
) : (
|
|
134
|
+
<ImagesSection images={images} currentPosition={currentPosition} />
|
|
135
|
+
)}
|
|
136
|
+
</React.Fragment>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function SwiperControls({
|
|
141
|
+
children,
|
|
142
|
+
arrowLeftClick,
|
|
143
|
+
arrowRightClick,
|
|
144
|
+
}: {
|
|
145
|
+
children: React.ReactNode;
|
|
146
|
+
arrowLeftClick: () => void;
|
|
147
|
+
arrowRightClick: () => void;
|
|
148
|
+
}) {
|
|
149
|
+
return (
|
|
150
|
+
<React.Fragment>
|
|
151
|
+
<SwiperButton
|
|
152
|
+
variant="variant_a"
|
|
153
|
+
type="left"
|
|
154
|
+
ariaLabel="Left Arrow button"
|
|
155
|
+
onClick={arrowLeftClick}
|
|
156
|
+
/>
|
|
157
|
+
{children}
|
|
158
|
+
<SwiperButton
|
|
159
|
+
variant="variant_a"
|
|
160
|
+
type="right"
|
|
161
|
+
ariaLabel="Right Arrow button"
|
|
162
|
+
onClick={arrowRightClick}
|
|
163
|
+
/>
|
|
164
|
+
</React.Fragment>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function ImagesSection({
|
|
169
|
+
images,
|
|
170
|
+
currentPosition,
|
|
171
|
+
}: {
|
|
172
|
+
images?: Images[];
|
|
173
|
+
currentPosition: number;
|
|
174
|
+
}) {
|
|
175
|
+
if (!images?.[currentPosition]?.image) return null;
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<div className="object-contain w-1/2 mr-2">
|
|
179
|
+
<Image
|
|
180
|
+
className="object-cover w-full h-full mx-auto mb-8 xl:mb-0"
|
|
181
|
+
src={`${images[currentPosition].image}`}
|
|
182
|
+
sizes="100vw"
|
|
183
|
+
width={500}
|
|
184
|
+
height={850}
|
|
185
|
+
alt={images[currentPosition]?.alt ?? `appPromo-variantB-image-${currentPosition}`}
|
|
186
|
+
/>
|
|
187
|
+
</div>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export { AppPromo_B };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Container } from "@stackshift-ui/container";
|
|
2
|
+
import { Flex } from "@stackshift-ui/flex";
|
|
3
|
+
import { Heading } from "@stackshift-ui/heading";
|
|
4
|
+
import { Image } from "@stackshift-ui/image";
|
|
5
|
+
import { Section } from "@stackshift-ui/section";
|
|
6
|
+
import { Text } from "@stackshift-ui/text";
|
|
7
|
+
import { AppPromoProps } from ".";
|
|
8
|
+
import { Images } from "./types";
|
|
9
|
+
|
|
10
|
+
export default function AppPromo_C({
|
|
11
|
+
subtitle,
|
|
12
|
+
title,
|
|
13
|
+
description,
|
|
14
|
+
features,
|
|
15
|
+
images,
|
|
16
|
+
}: AppPromoProps) {
|
|
17
|
+
return (
|
|
18
|
+
<Section className="py-20 bg-background">
|
|
19
|
+
<Container maxWidth={1280}>
|
|
20
|
+
<Flex align="center" wrap gap={8}>
|
|
21
|
+
<TextSection
|
|
22
|
+
subtitle={subtitle}
|
|
23
|
+
title={title}
|
|
24
|
+
description={description}
|
|
25
|
+
features={features}
|
|
26
|
+
/>
|
|
27
|
+
<ImageSection images={images} />
|
|
28
|
+
</Flex>
|
|
29
|
+
</Container>
|
|
30
|
+
</Section>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function TextSection({
|
|
35
|
+
subtitle,
|
|
36
|
+
title,
|
|
37
|
+
description,
|
|
38
|
+
features,
|
|
39
|
+
}: {
|
|
40
|
+
subtitle?: string;
|
|
41
|
+
title?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
features?: string[];
|
|
44
|
+
}) {
|
|
45
|
+
return (
|
|
46
|
+
<div className="max-w-xl space-y-5">
|
|
47
|
+
{subtitle ? (
|
|
48
|
+
<Text weight="bold" className="text-sm md:text-lg lg:text-xl text-secondary">
|
|
49
|
+
{subtitle}
|
|
50
|
+
</Text>
|
|
51
|
+
) : null}
|
|
52
|
+
{title ? (
|
|
53
|
+
<Heading type="h1" fontSize="3xl">
|
|
54
|
+
{title}
|
|
55
|
+
</Heading>
|
|
56
|
+
) : null}
|
|
57
|
+
{description ? (
|
|
58
|
+
<Text muted className="text-sm md:text-lg lg:text-xl">
|
|
59
|
+
{description}
|
|
60
|
+
</Text>
|
|
61
|
+
) : null}
|
|
62
|
+
<FeatureList features={features} />
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function FeatureList({ features }: { features?: string[] }) {
|
|
68
|
+
if (!features) return null;
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<ul className="mb-8">
|
|
72
|
+
{features.map((feature, index) => (
|
|
73
|
+
<Flex as="li" align="center" className="mb-3" key={index}>
|
|
74
|
+
<CheckIcon />
|
|
75
|
+
<Text className="text-sm md:text-lg lg:text-xl" weight="bold" muted>
|
|
76
|
+
{feature}
|
|
77
|
+
</Text>
|
|
78
|
+
</Flex>
|
|
79
|
+
))}
|
|
80
|
+
</ul>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function ImageSection({ images }: { images?: Images[] }) {
|
|
85
|
+
if (!images) return null;
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Flex align="center" className="w-full transform -rotate-12 lg:w-1/2">
|
|
89
|
+
<ImageDisplay images={images} start={0} end={1} />
|
|
90
|
+
<div className="w-full">
|
|
91
|
+
{images
|
|
92
|
+
?.slice(1, 3)
|
|
93
|
+
.map((img, index) => <ImageDisplay images={[img]} start={0} end={1} key={index} />)}
|
|
94
|
+
</div>
|
|
95
|
+
<ImageDisplay images={images} start={3} end={4} />
|
|
96
|
+
</Flex>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function ImageDisplay({ images, start, end }: { images?: Images[]; start: number; end: number }) {
|
|
101
|
+
if (!images?.[start]?.image) return null;
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<div className="w-full">
|
|
105
|
+
{images.slice(start, end).map((image, index) => (
|
|
106
|
+
<Image
|
|
107
|
+
key={index}
|
|
108
|
+
className="object-cover"
|
|
109
|
+
src={`${image.image}`}
|
|
110
|
+
sizes="100vw"
|
|
111
|
+
width={500}
|
|
112
|
+
height={850}
|
|
113
|
+
alt={image.alt ?? `appPromo-variantC-image-${index}`}
|
|
114
|
+
/>
|
|
115
|
+
))}
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Check Icon Component
|
|
121
|
+
function CheckIcon() {
|
|
122
|
+
return (
|
|
123
|
+
<svg
|
|
124
|
+
className="w-5 h-5 mr-2 text-primary-foreground"
|
|
125
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
126
|
+
viewBox="0 0 20 20"
|
|
127
|
+
fill="currentColor">
|
|
128
|
+
<path
|
|
129
|
+
fillRule="evenodd"
|
|
130
|
+
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
|
|
131
|
+
clipRule="evenodd"
|
|
132
|
+
/>
|
|
133
|
+
</svg>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { AppPromo_C };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Logo } from "../types";
|
|
2
|
+
|
|
3
|
+
export const logoLink = (logo: Logo) => {
|
|
4
|
+
if (logo?.internalLink && logo?.type === "linkInternal") {
|
|
5
|
+
if (logo?.internalLink?.toLowerCase()?.includes("home")) {
|
|
6
|
+
return "/";
|
|
7
|
+
}
|
|
8
|
+
return `/${logo.internalLink}`;
|
|
9
|
+
} else if (logo?.externalLink && logo?.type === "linkExternal") {
|
|
10
|
+
return logo?.externalLink ?? "/";
|
|
11
|
+
} else {
|
|
12
|
+
return "/";
|
|
13
|
+
}
|
|
14
|
+
};
|
package/src/index.ts
ADDED
package/src/types.ts
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
export type StyleVariants<T extends string> = Record<T, string>;
|
|
2
|
+
|
|
3
|
+
export type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
|
|
4
|
+
export interface MainImage {
|
|
5
|
+
image: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface LabeledRoute extends ConditionalLink {
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
linkTarget?: string;
|
|
13
|
+
linkType?: string;
|
|
14
|
+
_type?: string;
|
|
15
|
+
linkInternal?: any;
|
|
16
|
+
}
|
|
17
|
+
export interface ConditionalLink {
|
|
18
|
+
type?: string;
|
|
19
|
+
internalLink?: string | null;
|
|
20
|
+
externalLink?: string | null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface StatItems {
|
|
24
|
+
label?: string;
|
|
25
|
+
mainImage?: MainImage;
|
|
26
|
+
value?: string;
|
|
27
|
+
_key?: string;
|
|
28
|
+
_type?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Logo extends ConditionalLink {
|
|
32
|
+
alt?: string;
|
|
33
|
+
linkTarget?: string;
|
|
34
|
+
image?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Images {
|
|
38
|
+
image?: string;
|
|
39
|
+
_key?: string;
|
|
40
|
+
_type?: string;
|
|
41
|
+
alt?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ContactDetails {
|
|
45
|
+
addressInfo?: string;
|
|
46
|
+
contactInfo?: string;
|
|
47
|
+
emailInfo?: string;
|
|
48
|
+
_key?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SocialLink {
|
|
52
|
+
socialMedia?: string | null;
|
|
53
|
+
socialMediaLink?: string | null;
|
|
54
|
+
_key?: string | null;
|
|
55
|
+
_type?: string | null;
|
|
56
|
+
socialMediaIcon?: {
|
|
57
|
+
alt?: string;
|
|
58
|
+
image?: string;
|
|
59
|
+
} | null;
|
|
60
|
+
socialMediaPlatform?: string | null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface LabeledRouteWithKey extends LabeledRoute {
|
|
64
|
+
_key?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ArrayOfImageTitleAndText {
|
|
68
|
+
mainImage?: {
|
|
69
|
+
alt?: string;
|
|
70
|
+
image?: string;
|
|
71
|
+
};
|
|
72
|
+
plainText?: string;
|
|
73
|
+
title?: string;
|
|
74
|
+
_key?: string;
|
|
75
|
+
_type?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface FeaturedItem {
|
|
79
|
+
description?: string;
|
|
80
|
+
mainImage?: MainImage;
|
|
81
|
+
title?: string;
|
|
82
|
+
subtitle?: string;
|
|
83
|
+
_key?: string;
|
|
84
|
+
_type?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface ArrayOfTitleAndText {
|
|
88
|
+
_key?: string;
|
|
89
|
+
plainText?: string;
|
|
90
|
+
title?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface BlogPost extends SanityBody {
|
|
94
|
+
authors?: Author[] | null;
|
|
95
|
+
body?: any;
|
|
96
|
+
categories?: Category[] | null;
|
|
97
|
+
excerpt?: string | null;
|
|
98
|
+
link?: string | null;
|
|
99
|
+
mainImage?: string | null;
|
|
100
|
+
publishedAt?: string;
|
|
101
|
+
seo?: Seo | null;
|
|
102
|
+
slug?: SanitySlug | null;
|
|
103
|
+
title?: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface Seo {
|
|
107
|
+
_type?: string;
|
|
108
|
+
seoTitle?: string;
|
|
109
|
+
seoDescription?: string;
|
|
110
|
+
seoImage?: string;
|
|
111
|
+
seoKeywords?: string;
|
|
112
|
+
seoSynonyms?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface SanitySlug {
|
|
116
|
+
current?: string;
|
|
117
|
+
_type?: "slug";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface SanityBody {
|
|
121
|
+
_createdAt?: string;
|
|
122
|
+
_id?: string;
|
|
123
|
+
_rev?: string;
|
|
124
|
+
_type?: string;
|
|
125
|
+
_updatedAt?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface Author extends SanityBody {
|
|
129
|
+
link?: string | null;
|
|
130
|
+
bio?: string | null;
|
|
131
|
+
name?: string | null;
|
|
132
|
+
slug?: SanitySlug | null;
|
|
133
|
+
image?: string | null;
|
|
134
|
+
profile?: {
|
|
135
|
+
alt: string;
|
|
136
|
+
image: string;
|
|
137
|
+
} | null;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface Category extends SanityBody {
|
|
141
|
+
title?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface Form {
|
|
145
|
+
id?: string | null;
|
|
146
|
+
buttonLabel?: string | null;
|
|
147
|
+
name?: string | null;
|
|
148
|
+
subtitle?: string | null;
|
|
149
|
+
fields?: FormFields[] | null;
|
|
150
|
+
thankYouPage?: ThankYouPage | null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface FormFields {
|
|
154
|
+
name?: string;
|
|
155
|
+
placeholder?: string;
|
|
156
|
+
pricingType?: string;
|
|
157
|
+
type?: FormTypes;
|
|
158
|
+
_key?: string;
|
|
159
|
+
_type?: string;
|
|
160
|
+
isRequired?: boolean;
|
|
161
|
+
label?: string;
|
|
162
|
+
items?: string[];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type FormTypes =
|
|
166
|
+
| "inputText"
|
|
167
|
+
| "inputEmail"
|
|
168
|
+
| "inputPassword"
|
|
169
|
+
| "inputNumber"
|
|
170
|
+
| "textarea"
|
|
171
|
+
| "inputFile"
|
|
172
|
+
| "inputRadio"
|
|
173
|
+
| "inputCheckbox"
|
|
174
|
+
| "inputSelect";
|
|
175
|
+
|
|
176
|
+
export interface ThankYouPage {
|
|
177
|
+
externalLink?: string | null;
|
|
178
|
+
internalLink?: string | null;
|
|
179
|
+
linkInternal?: any;
|
|
180
|
+
linkTarget?: string;
|
|
181
|
+
linkType?: string;
|
|
182
|
+
type?: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
//Used on different sections
|
|
186
|
+
export interface SectionsProps {
|
|
187
|
+
template?: Template;
|
|
188
|
+
data?: Sections;
|
|
189
|
+
variant?: string | null | undefined;
|
|
190
|
+
schema?: Variants;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface Sections extends SanityBody {
|
|
194
|
+
label?: string;
|
|
195
|
+
variant?: string;
|
|
196
|
+
variants?: Variants;
|
|
197
|
+
_key?: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
//*EDIT THIS SECTION WHEN CREATING/UPDATING SCHEMAS ON STUDIO */
|
|
201
|
+
export interface Variants {
|
|
202
|
+
template?: Template;
|
|
203
|
+
multipleMenus?: any;
|
|
204
|
+
arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
|
|
205
|
+
logo?: Logo | null;
|
|
206
|
+
primaryButton?: LabeledRoute | null;
|
|
207
|
+
secondaryButton?: LabeledRoute | null;
|
|
208
|
+
routes?: LabeledRouteWithKey[] | null;
|
|
209
|
+
menu?: LabeledRouteWithKey[] | null;
|
|
210
|
+
plans?: Plans[] | null;
|
|
211
|
+
formLinks?: LabeledRouteWithKey[] | null;
|
|
212
|
+
portfolios?: Portfolios[] | null;
|
|
213
|
+
portfoliosWithCategories?: PortfoliosWithCategories[] | null;
|
|
214
|
+
length?: number;
|
|
215
|
+
signInLink?: LabeledRoute | null;
|
|
216
|
+
signinLink?: LabeledRoute | null;
|
|
217
|
+
tags?: string[] | null;
|
|
218
|
+
posts?: BlogPost[] | null;
|
|
219
|
+
blogsPerPage?: number | null;
|
|
220
|
+
form?: Form | null;
|
|
221
|
+
collections?: Collection | null;
|
|
222
|
+
products?: CollectionProduct | null;
|
|
223
|
+
allProducts?: Collection[];
|
|
224
|
+
subtitle?: string | null;
|
|
225
|
+
caption?: string | null;
|
|
226
|
+
title?: string | null;
|
|
227
|
+
plainText?: string | null;
|
|
228
|
+
contactDescription?: string | null;
|
|
229
|
+
officeInformation?: string | null;
|
|
230
|
+
contactEmail?: string | null;
|
|
231
|
+
contactNumber?: string | null;
|
|
232
|
+
socialLinks?: SocialLink[] | null;
|
|
233
|
+
block?: any;
|
|
234
|
+
heading?: string | null;
|
|
235
|
+
acceptButtonLabel?: string | null;
|
|
236
|
+
declineButtonLabel?: string | null;
|
|
237
|
+
faqsWithCategories?: FaqsWithCategory[] | null;
|
|
238
|
+
faqs?: AskedQuestion[] | null;
|
|
239
|
+
arrayOfImageTitleAndText?: ArrayOfImageTitleAndText[] | null;
|
|
240
|
+
description?: string | null;
|
|
241
|
+
featuredItems?: FeaturedItem[] | null;
|
|
242
|
+
images?: Images[] | null;
|
|
243
|
+
contactDetails?: ContactDetails[] | null;
|
|
244
|
+
copyright?: string | null;
|
|
245
|
+
mainImage?: MainImage | null;
|
|
246
|
+
youtubeLink?: string | null;
|
|
247
|
+
banner?: any;
|
|
248
|
+
stats?: StatItems[] | null;
|
|
249
|
+
teams?: Team[] | null;
|
|
250
|
+
testimonials?: Testimonial[] | null;
|
|
251
|
+
selectStripeAccount?: string;
|
|
252
|
+
annualBilling?: string;
|
|
253
|
+
monthlyBilling?: string;
|
|
254
|
+
productDetails?: ProductDetail[];
|
|
255
|
+
btnLabel?: string;
|
|
256
|
+
selectAccount?: string;
|
|
257
|
+
hashtags?: string[];
|
|
258
|
+
numberOfPosts?: number;
|
|
259
|
+
text?: string;
|
|
260
|
+
button?: LabeledRoute;
|
|
261
|
+
features?: string[];
|
|
262
|
+
config?: {
|
|
263
|
+
enableAnalytics: boolean;
|
|
264
|
+
cookiePolicy?: {
|
|
265
|
+
siteName: string;
|
|
266
|
+
cookiePolicyPage: Reference;
|
|
267
|
+
};
|
|
268
|
+
consentModalPosition?: string;
|
|
269
|
+
};
|
|
270
|
+
contactLink?: LabeledRoute;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface Template {
|
|
274
|
+
bg?: string;
|
|
275
|
+
color?: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export type Plans = {
|
|
279
|
+
_key?: string | null;
|
|
280
|
+
_type?: "planItems" | null;
|
|
281
|
+
checkoutButtonName?: string | null;
|
|
282
|
+
description?: string | null;
|
|
283
|
+
monthlyPrice?: string | null;
|
|
284
|
+
planType?: string | null;
|
|
285
|
+
yearlyPrice?: string | null;
|
|
286
|
+
planIncludes?: string[] | null;
|
|
287
|
+
primaryButton?: LabeledRoute | null;
|
|
288
|
+
} & Record<string, string>;
|
|
289
|
+
|
|
290
|
+
export interface Portfolios {
|
|
291
|
+
dateAdded?: string | null;
|
|
292
|
+
mainImage?: {
|
|
293
|
+
image?: string | null;
|
|
294
|
+
alt?: string | null;
|
|
295
|
+
} | null;
|
|
296
|
+
primaryButton?: LabeledRoute | null;
|
|
297
|
+
title?: string | null;
|
|
298
|
+
_key?: string | null;
|
|
299
|
+
_type?: string | null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface PortfoliosWithCategories {
|
|
303
|
+
category?: string | null;
|
|
304
|
+
content?: Content[] | null;
|
|
305
|
+
primaryButton?: LabeledRoute | null;
|
|
306
|
+
_key?: string | null;
|
|
307
|
+
_type?: string | null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface Content extends Portfolios {
|
|
311
|
+
description?: string | null;
|
|
312
|
+
subtitle?: string | null;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface Collection extends SanityBody {
|
|
316
|
+
collectionInfoVariant?: {
|
|
317
|
+
variant?: string;
|
|
318
|
+
} | null;
|
|
319
|
+
name?: string | null;
|
|
320
|
+
products?: CollectionProduct[] | null;
|
|
321
|
+
sections?: any; //todo
|
|
322
|
+
seo?: Seo | null;
|
|
323
|
+
slug?: SanitySlug | null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface CollectionProduct extends SanityBody {
|
|
327
|
+
compareToPrice?: number | null;
|
|
328
|
+
description?: string | null;
|
|
329
|
+
ecwidProductId?: number | null;
|
|
330
|
+
name?: string | null;
|
|
331
|
+
price?: number | null;
|
|
332
|
+
productInfo?: ProductInfo | null;
|
|
333
|
+
productInfoVariant?: {
|
|
334
|
+
variant?: string;
|
|
335
|
+
} | null;
|
|
336
|
+
sections?: any; //todo
|
|
337
|
+
seo?: Seo | null;
|
|
338
|
+
slug?: SanitySlug | null;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
//TODO, RECHECK PRODUCT INFO DATA FROM SANITY
|
|
342
|
+
interface ProductInfo {
|
|
343
|
+
btnLabel?: string | null;
|
|
344
|
+
images?: ProductInfoImage[] | null;
|
|
345
|
+
productDetails?: ProductDetail[] | null;
|
|
346
|
+
socialLinks?: SocialLink[] | null;
|
|
347
|
+
subtitle?: string | null;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
//TODO, RECHECK PRODUCT INFO DATA FROM SANITY
|
|
351
|
+
export interface ProductDetail {
|
|
352
|
+
blockContent?: any;
|
|
353
|
+
contentType?: string;
|
|
354
|
+
tabName?: string;
|
|
355
|
+
_key?: string;
|
|
356
|
+
[key: string]: any;
|
|
357
|
+
}
|
|
358
|
+
interface ProductInfoImage {
|
|
359
|
+
alt?: string | null;
|
|
360
|
+
_key: string;
|
|
361
|
+
_type: string;
|
|
362
|
+
image?: string | null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export interface FaqsWithCategory {
|
|
366
|
+
askedQuestions?: AskedQuestion[] | null;
|
|
367
|
+
category?: string | null;
|
|
368
|
+
_key?: string;
|
|
369
|
+
_type?: string;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface AskedQuestion {
|
|
373
|
+
answer?: string | null;
|
|
374
|
+
question?: string | null;
|
|
375
|
+
hidden?: boolean;
|
|
376
|
+
_key?: string;
|
|
377
|
+
_type?: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export interface Team {
|
|
381
|
+
jobTitle?: string;
|
|
382
|
+
mainImage?: MainImage;
|
|
383
|
+
name?: string;
|
|
384
|
+
plainText?: string;
|
|
385
|
+
_key?: string;
|
|
386
|
+
_type?: string;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export interface Testimonial {
|
|
390
|
+
jobTitle?: string;
|
|
391
|
+
mainImage?: MainImage;
|
|
392
|
+
name?: string;
|
|
393
|
+
rating?: string;
|
|
394
|
+
testimony?: string;
|
|
395
|
+
_key?: string;
|
|
396
|
+
_type?: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export declare interface Reference {
|
|
400
|
+
_type: string;
|
|
401
|
+
_ref: string;
|
|
402
|
+
_key?: string;
|
|
403
|
+
_weak?: boolean;
|
|
404
|
+
_strengthenOnPublish?: {
|
|
405
|
+
type: string;
|
|
406
|
+
weak?: boolean;
|
|
407
|
+
template?: {
|
|
408
|
+
id: string;
|
|
409
|
+
params: Record<string, string | number | boolean>;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
}
|
package/dist/chunk-HEASXD32.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-KQFO7OZP.mjs";import{Container as h}from"@stackshift-ui/container";import{Flex as s}from"@stackshift-ui/flex";import{Heading as b}from"@stackshift-ui/heading";import{Image as w}from"@stackshift-ui/image";import{Link as x}from"@stackshift-ui/link";import{Section as P}from"@stackshift-ui/section";import{SwiperButton as f}from"@stackshift-ui/swiper-button";import{Text as k}from"@stackshift-ui/text";import C,{useState as v}from"react";import{jsx as r,jsxs as m}from"react/jsx-runtime";function L({logo:t,subtitle:n,title:a,images:e=[]}){var u;let[o,i]=v(0),l=()=>{e!=null&&e.length&&(o!==e.length-1?i(o+1):i(o=0))},d=()=>{e!=null&&e.length&&i(o!==0?o-1:o=e.length-1)};return r(P,{className:"pt-16 overflow-hidden bg-background",children:m(h,{className:"relative text-center",maxWidth:448,children:[r(N,{logo:t}),r(A,{subtitle:n,title:a}),r(I,{images:e}),r(S,{image:e[o].image,alt:(u=e[o].alt)!=null?u:`appPromo-variantA-image-${o}`}),r(y,{arrowLeftClick:d,arrowRightClick:l})]})})}function N({logo:t}){var n;return t!=null&&t.image?r(x,{"aria-label":`Go to ${c(t)==="/"?"home page":c(t)}`,className:"inline-block p-5 mb-8 bg-white rounded-lg",href:c(t),target:t==null?void 0:t.linkTarget,rel:(t==null?void 0:t.linkTarget)==="_blank"?"noopener noreferrer":"",children:r(w,{src:t==null?void 0:t.image,width:50,height:56,alt:(n=t==null?void 0:t.alt)!=null?n:"appPromo-logo"})}):null}function A({subtitle:t,title:n}){return m(C.Fragment,{children:[t?r(k,{className:"mb-3 text-secondary",children:t}):null,n?r(b,{type:"h1",fontSize:"3xl",className:"mb-8",children:n}):null]})}function p({src:t,alt:n,positionClass:a}){return t?r("img",{className:`absolute object-contain h-80 rounded-t-2xl ${a}`,src:t,sizes:"218px",width:218,height:320,alt:n}):null}function I({images:t}){var n,a,e,o,i,l;return m("div",{className:"hidden h-72 sm:block",children:[(n=t==null?void 0:t[0])!=null&&n.image?r(p,{src:(a=t==null?void 0:t[0])==null?void 0:a.image,alt:"appPromo-variantA-image-1",positionClass:"bottom-0 z-20 -mb-10 transform -translate-x-1/2 left-1/2"}):null,(e=t==null?void 0:t[1])!=null&&e.image?r(p,{src:(o=t==null?void 0:t[1])==null?void 0:o.image,alt:"appPromo-variantA-image-2",positionClass:"bottom-0 left-0 -mb-24"}):null,(i=t==null?void 0:t[2])!=null&&i.image?r(p,{src:(l=t==null?void 0:t[2])==null?void 0:l.image,alt:"appPromo-variantA-image-3",positionClass:"bottom-0 right-0 -mb-24"}):null]})}function S({image:t,alt:n}){return t?r("div",{className:"object-contain w-1/2 mx-auto sm:hidden",children:r("img",{className:"object-contain w-full h-full",src:t,sizes:"(min-width: 520px) 224px, 45vw",width:500,height:850,alt:n})}):null}function y({arrowLeftClick:t,arrowRightClick:n}){return m(s,{justify:"between",className:"mb-16 sm:hidden",children:[r(f,{type:"left",ariaLabel:"Left Arrow button",className:"order-0 md:order-0 lg:order-0 xl:order-1 2xl:order-1",onClick:t}),r(f,{type:"right",ariaLabel:"Right Arrow button",className:"order-2",onClick:n})]})}export{L as a};
|
package/dist/chunk-UHCXH5CS.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Container as g}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Heading as w}from"@stackshift-ui/heading";import{Image as x}from"@stackshift-ui/image";import{Section as h}from"@stackshift-ui/section";import{SwiperButton as f}from"@stackshift-ui/swiper-button";import{Text as u}from"@stackshift-ui/text";import c from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function C({subtitle:t,title:e,description:o,statistics:a,images:n}){let[l,m]=c.useState(0);return r(h,{className:"pt-16 overflow-hidden bg-background",children:i(g,{className:"relative text-center",maxWidth:1280,children:[i("div",{className:"w-full mt-8 lg:w-1/2",children:[r(b,{subtitle:t,title:e,description:o}),r(v,{statistics:a})]}),r(d,{align:"center",justify:"center",gap:8,className:"w-full 2xl:w-1/2",children:r(k,{images:n,currentPosition:l,arrowLeftClick:()=>{n!=null&&n.length&&m(l!==0?l-1:l=n.length-1)},arrowRightClick:()=>{n!=null&&n.length&&(l!==n.length-1?m(l+1):m(l=0))}})})]})})}function b({subtitle:t,title:e,description:o}){return i(c.Fragment,{children:[t?r(u,{weight:"bold",className:"text-center md:text-left text-secondary",children:t}):null,e?r(w,{type:"h1",fontSize:"3xl",className:"mt-3 text-center md:text-left",children:e}):null,o?r(u,{className:"mt-3 mb-10 leading-loose text-center break-words md:text-left",muted:!0,children:o}):null]})}function v({statistics:t}){return!t||(t==null?void 0:t.length)<=0?null:r(c.Fragment,{children:r(d,{wrap:!0,children:t==null?void 0:t.map((e,o)=>i("div",{className:"w-full mb-8 text-center md:text-left lg:w-1/2",children:[r(u,{muted:!0,className:"mb-3",children:e==null?void 0:e.label}),r("span",{className:"text-xl text-gray-500 font-bold",children:e==null?void 0:e.value})]},o))})})}function k({images:t,currentPosition:e,arrowLeftClick:o,arrowRightClick:a}){return t?r(c.Fragment,{children:t.length>1?r(R,{arrowLeftClick:o,arrowRightClick:a,children:r(p,{images:t,currentPosition:e})}):r(p,{images:t,currentPosition:e})}):null}function R({children:t,arrowLeftClick:e,arrowRightClick:o}){return i(c.Fragment,{children:[r(f,{variant:"variant_a",type:"left",ariaLabel:"Left Arrow button",onClick:e}),t,r(f,{variant:"variant_a",type:"right",ariaLabel:"Right Arrow button",onClick:o})]})}function p({images:t,currentPosition:e}){var o,a,n;return(o=t==null?void 0:t[e])!=null&&o.image?r("div",{className:"object-contain w-1/2 mr-2",children:r(x,{className:"object-cover w-full h-full mx-auto mb-8 xl:mb-0",src:`${t[e].image}`,sizes:"100vw",width:500,height:850,alt:(n=(a=t[e])==null?void 0:a.alt)!=null?n:`appPromo-variantB-image-${e}`})}):null}export{C as a};
|
|
File without changes
|