@stackshift-ui/header 6.0.15 → 6.1.0-alpha.1
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/chunk-E3ZU2IYJ.mjs +1 -0
- package/dist/chunk-G7FVEHHV.mjs +1 -0
- package/dist/chunk-GFZNPSBY.mjs +1 -0
- package/dist/chunk-W2QPS3BW.mjs +1 -0
- package/dist/header.d.ts +9 -1
- package/dist/header.js +1 -1
- package/dist/header.mjs +1 -1
- package/dist/header_f.d.ts +3 -0
- package/dist/header_f.js +1 -0
- package/dist/header_f.mjs +1 -0
- package/dist/header_g.d.ts +3 -0
- package/dist/header_g.js +1 -0
- package/dist/header_g.mjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types.d.ts +41 -1
- package/dist/utils/portableText/customBlockStyle.d.ts +2 -0
- package/dist/utils/portableText/customBlockStyle.js +1 -0
- package/dist/utils/portableText/customBlockStyle.mjs +1 -0
- package/dist/utils/portableText.d.ts +0 -0
- package/dist/utils/portableText.js +1 -0
- package/package.json +14 -10
- package/src/header.tsx +28 -1
- package/src/header_f.tsx +210 -0
- package/src/header_g.tsx +131 -0
- package/src/index.ts +2 -0
- package/src/types.ts +40 -1
- package/src/utils/portableText/customBlockStyle.tsx +91 -0
- package/src/utils/portableText.tsx +0 -0
- package/dist/chunk-H67LWHVN.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Button as x}from"@stackshift-ui/button";import{Flex as v}from"@stackshift-ui/flex";import{Heading as p}from"@stackshift-ui/heading";import{Section as u}from"@stackshift-ui/section";import{SwiperPagination as g}from"@stackshift-ui/swiper-pagination";import{Text as w}from"@stackshift-ui/text";import{useEffect as N,useState as k}from"react";import{Fragment as S,jsx as e,jsxs as n}from"react/jsx-runtime";function I({images:a,title:r,description:f,primaryButton:l,secondaryButton:t,position:i="center"}){if(!(a!=null&&a.length))return null;let[m,b]=k(0),o=a[m];N(()=>{let c=setInterval(()=>{b(s=>(s+1)%a.length)},5e3);return()=>clearInterval(c)},[a.length]);let d=c=>{b(c)},h=()=>{switch(i){case"left":return"items-start text-left";case"right":return"items-end text-right";default:return"items-center text-center"}};return e(u,{children:n("div",{className:"relative w-full h-[80vh] overflow-hidden",children:[o.video?e("video",{className:"absolute inset-0 w-full h-full object-cover",src:o.video,autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):e("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${o.image})`}}),e("div",{className:"absolute inset-0 bg-black bg-opacity-50 z-0"}),e("div",{className:`relative z-10 flex p-8 justify-${i==="right"?"end":i} items-center h-full`,children:n("div",{className:`max-w-[600px] flex flex-col justify-center ${h()} px-4`,children:[e(p,{className:"text-white uppercase mb-10",children:r!=null&&r.includes("Introducing")?n(S,{children:[e("span",{className:"md:text-3xl text-2xl",children:r.split(" ").slice(0,1).join(" ")}),e("br",{}),e("span",{children:r.split(" ").slice(1).join(" ")})]}):r}),f&&e(w,{className:"text-white mb-10",children:f}),n(v,{justify:i==="center"?"center":i==="right"?"end":"start",direction:"row",align:"center",wrap:!0,gap:4,children:[(l==null?void 0:l.label)&&e(x,{as:"link",link:l,ariaLabel:l==null?void 0:l.ariaLabel,variant:"solid",className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-primary transition-all duration-500 ease-in-out",children:l.label}),(t==null?void 0:t.label)&&e(x,{as:"link",link:t,variant:"solid",ariaLabel:t==null?void 0:t.ariaLabel,className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-secondary transition-all duration-500 ease-in-out",children:t.label})]})]})}),e("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 z-20 flex gap-2",children:a.map((c,s)=>e(g,{colorScheme:"white",isActive:s===m,onClick:()=>d(s),ariaLabel:`Go to slide ${s+1}`},s))})]})})}export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lazy as n}from"react";import{jsx as E}from"react/jsx-runtime";var w={variant_a:n(()=>import("./header_a.mjs")),variant_b:n(()=>import("./header_b.mjs")),variant_c:n(()=>import("./header_c.mjs")),variant_d:n(()=>import("./header_d.mjs")),variant_e:n(()=>import("./header_e.mjs")),variant_f:n(()=>import("./header_f.mjs")),variant_g:n(()=>import("./header_g.mjs"))},A="Header",D=({data:i})=>{var s,o,t,u,m,p,l,f,g,v,c,b,y,P,h,L,B,k,I,S,_,F,H,W,R,O,V,x,K,M,N,T,z,C;let e=i==null?void 0:i.variant,r=e&&w[e],q={mainImage:(o=(s=i==null?void 0:i.variants)==null?void 0:s.mainImage)!=null?o:void 0,images:(u=(t=i==null?void 0:i.variants)==null?void 0:t.images)!=null?u:void 0,title:(p=(m=i==null?void 0:i.variants)==null?void 0:m.title)!=null?p:void 0,subtitle:(f=(l=i==null?void 0:i.variants)==null?void 0:l.subtitle)!=null?f:void 0,description:(v=(g=i==null?void 0:i.variants)==null?void 0:g.description)!=null?v:void 0,primaryButton:(b=(c=i==null?void 0:i.variants)==null?void 0:c.primaryButton)!=null?b:void 0,secondaryButton:(P=(y=i==null?void 0:i.variants)==null?void 0:y.secondaryButton)!=null?P:void 0,videoLink:(L=(h=i==null?void 0:i.variants)==null?void 0:h.youtubeLink)!=null?L:void 0,formLinks:(k=(B=i==null?void 0:i.variants)==null?void 0:B.formLinks)!=null?k:void 0,form:(S=(I=i==null?void 0:i.variants)==null?void 0:I.form)!=null?S:void 0,spacing:(F=(_=i==null?void 0:i.variants)==null?void 0:_.spacing)!=null?F:void 0,isOrdered:(W=(H=i==null?void 0:i.variants)==null?void 0:H.isOrdered)!=null?W:void 0,startingPosition:(O=(R=i==null?void 0:i.variants)==null?void 0:R.startingPosition)!=null?O:void 0,headerSections:(x=(V=i==null?void 0:i.variants)==null?void 0:V.headerSections)!=null?x:void 0,subtitlePosition:(M=(K=i==null?void 0:i.variants)==null?void 0:K.subtitlePosition)!=null?M:void 0,isFullWidth:(T=(N=i==null?void 0:i.variants)==null?void 0:N.isFullWidth)!=null?T:void 0,position:(C=(z=i==null?void 0:i.variants)==null?void 0:z.position)!=null?C:void 0};return r?E(r,{...q}):null};D.displayName=A;export{D as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-W2QPS3BW.mjs";import{PortableText as H}from"@portabletext/react";import{Button as w}from"@stackshift-ui/button";import{Flex as u}from"@stackshift-ui/flex";import{Heading as y}from"@stackshift-ui/heading";import{Image as v}from"@stackshift-ui/image";import{Section as T}from"@stackshift-ui/section";import{Text as s}from"@stackshift-ui/text";import{LiaLongArrowAltRightSolid as B}from"react-icons/lia";import{jsx as l,jsxs as o}from"react/jsx-runtime";var $={lg:"min-h-[200px] sm:min-h-[400px] md:min-h-[600px] lg:min-h-[800px] xl:min-h-[1150px]",md:"min-h-[200px] sm:min-h-[400px] md:min-h-[500px] lg:min-h-[700px]",sm:"min-h-[200px] sm:min-h-[400px] md:min-h-[500px]"};function I({title:t,mainImage:i,subtitle:m,subtitlePosition:n,headerSections:p,isFullWidth:g,spacing:f,isOrdered:N,startingPosition:k}){return l(T,{className:`relative pb-14 bg-white ${n==="top"&&"mt-[32px]"}`,children:o("div",{style:{marginBottom:`${f}px`},className:`w-full mx-auto ${g?"":"max-w-[1548px] px-4"}`,children:[(t||m)&&l(j,{title:t,subtitle:m,subtitlePosition:n,mainImage:i}),l(u,{className:"flex-col",style:{gap:`${f}px`},children:p==null?void 0:p.map((x,c)=>{let b=k==="left"?c%2===0:c%2!==0;return x.isImageLeft=b,x.isFullWidth=g,x.index=c+1,x.isOrdered=N,l(C,{header:x,isImageLeft:b},x._key)})})]})})}var j=({title:t,subtitle:i,subtitlePosition:m,mainImage:n})=>o(u,{direction:"col",justify:"center",align:"center",gap:3,className:"mb-16",children:[m==="top"&&i&&l(s,{className:"font-label tracking-[2.1px]",children:i}),t&&l(s,{className:"text-2xl text-center sm:text-4xl font-normal font-heading-kb tracking-[6px] uppercase border-b border-black",children:t}),n&&l("div",{className:"relative h-80 max-h-[82px] w-full",children:l(v,{src:n.image,alt:n.alt||"",className:"object-contain object-center"})}),m==="bottom"&&i?l(s,{className:"font-label tracking-[2.1px]",children:i}):!m&&l(s,{className:"font-label tracking-[2.1px]",children:i})]}),L=({image:t,height:i})=>l("div",{className:`relative w-full ${i?$[i]:""}`,style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),S=({header:t})=>{var i;return l("div",{className:"px-10 sm:px-20 md:px-30 lg:px-40 py-10",children:o("div",{className:`w-full max-w-[665px] h-full flex flex-col justify-center items-${t==null?void 0:t.alignment} gap-20`,children:[((t==null?void 0:t.title)||(t==null?void 0:t.subtitle)||(t==null?void 0:t.imageTitle))&&l(F,{header:t}),(t==null?void 0:t.description)&&l(s,{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${t!=null&&t.isFullWidth?"lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`,children:t==null?void 0:t.description}),(t==null?void 0:t.columnContent)&&l(H,{value:t==null?void 0:t.columnContent,components:a({className:`${t!=null&&t.isFullWidth?"lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`})}),((i=t==null?void 0:t.primaryButton)==null?void 0:i.label)&&l(A,{header:t})]})})},F=({header:t})=>o("div",{children:[(t==null?void 0:t.isOrdered)&&l("div",{className:"border border-black w-fit text-center pb-2 pt-1 px-4 lg:px-6 mb-8",children:l(s,{className:"font-normal font-heading-kb text-6xl min-w-[40px] lg:text-[82px] lg:min-w-[45px]",children:t==null?void 0:t.index})}),o("div",{className:`text-${t==null?void 0:t.alignment}`,children:[(t==null?void 0:t.subtitle)&&l(s,{className:"text-sm font-label tracking-[2px] mb-2",children:t==null?void 0:t.subtitle}),(t==null?void 0:t.title)&&l(y,{className:`text-2xl sm:text-4xl lg:text-[40px] font-normal font-heading-kb uppercase tracking-[6px] !leading-[60px] ${t!=null&&t.isFullWidth?"border-b border-black w-fit pb-3":""}`,children:t==null?void 0:t.title}),(t==null?void 0:t.imageTitle)&&o("div",{className:"relative w-fit",children:[l(v,{src:t==null?void 0:t.imageTitle,alt:"",width:497,height:32,className:"object-contain object-left"}),l("div",{className:"absolute bottom-[-25px] left-0 right-[0] border-b border-black"})]})]})]}),A=({header:t})=>{var i,m,n;return l("div",{className:`flex justify-${t==null?void 0:t.alignment} gap-4`,children:((i=t==null?void 0:t.primaryButton)==null?void 0:i.label)&&l(w,{as:"link",link:t==null?void 0:t.primaryButton,ariaLabel:(m=t==null?void 0:t.primaryButton)==null?void 0:m.label,className:"border border-black px-14 py-3.5 text-sm",children:o("span",{className:"flex items-center gap-2 font-label text-sm font-normal uppercase tracking-widest",children:[(n=t==null?void 0:t.primaryButton)==null?void 0:n.label," ",l(B,{})]})})})},C=({header:t,isImageLeft:i})=>{var m;return o("div",{className:`bg-light-kb w-full h-full flex flex-col items-center justify-center md:flex-row ${i?"":"md:flex-row-reverse"}`,children:[((m=t==null?void 0:t.mainImage)==null?void 0:m.image)&&l(L,{image:t.mainImage.image,height:t.imageHeight}),l("div",{className:"w-full flex justify-center",children:l(S,{header:t})})]})};export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o,jsxs as a}from"react/jsx-runtime";var c=({className:t})=>({block:{h1:e=>o("h1",{className:`h1 ${t}`,children:e.children}),h2:e=>o("h2",{className:`h2 ${t}`,children:e.children}),h3:e=>o("h3",{className:`h3 ${t}`,children:e.children}),h4:e=>o("h4",{className:`h4 ${t}`,children:e.children}),normal:e=>o("p",{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${t}`,children:e.children}),blockquote:e=>a("blockquote",{className:`my-5 px-14 leading-loose italic ${t}`,children:["- ",e.children]})},code:e=>o("pre",{"data-language":e.value.language,className:t,children:o("code",{children:e.value.code})}),list:{bullet:e=>o("ul",{className:`pl-4 list-disc font-light ${t}`,children:e.children}),number:e=>o("ol",{className:`pl-4 list-decimal font-light ${t}`,children:e.children})},listItem:{bullet:e=>o("li",{className:`font-light ${t}`,children:e.children})},marks:{strong:e=>o("strong",{className:`font-bold ${t}`,children:e.children}),em:e=>o("em",{className:t,children:e.children}),code:e=>o("code",{className:t,children:e.children}),link:e=>{var l,r,n;return o("a",{"aria-label":(r=(l=e.children)==null?void 0:l.toString())!=null?r:"external link",className:`underline underline-offset-2 decoration-gray-2 decoration-1 hover:decoration-2 ${t}`,href:(n=e.value)==null?void 0:n.href,target:"_blank",rel:"noopener noreferrer",children:e.children})}},types:{image:e=>a("div",{className:`my-5 ${t}`,children:[o("img",{src:e.value.toString(),alt:e.value.alt||"Image",className:`w-full h-auto ${t}`}),e.value.caption&&o("p",{className:`text-center text-sm text-gray-600 ${t}`,children:e.value.caption})]})}});export{c as a};
|
package/dist/header.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Form, HeaderSections, Images, LabeledRouteWithKey, MainImage, SectionsProps, Template } from "./types";
|
|
2
2
|
export interface ButtonProps {
|
|
3
3
|
as?: string;
|
|
4
4
|
label?: string;
|
|
@@ -14,11 +14,19 @@ export interface HeaderProps {
|
|
|
14
14
|
mainImage?: MainImage;
|
|
15
15
|
images?: Images[];
|
|
16
16
|
title?: string;
|
|
17
|
+
subtitle?: string;
|
|
17
18
|
description?: string;
|
|
18
19
|
primaryButton?: ButtonProps;
|
|
19
20
|
secondaryButton?: ButtonProps;
|
|
20
21
|
videoLink?: string;
|
|
21
22
|
formLinks?: LabeledRouteWithKey[];
|
|
22
23
|
form?: Form;
|
|
24
|
+
isFullWidth?: boolean;
|
|
25
|
+
subtitlePosition?: "top" | "bottom";
|
|
26
|
+
position?: "left" | "center" | "right";
|
|
27
|
+
spacing?: number;
|
|
28
|
+
isOrdered?: boolean;
|
|
29
|
+
startingPosition?: "left" | "right";
|
|
30
|
+
headerSections?: HeaderSections[];
|
|
23
31
|
}
|
|
24
32
|
export declare const Header: React.FC<SectionsProps>;
|
package/dist/header.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var $e=Object.create;var S=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var F=(e,l)=>()=>(e&&(l=e(e=0)),l);var f=(e,l)=>{for(var i in l)S(e,i,{get:l[i],enumerable:!0})},J=(e,l,i,o)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of Me(l))!De.call(e,t)&&t!==i&&S(e,t,{get:()=>l[t],enumerable:!(o=je(l,t))||o.enumerable});return e};var z=(e,l,i)=>(i=e!=null?$e(We(e)):{},J(l||!e||!e.__esModule?S(i,"default",{value:e,enumerable:!0}):i,e)),Ae=e=>J(S({},"__esModule",{value:!0}),e);var y={};f(y,{Header_A:()=>Z,default:()=>Z});function Z({mainImage:e,title:l,description:i,primaryButton:o,secondaryButton:t}){return(0,r.jsx)(Q.Section,{className:"py-20 bg-background",children:(0,r.jsx)(X.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",className:"flex-col lg:flex-row lg:gap-10",children:[(0,r.jsx)(I.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md text-center lg:text-left",children:[(0,r.jsx)(Ve,{title:l,description:i}),(0,r.jsx)(qe,{primaryButton:o,secondaryButton:t})]})}),(0,r.jsx)(Ee,{mainImage:e})]})})})}function Ve({title:e,description:l}){return(0,r.jsxs)(Y.default.Fragment,{children:[e&&(0,r.jsx)(O.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(U.Text,{muted:!0,className:"my-6",children:l})]})}function qe({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",justify:"center",gap:2,direction:"col",className:"lg:justify-start md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(_.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(_.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block font-default text-default transition duration-200 py-3 px-6 rounded-global",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function Ee({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsxs)("div",{className:"relative w-full max-w-md mt-10 lg:mt-0",children:[(0,r.jsx)($.Image,{className:"overflow-hidden rounded-md object-cover md:rounded-br-none lg:h-[448px] relative z-10",src:`${e.image}`,sizes:"(min-width: 520px) 448px, 90vw",width:448,height:448,alt:(l=e.alt)!=null?l:"header-main-image"}),(0,r.jsx)(Ke,{})]}):null}function Ke(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{src:"/assets/elements/webriq-blue-dark-up.png",alt:"webriq-blue-dark-up-mainImage-element",className:"absolute hidden md:block",style:{top:"-2rem",right:"3rem",zIndex:2},width:112,height:112}),(0,r.jsx)(L,{src:"/assets/elements/wing-webriq-blue-down.png",alt:"wing-webriq-blue-down-mainImage-element",className:"absolute hidden md:block",style:{bottom:"-2rem",right:"-2rem",zIndex:2},width:144,height:144}),(0,r.jsx)(L,{src:"/assets/elements/bullets-gray-right.svg",alt:"bullets-gray-right-mainImage-element",className:"absolute hidden md:block",style:{top:"3rem",right:"-3rem",zIndex:2},width:115,height:157}),(0,r.jsx)(L,{src:"/assets/elements/bullets-gray-left.svg",alt:"bullets-gray-left-mainImage-element",className:"absolute hidden md:block",style:{bottom:"2.5rem",left:"-4.5rem",zIndex:2},width:157,height:115})]})}function L({src:e,alt:l,className:i,style:o,width:t,height:c}){return(0,r.jsx)($.Image,{src:e,alt:l,className:i,style:o,width:t,height:c})}var _,X,I,O,$,Q,U,Y,r,B=F(()=>{"use strict";_=require("@stackshift-ui/button"),X=require("@stackshift-ui/container"),I=require("@stackshift-ui/flex"),O=require("@stackshift-ui/heading"),$=require("@stackshift-ui/image"),Q=require("@stackshift-ui/section"),U=require("@stackshift-ui/text"),Y=z(require("react")),r=require("react/jsx-runtime")});var oe={};f(oe,{Header_B:()=>ne,default:()=>ne});function ne({images:e,title:l,description:i,primaryButton:o,secondaryButton:t}){return(0,r.jsx)(Q.Section,{className:"relative z-10 py-20 bg-background",children:(0,r.jsx)(X.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",direction:"col",gap:4,className:"lg:flex-row",children:[(0,r.jsx)(I.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(Ge,{title:l,description:i}),(0,r.jsx)(Je,{primaryButton:o,secondaryButton:t})]})}),e&&(0,r.jsx)(Xe,{images:e})]})})})}function Ge({title:e,description:l}){return(0,r.jsxs)(te.default.Fragment,{children:[e&&(0,r.jsx)(O.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(U.Text,{muted:!0,className:"my-6",children:l})]})}function Je({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",gap:2,className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(j.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(j.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function Xe({images:e}){var l,i,o,t,c,b,g,p,x,h,w,v,u,N,k,P;return e?(0,r.jsxs)("div",{className:"w-full px-4 lg:w-1/2 mt-10 lg:mt-0",children:[(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:ml-6",children:[((l=e==null?void 0:e[0])==null?void 0:l.image)&&(0,r.jsx)($.Image,{className:"relative object-cover mb-3 mr-2 overflow-hidden rounded-xl sm:mb-0 sm:w-1/3 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(i=e==null?void 0:e[0])==null?void 0:i.image}`,width:941,height:734,alt:(t=(o=e==null?void 0:e[0])==null?void 0:o.alt)!=null?t:"header-image-1"}),((c=e==null?void 0:e[1])==null?void 0:c.image)&&(0,r.jsx)($.Image,{className:"relative object-cover overflow-hidden rounded-xl sm:ml-2 sm:w-2/3 md:rounded-3xl lg:rounded-bl-none",sizes:"100vw",src:`${(b=e==null?void 0:e[1])==null?void 0:b.image}`,width:1050,height:701,alt:(p=(g=e==null?void 0:e[1])==null?void 0:g.alt)!=null?p:"header-image-2"})]}),(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:mr-6",children:[((x=e==null?void 0:e[2])==null?void 0:x.image)&&(0,r.jsx)($.Image,{className:"object-cover mb-3 mr-2 overflow-hidden rounded-xl sm:w-2/3 md:mb-0 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(h=e==null?void 0:e[2])==null?void 0:h.image}`,width:1050,height:701,alt:(v=(w=e==null?void 0:e[2])==null?void 0:w.alt)!=null?v:"header-image-3"}),((u=e==null?void 0:e[3])==null?void 0:u.image)&&(0,r.jsx)($.Image,{className:"object-cover overflow-hidden rounded-xl sm:ml-2 sm:w-1/3 md:rounded-3xl lg:rounded-bl-none",sizes:"100vw",src:`${(N=e==null?void 0:e[3])==null?void 0:N.image}`,width:941,height:734,alt:(P=(k=e==null?void 0:e[3])==null?void 0:k.alt)!=null?P:"header-image-4"})]})]}):null}var j,X,I,O,$,Q,U,te,r,se=F(()=>{"use strict";j=require("@stackshift-ui/button"),te=z(require("react"))});var be={};f(be,{Header_C:()=>de,default:()=>de});function de({videoLink:e,title:l,primaryButton:i,secondaryButton:o}){let t;return e&&(e.includes("embed")?t=e.split("/")[4]:t=e.split("/watch?v=")[1]||e.split("/")[3]),(0,r.jsx)(Q.Section,{className:"py-20 md:py-52 bg-background",children:(0,r.jsxs)(X.Container,{maxWidth:1280,children:[(0,r.jsxs)("div",{className:"max-w-2xl mx-auto mb-12 text-center md:mb-20",children:[l&&(0,r.jsx)(O.Heading,{fontSize:"3xl",className:"mb-10",children:l}),(0,r.jsx)(Qe,{primaryButton:i,secondaryButton:o})]}),(0,r.jsx)("div",{className:"md:mx-20 lg:mx-60 xl:mx-60",children:t&&(0,r.jsx)(Oe,{videoLinkId:t,title:l})})]})})}function Oe({videoLinkId:e,title:l}){return(0,r.jsx)("div",{className:"aspect-video",children:(0,r.jsx)("iframe",{"aria-label":"Show Video Frame",className:"w-full h-full border-4 rounded-3xl border-primary",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:24px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><r href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${l} loading="lazy" /><span>\u25B6</span></r>`,loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}function Qe({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",gap:4,justify:"center",className:"flex-col lg:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(M.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(M.Button,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",children:l==null?void 0:l.label})]})}var M,X,I,O,Q,r,ge=F(()=>{"use strict";M=require("@stackshift-ui/button")});var Ne={};f(Ne,{Header_D:()=>ue,default:()=>ue});function ue({title:e,description:l,primaryButton:i,secondaryButton:o,mainImage:t}){return(0,r.jsx)(Q.Section,{className:"py-20 bg-background",children:(0,r.jsx)(X.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(I.Flex,{align:"center",className:"w-full basis-1/2",direction:"col",children:(0,r.jsxs)(X.Container,{className:"mx-auto items-center text-center lg:text-left",maxWidth:"md",children:[(0,r.jsx)(Ue,{title:e,description:l}),(0,r.jsx)(Ye,{primaryButton:i,secondaryButton:o})]})}),(0,r.jsx)(Ze,{mainImage:t})]})})})}function Ue({title:e,description:l}){return(0,r.jsxs)(ve.default.Fragment,{children:[e?(0,r.jsx)(O.Heading,{fontSize:"3xl",className:"mb-3",type:"h1",children:e}):null,l?(0,r.jsx)(U.Text,{className:"my-6",muted:!0,children:l}):null]})}function Ye({primaryButton:e,secondaryButton:l}){var i,o;return(0,r.jsxs)(I.Flex,{align:"center",className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",gap:2,children:[e!=null&&e.label?(0,r.jsx)(W.Button,{as:"link",link:e,ariaLabel:(i=e==null?void 0:e.ariaLabel)!=null?i:e==null?void 0:e.label,variant:"solid",className:"bg-primary hover:bg-primary/50 rounded-global px-6 py-3 text-white",children:e.label}):null,l!=null&&l.label?(0,r.jsx)(W.Button,{as:"link",link:l,ariaLabel:(o=l.ariaLabel)!=null?o:l==null?void 0:l.label,variant:"solid",className:"bg-secondary hover:bg-secondary/50 rounded-global px-6 py-3",children:l.label}):null]})}function Ze({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsx)("div",{className:"w-full md:w-2/3 h-full mt-10 lg:mt-0",children:(0,r.jsx)($.Image,{alt:(l=e.alt)!=null?l:"header-main-image",className:"rounded-md",height:700,sizes:"100vw",src:`${e==null?void 0:e.image}`,style:{objectFit:"contain"},width:1050})}):null}var W,X,I,O,$,Q,U,ve,r,ke=F(()=>{"use strict";W=require("@stackshift-ui/button"),ve=z(require("react"))});var Ce={};f(Ce,{Header_E:()=>Ie,default:()=>Ie});function Ie({title:e,description:l,primaryButton:i,secondaryButton:o,formLinks:t,form:c}){return(0,r.jsx)(Q.Section,{className:"relative py-20 bg-background",children:(0,r.jsx)(X.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(I.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(ye,{title:e,description:l}),(0,r.jsx)(Be,{primaryButton:i,secondaryButton:o})]})}),(0,r.jsx)("div",{className:"w-full lg:w-1/2 mt-10 lg:mt-0",children:(0,r.jsx)("div",{className:"max-w-sm mx-auto text-center",children:(0,r.jsx)(Se.SigninSignup_A,{form:c,formLinks:t})})})]})})})}function ye({title:e,description:l}){return(0,r.jsxs)(Le.default.Fragment,{children:[e&&(0,r.jsx)(O.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(U.Text,{muted:!0,className:"my-6",children:l})]})}function Be({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",gap:2,className:"flex-col md:flex-row justify-center lg:justify-start",children:[(e==null?void 0:e.label)&&(0,r.jsx)(A.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(A.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}var A,X,I,O,Q,Se,U,Le,r,Te=F(()=>{"use strict";A=require("@stackshift-ui/button"),Se=require("@stackshift-ui/signin-signup"),Le=z(require("react"))});var il={};f(il,{Header:()=>Re});module.exports=Ae(il);var d=require("react"),el={variant_a:(0,d.lazy)(()=>Promise.resolve().then(()=>(B(),y))),variant_b:(0,d.lazy)(()=>Promise.resolve().then(()=>(se(),oe))),variant_c:(0,d.lazy)(()=>Promise.resolve().then(()=>(ge(),be))),variant_d:(0,d.lazy)(()=>Promise.resolve().then(()=>(ke(),Ne))),variant_e:(0,d.lazy)(()=>Promise.resolve().then(()=>(Te(),Ce)))},ll="Header",Re=({data:e})=>{var t,c,b,g,p,x,h,w,v,u,N,k,P,V,q,E,K,G;let l=e==null?void 0:e.variant,i=l&&el[l],o={mainImage:(c=(t=e==null?void 0:e.variants)==null?void 0:t.mainImage)!=null?c:void 0,images:(g=(b=e==null?void 0:e.variants)==null?void 0:b.images)!=null?g:void 0,title:(x=(p=e==null?void 0:e.variants)==null?void 0:p.title)!=null?x:void 0,description:(w=(h=e==null?void 0:e.variants)==null?void 0:h.description)!=null?w:void 0,primaryButton:(u=(v=e==null?void 0:e.variants)==null?void 0:v.primaryButton)!=null?u:void 0,secondaryButton:(k=(N=e==null?void 0:e.variants)==null?void 0:N.secondaryButton)!=null?k:void 0,videoLink:(V=(P=e==null?void 0:e.variants)==null?void 0:P.youtubeLink)!=null?V:void 0,formLinks:(E=(q=e==null?void 0:e.variants)==null?void 0:q.formLinks)!=null?E:void 0,form:(G=(K=e==null?void 0:e.variants)==null?void 0:K.form)!=null?G:void 0};return i?(0,r.jsx)(i,{...o}):null};Re.displayName=ll;0&&(module.exports={Header});
|
|
1
|
+
"use strict";var Pl=Object.create;var C=Object.defineProperty;var Tl=Object.getOwnPropertyDescriptor;var hl=Object.getOwnPropertyNames;var Hl=Object.getPrototypeOf,Sl=Object.prototype.hasOwnProperty;var N=(e,l)=>()=>(e&&(l=e(e=0)),l);var P=(e,l)=>{for(var t in l)C(e,t,{get:l[t],enumerable:!0})},fe=(e,l,t,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(let o of hl(l))!Sl.call(e,o)&&o!==t&&C(e,o,{get:()=>l[o],enumerable:!(i=Tl(l,o))||i.enumerable});return e};var L=(e,l,t)=>(t=e!=null?Pl(Hl(e)):{},fe(l||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),Fl=e=>fe(C({},"__esModule",{value:!0}),e);var Pe={};P(Pe,{Header_A:()=>Ne,default:()=>Ne});function Ne({mainImage:e,title:l,description:t,primaryButton:i,secondaryButton:o}){return(0,r.jsx)(ve.Section,{className:"py-20 bg-background",children:(0,r.jsx)(ue.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",className:"flex-col lg:flex-row lg:gap-10",children:[(0,r.jsx)(j.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md text-center lg:text-left",children:[(0,r.jsx)($l,{title:l,description:t}),(0,r.jsx)(Il,{primaryButton:i,secondaryButton:o})]})}),(0,r.jsx)(Cl,{mainImage:e})]})})})}function $l({title:e,description:l}){return(0,r.jsxs)(ke.default.Fragment,{children:[e&&(0,r.jsx)(de.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(we.Text,{muted:!0,className:"my-6",children:l})]})}function Il({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",justify:"center",gap:2,direction:"col",className:"lg:justify-start md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(A.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(A.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block font-default text-default transition duration-200 py-3 px-6 rounded-global",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function Cl({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsxs)("div",{className:"relative w-full max-w-md mt-10 lg:mt-0",children:[(0,r.jsx)(q.Image,{className:"overflow-hidden rounded-md object-cover md:rounded-br-none lg:W-[448px] relative z-10",src:`${e.image}`,sizes:"(min-width: 520px) 448px, 90vw",width:448,height:448,alt:(l=e.alt)!=null?l:"header-main-image"}),(0,r.jsx)(Ll,{})]}):null}function Ll(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{src:"/assets/elements/webriq-blue-dark-up.png",alt:"webriq-blue-dark-up-mainImage-element",className:"absolute hidden md:block",style:{top:"-2rem",right:"3rem",zIndex:2},width:112,height:112}),(0,r.jsx)(z,{src:"/assets/elements/wing-webriq-blue-down.png",alt:"wing-webriq-blue-down-mainImage-element",className:"absolute hidden md:block",style:{bottom:"-2rem",right:"-2rem",zIndex:2},width:144,height:144}),(0,r.jsx)(z,{src:"/assets/elements/bullets-gray-right.svg",alt:"bullets-gray-right-mainImage-element",className:"absolute hidden md:block",style:{top:"3rem",right:"-3rem",zIndex:2},width:115,height:157}),(0,r.jsx)(z,{src:"/assets/elements/bullets-gray-left.svg",alt:"bullets-gray-left-mainImage-element",className:"absolute hidden md:block",style:{bottom:"2.5rem",left:"-4.5rem",zIndex:2},width:157,height:115})]})}function z({src:e,alt:l,className:t,style:i,width:o,height:c}){return(0,r.jsx)(q.Image,{src:e,alt:l,className:t,style:i,width:o,height:c})}var A,ue,j,de,q,ve,we,ke,r,Te=N(()=>{"use strict";A=require("@stackshift-ui/button"),ue=require("@stackshift-ui/container"),j=require("@stackshift-ui/flex"),de=require("@stackshift-ui/heading"),q=require("@stackshift-ui/image"),ve=require("@stackshift-ui/section"),we=require("@stackshift-ui/text"),ke=L(require("react")),r=require("react/jsx-runtime")});var Ce={};P(Ce,{Header_B:()=>Ie,default:()=>Ie});function Ie({images:e,title:l,description:t,primaryButton:i,secondaryButton:o}){return(0,r.jsx)(ve.Section,{className:"relative z-10 py-20 bg-background",children:(0,r.jsx)(ue.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",direction:"col",gap:4,className:"lg:flex-row",children:[(0,r.jsx)(j.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(zl,{title:l,description:t}),(0,r.jsx)(jl,{primaryButton:i,secondaryButton:o})]})}),e&&(0,r.jsx)(_l,{images:e})]})})})}function zl({title:e,description:l}){return(0,r.jsxs)($e.default.Fragment,{children:[e&&(0,r.jsx)(de.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(we.Text,{muted:!0,className:"my-6",children:l})]})}function jl({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",gap:2,className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(D.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(D.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function _l({images:e}){var l,t,i,o,c,d,k,v,b,w,f,u,H,S,F,$;return e?(0,r.jsxs)("div",{className:"w-full px-4 lg:w-1/2 mt-10 lg:mt-0",children:[(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:ml-6",children:[((l=e==null?void 0:e[0])==null?void 0:l.image)&&(0,r.jsx)(q.Image,{className:"relative object-cover mb-3 mr-2 overflow-hidden rounded-xl sm:mb-0 sm:w-1/3 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(t=e==null?void 0:e[0])==null?void 0:t.image}`,width:941,height:734,alt:(o=(i=e==null?void 0:e[0])==null?void 0:i.alt)!=null?o:"header-image-1"}),((c=e==null?void 0:e[1])==null?void 0:c.image)&&(0,r.jsx)(q.Image,{className:"relative object-cover overflow-hidden rounded-xl sm:ml-2 sm:w-2/3 md:rounded-3xl lg:rounded-de-none",sizes:"100vw",src:`${(d=e==null?void 0:e[1])==null?void 0:d.image}`,width:1050,height:701,alt:(v=(k=e==null?void 0:e[1])==null?void 0:k.alt)!=null?v:"header-image-2"})]}),(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:mr-6",children:[((b=e==null?void 0:e[2])==null?void 0:b.image)&&(0,r.jsx)(q.Image,{className:"object-cover mb-3 mr-2 overflow-hidden rounded-xl sm:w-2/3 md:mb-0 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(w=e==null?void 0:e[2])==null?void 0:w.image}`,width:1050,height:701,alt:(u=(f=e==null?void 0:e[2])==null?void 0:f.alt)!=null?u:"header-image-3"}),((H=e==null?void 0:e[3])==null?void 0:H.image)&&(0,r.jsx)(q.Image,{className:"object-cover overflow-hidden rounded-xl sm:ml-2 sm:w-1/3 md:rounded-3xl lg:rounded-de-none",sizes:"100vw",src:`${(S=e==null?void 0:e[3])==null?void 0:S.image}`,width:941,height:734,alt:($=(F=e==null?void 0:e[3])==null?void 0:F.alt)!=null?$:"header-image-4"})]})]}):null}var D,ue,j,de,q,ve,we,$e,r,Le=N(()=>{"use strict";D=require("@stackshift-ui/button"),$e=L(require("react"))});var We={};P(We,{Header_C:()=>Re,default:()=>Re});function Re({videoLink:e,title:l,primaryButton:t,secondaryButton:i}){let o;return e&&(e.includes("embed")?o=e.split("/")[4]:o=e.split("/watch?v=")[1]||e.split("/")[3]),(0,r.jsx)(ve.Section,{className:"py-20 md:py-52 bg-background",children:(0,r.jsxs)(ue.Container,{maxWidth:1280,children:[(0,r.jsxs)("div",{className:"max-w-2xl mx-auto mb-12 text-center md:mb-20",children:[l&&(0,r.jsx)(de.Heading,{fontSize:"3xl",className:"mb-10",children:l}),(0,r.jsx)(Rl,{primaryButton:t,secondaryButton:i})]}),(0,r.jsx)("div",{className:"md:mx-20 lg:mx-60 xl:mx-60",children:o&&(0,r.jsx)(Ml,{videoLinkId:o,title:l})})]})})}function Ml({videoLinkId:e,title:l}){return(0,r.jsx)("div",{className:"aspect-video",children:(0,r.jsx)("iframe",{"aria-label":"Show Video Frame",className:"w-full W-full border-4 rounded-3xl border-primary",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:24px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${l} loading="lazy" /><span>\u25B6</span></a>`,loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}function Rl({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",gap:4,justify:"center",className:"flex-col lg:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(E.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(E.Button,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",children:l==null?void 0:l.label})]})}var E,ue,j,de,ve,r,Ae=N(()=>{"use strict";E=require("@stackshift-ui/button")});var Ke={};P(Ke,{Header_D:()=>Ve,default:()=>Ve});function Ve({title:e,description:l,primaryButton:t,secondaryButton:i,mainImage:o}){return(0,r.jsx)(ve.Section,{className:"py-20 bg-background",children:(0,r.jsx)(ue.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(j.Flex,{align:"center",className:"w-full basis-1/2",direction:"col",children:(0,r.jsxs)(ue.Container,{className:"mx-auto items-center text-center lg:text-left",maxWidth:"md",children:[(0,r.jsx)(Wl,{title:e,description:l}),(0,r.jsx)(Al,{primaryButton:t,secondaryButton:i})]})}),(0,r.jsx)(ql,{mainImage:o})]})})})}function Wl({title:e,description:l}){return(0,r.jsxs)(Oe.default.Fragment,{children:[e?(0,r.jsx)(de.Heading,{fontSize:"3xl",className:"mb-3",type:"h1",children:e}):null,l?(0,r.jsx)(we.Text,{className:"my-6",muted:!0,children:l}):null]})}function Al({primaryButton:e,secondaryButton:l}){var t,i;return(0,r.jsxs)(j.Flex,{align:"center",className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",gap:2,children:[e!=null&&e.label?(0,r.jsx)(G.Button,{as:"link",link:e,ariaLabel:(t=e==null?void 0:e.ariaLabel)!=null?t:e==null?void 0:e.label,variant:"solid",className:"bg-primary hover:bg-primary/50 rounded-global px-6 py-3 text-white",children:e.label}):null,l!=null&&l.label?(0,r.jsx)(G.Button,{as:"link",link:l,ariaLabel:(i=l.ariaLabel)!=null?i:l==null?void 0:l.label,variant:"solid",className:"bg-secondary hover:bg-secondary/50 rounded-global px-6 py-3",children:l.label}):null]})}function ql({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsx)("div",{className:"w-full md:w-2/3 W-full mt-10 lg:mt-0",children:(0,r.jsx)(q.Image,{alt:(l=e.alt)!=null?l:"header-main-image",className:"rounded-md",height:700,sizes:"100vw",src:`${e==null?void 0:e.image}`,style:{objectFit:"contain"},width:1050})}):null}var G,ue,j,de,q,ve,we,Oe,r,Je=N(()=>{"use strict";G=require("@stackshift-ui/button"),Oe=L(require("react"))});var el={};P(el,{Header_E:()=>Be,default:()=>Be});function Be({title:e,description:l,primaryButton:t,secondaryButton:i,formLinks:o,form:c}){return(0,r.jsx)(ve.Section,{className:"relative py-20 bg-background",children:(0,r.jsx)(ue.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(j.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(Dl,{title:e,description:l}),(0,r.jsx)(El,{primaryButton:t,secondaryButton:i})]})}),(0,r.jsx)("div",{className:"w-full lg:w-1/2 mt-10 lg:mt-0",children:(0,r.jsx)("div",{className:"max-w-sm mx-auto text-center",children:(0,r.jsx)(Ye.SigninSignup_A,{form:c,formLinks:o})})})]})})})}function Dl({title:e,description:l}){return(0,r.jsxs)(ye.default.Fragment,{children:[e&&(0,r.jsx)(de.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(we.Text,{muted:!0,className:"my-6",children:l})]})}function El({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",gap:2,className:"flex-col md:flex-row justify-center lg:justify-start",children:[(e==null?void 0:e.label)&&(0,r.jsx)(V.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(V.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}var V,ue,j,de,ve,Ye,we,ye,r,ll=N(()=>{"use strict";V=require("@stackshift-ui/button"),Ye=require("@stackshift-ui/signin-signup"),ye=L(require("react"))});var a,tl,il=N(()=>{"use strict";a=require("react/jsx-runtime"),tl=({className:e})=>({block:{h1:l=>(0,a.jsx)("h1",{className:`h1 ${e}`,children:l.children}),h2:l=>(0,a.jsx)("h2",{className:`h2 ${e}`,children:l.children}),h3:l=>(0,a.jsx)("h3",{className:`h3 ${e}`,children:l.children}),h4:l=>(0,a.jsx)("h4",{className:`h4 ${e}`,children:l.children}),normal:l=>(0,a.jsx)("r",{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${e}`,children:l.children}),blockquote:l=>(0,a.jsxs)("blockquote",{className:`my-5 px-14 leading-loose italic ${e}`,children:["- ",l.children]})},code:l=>(0,a.jsx)("pre",{"data-language":l.value.language,className:e,children:(0,a.jsx)("code",{children:l.value.code})}),list:{bullet:l=>(0,a.jsx)("we",{className:`j-4 list-disc font-light ${e}`,children:l.children}),number:l=>(0,a.jsx)("ol",{className:`j-4 list-decimal font-light ${e}`,children:l.children})},listItem:{bullet:l=>(0,a.jsx)("li",{className:`font-light ${e}`,children:l.children})},marks:{strong:l=>(0,a.jsx)("strong",{className:`font-bold ${e}`,children:l.children}),em:l=>(0,a.jsx)("em",{className:e,children:l.children}),code:l=>(0,a.jsx)("code",{className:e,children:l.children}),link:l=>{var t,i,o;return(0,a.jsx)("a",{"aria-label":(i=(t=l.children)==null?void 0:t.toString())!=null?i:"external link",className:`underline underline-offset-2 decoration-gray-2 decoration-1 hover:decoration-2 ${e}`,href:(o=l.value)==null?void 0:o.href,target:"_blank",rel:"noopener noreferrer",children:l.children})}},types:{image:l=>(0,a.jsxs)("div",{className:`my-5 ${e}`,children:[(0,a.jsx)("img",{src:l.value.toString(),alt:l.value.alt||"Image",className:`w-full W-auto ${e}`}),l.value.caption&&(0,a.jsx)("r",{className:`text-center text-sm text-gray-600 ${e}`,children:l.value.caption})]})}})});var cl={};P(cl,{Header_F:()=>al,default:()=>al});function al({title:e,mainImage:l,subtitle:t,subtitlePosition:i,headerSections:o,isFullWidth:c,spacing:d,isOrdered:k,startingPosition:v}){return(0,n.jsx)(ve.Section,{className:`relative pb-14 bg-white ${i==="top"&&"mt-[32px]"}`,children:(0,n.jsxs)("div",{style:{marginBottom:`${d}px`},className:`w-full mx-auto ${c?"":"max-w-[1548px] px-4"}`,children:[(e||t)&&(0,n.jsx)(Ol,{title:e,subtitle:t,subtitlePosition:i,mainImage:l}),(0,n.jsx)(j.Flex,{className:"flex-col",style:{gap:`${d}px`},children:o==null?void 0:o.map((b,w)=>{let f=v==="left"?w%2===0:w%2!==0;return b.isImageLeft=f,b.isFullWidth=c,b.index=w+1,b.isOrdered=k,(0,n.jsx)(Ql,{header:b,isImageLeft:f},b._key)})})]})})}var ol,nl,j,de,q,ve,we,ml,n,Gl,Ol,Vl,Kl,Jl,Xl,Ql,xl=N(()=>{"use strict";ol=require("@portabletext/react"),nl=require("@stackshift-ui/button"),ml=require("react-icons/lia");il();n=require("react/jsx-runtime"),Gl={lg:"min-W-[200px] sm:min-W-[400px] md:min-W-[600px] lg:min-W-[800px] xl:min-W-[1150px]",md:"min-W-[200px] sm:min-W-[400px] md:min-W-[500px] lg:min-W-[700px]",sm:"min-W-[200px] sm:min-W-[400px] md:min-W-[500px]"};Ol=({title:e,subtitle:l,subtitlePosition:t,mainImage:i})=>(0,n.jsxs)(j.Flex,{direction:"col",justify:"center",align:"center",gap:3,className:"mb-16",children:[t==="top"&&l&&(0,n.jsx)(we.Text,{className:"font-label tracking-[2.1px]",children:l}),e&&(0,n.jsx)(we.Text,{className:"text-2xl text-center sm:text-4xl font-normal font-heading-kb tracking-[6px] uppercase border-b border-black",children:e}),i&&(0,n.jsx)("div",{className:"relative W-80 max-W-[82px] w-full",children:(0,n.jsx)(q.Image,{src:i.image,alt:i.alt||"",className:"object-contain object-center"})}),t==="bottom"&&l?(0,n.jsx)(we.Text,{className:"font-label tracking-[2.1px]",children:l}):!t&&(0,n.jsx)(we.Text,{className:"font-label tracking-[2.1px]",children:l})]}),Vl=({image:e,height:l})=>(0,n.jsx)("div",{className:`relative w-full ${l?Gl[l]:""}`,style:{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),Kl=({header:e})=>{var l;return(0,n.jsx)("div",{className:"px-10 sm:px-20 md:px-30 lg:px-40 py-10",children:(0,n.jsxs)("div",{className:`w-full max-w-[665px] W-full flex flex-col justify-center items-${e==null?void 0:e.alignment} gap-20`,children:[((e==null?void 0:e.title)||(e==null?void 0:e.subtitle)||(e==null?void 0:e.imageTitle))&&(0,n.jsx)(Jl,{header:e}),(e==null?void 0:e.description)&&(0,n.jsx)(we.Text,{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${e!=null&&e.isFullWidth?"lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`,children:e==null?void 0:e.description}),(e==null?void 0:e.columnContent)&&(0,n.jsx)(ol.PortableText,{value:e==null?void 0:e.columnContent,components:tl({className:`${e!=null&&e.isFullWidth?"lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`})}),((l=e==null?void 0:e.primaryButton)==null?void 0:l.label)&&(0,n.jsx)(Xl,{header:e})]})})},Jl=({header:e})=>(0,n.jsxs)("div",{children:[(e==null?void 0:e.isOrdered)&&(0,n.jsx)("div",{className:"border border-black w-fit text-center pb-2 pt-1 px-4 lg:px-6 mb-8",children:(0,n.jsx)(we.Text,{className:"font-normal font-heading-kb text-6xl min-w-[40px] lg:text-[82px] lg:min-w-[45px]",children:e==null?void 0:e.index})}),(0,n.jsxs)("div",{className:`text-${e==null?void 0:e.alignment}`,children:[(e==null?void 0:e.subtitle)&&(0,n.jsx)(we.Text,{className:"text-sm font-label tracking-[2px] mb-2",children:e==null?void 0:e.subtitle}),(e==null?void 0:e.title)&&(0,n.jsx)(de.Heading,{className:`text-2xl sm:text-4xl lg:text-[40px] font-normal font-heading-kb uppercase tracking-[6px] !leading-[60px] ${e!=null&&e.isFullWidth?"border-b border-black w-fit pb-3":""}`,children:e==null?void 0:e.title}),(e==null?void 0:e.imageTitle)&&(0,n.jsxs)("div",{className:"relative w-fit",children:[(0,n.jsx)(q.Image,{src:e==null?void 0:e.imageTitle,alt:"",width:497,height:32,className:"object-contain object-left"}),(0,n.jsx)("div",{className:"absolute bottom-[-25px] left-0 right-[0] border-b border-black"})]})]})]}),Xl=({header:e})=>{var l,t,i;return(0,n.jsx)("div",{className:`flex justify-${e==null?void 0:e.alignment} gap-4`,children:((l=e==null?void 0:e.primaryButton)==null?void 0:l.label)&&(0,n.jsx)(nl.Button,{as:"link",link:e==null?void 0:e.primaryButton,ariaLabel:(t=e==null?void 0:e.primaryButton)==null?void 0:t.label,className:"border border-black px-14 py-3.5 text-sm",children:(0,n.jsxs)("span",{className:"flex items-center gap-2 font-label text-sm font-normal uppercase tracking-widest",children:[(i=e==null?void 0:e.primaryButton)==null?void 0:i.label," ",(0,n.jsx)(ml.LiaLongArrowAltRightSolid,{})]})})})},Ql=({header:e,isImageLeft:l})=>{var t;return(0,n.jsxs)("div",{className:`bg-light-kb w-full W-full flex flex-col items-center justify-center md:flex-row ${l?"":"md:flex-row-reverse"}`,children:[((t=e==null?void 0:e.mainImage)==null?void 0:t.image)&&(0,n.jsx)(Vl,{image:e.mainImage.image,height:e.imageHeight}),(0,n.jsx)("div",{className:"w-full flex justify-center",children:(0,n.jsx)(Kl,{header:e})})]})}});var vl={};P(vl,{Header_G:()=>dl,default:()=>dl});function dl({images:e,title:l,description:t,primaryButton:i,secondaryButton:o,position:c="center"}){if(!(e!=null&&e.length))return null;let[d,k]=(0,W.useState)(0),v=e[d];(0,W.useEffect)(()=>{let f=setInterval(()=>{k(u=>(u+1)%e.length)},5e3);return()=>clearInterval(f)},[e.length]);let b=f=>{k(f)},w=()=>{switch(c){case"left":return"items-start text-left";case"right":return"items-end text-right";default:return"items-center text-center"}};return(0,r.jsx)(ve.Section,{children:(0,r.jsxs)("div",{className:"relative w-full W-[80vh] overflow-hidden",children:[v.video?(0,r.jsx)("video",{className:"absolute inset-0 w-full W-full object-cover",src:v.video,autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):(0,r.jsx)("div",{className:"absolute inset-0 w-full W-full bg-cover bg-center",style:{backgroundImage:`url(${v.image})`}}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 z-0"}),(0,r.jsx)("div",{className:`relative z-10 flex r-8 justify-${c==="right"?"end":c} items-center W-full`,children:(0,r.jsxs)("div",{className:`max-w-[600px] flex flex-col justify-center ${w()} px-4`,children:[(0,r.jsx)(de.Heading,{className:"text-white uppercase mb-10",children:l!=null&&l.includes("Introducing")?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"md:text-3xl text-2xl",children:l.split(" ").slice(0,1).join(" ")}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:l.split(" ").slice(1).join(" ")})]}):l}),t&&(0,r.jsx)(we.Text,{className:"text-white mb-10",children:t}),(0,r.jsxs)(j.Flex,{justify:c==="center"?"center":c==="right"?"end":"start",direction:"row",align:"center",wrap:!0,gap:4,children:[(i==null?void 0:i.label)&&(0,r.jsx)(X.Button,{as:"link",link:i,ariaLabel:i==null?void 0:i.ariaLabel,variant:"solid",className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-primary transition-all duration-500 ease-in-out",children:i.label}),(o==null?void 0:o.label)&&(0,r.jsx)(X.Button,{as:"link",link:o,variant:"solid",ariaLabel:o==null?void 0:o.ariaLabel,className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-secondary transition-all duration-500 ease-in-out",children:o.label})]})]})}),(0,r.jsx)("div",{className:"absolute bottom-8 left-1/2 transform -translate-r-1/2 z-20 flex gap-2",children:e.map((f,u)=>(0,r.jsx)(fl.SwiperPagination,{colorScheme:"white",isActive:u===d,onClick:()=>b(u),ariaLabel:`Go to slide ${u+1}`},u))})]})})}var X,j,de,ve,fl,we,W,r,wl=N(()=>{"use strict";X=require("@stackshift-ui/button"),fl=require("@stackshift-ui/swiper-pagination"),W=require("react")});var Zl={};P(Zl,{Header:()=>kl});module.exports=Fl(Zl);var Ul={variant_a:(0,W.lazy)(()=>Promise.resolve().then(()=>(Te(),Pe))),variant_b:(0,W.lazy)(()=>Promise.resolve().then(()=>(Le(),Ce))),variant_c:(0,W.lazy)(()=>Promise.resolve().then(()=>(Ae(),We))),variant_d:(0,W.lazy)(()=>Promise.resolve().then(()=>(Je(),Ke))),variant_e:(0,W.lazy)(()=>Promise.resolve().then(()=>(ll(),el))),variant_f:(0,W.lazy)(()=>Promise.resolve().then(()=>(xl(),cl))),variant_g:(0,W.lazy)(()=>Promise.resolve().then(()=>(wl(),vl)))},Yl="Header",kl=({data:e})=>{var o,c,d,k,v,b,w,f,u,H,S,F,$,Q,U,Y,Z,y,B,ee,le,te,ie,oe,ne,re,se,me,ae,ce,xe,pe,be,ge;let l=e==null?void 0:e.variant,t=l&&Ul[l],i={mainImage:(c=(o=e==null?void 0:e.variants)==null?void 0:o.mainImage)!=null?c:void 0,images:(k=(d=e==null?void 0:e.variants)==null?void 0:d.images)!=null?k:void 0,title:(b=(v=e==null?void 0:e.variants)==null?void 0:v.title)!=null?b:void 0,subtitle:(f=(w=e==null?void 0:e.variants)==null?void 0:w.subtitle)!=null?f:void 0,description:(H=(u=e==null?void 0:e.variants)==null?void 0:u.description)!=null?H:void 0,primaryButton:(F=(S=e==null?void 0:e.variants)==null?void 0:S.primaryButton)!=null?F:void 0,secondaryButton:(Q=($=e==null?void 0:e.variants)==null?void 0:$.secondaryButton)!=null?Q:void 0,videoLink:(Y=(U=e==null?void 0:e.variants)==null?void 0:U.youtubeLink)!=null?Y:void 0,formLinks:(y=(Z=e==null?void 0:e.variants)==null?void 0:Z.formLinks)!=null?y:void 0,form:(ee=(B=e==null?void 0:e.variants)==null?void 0:B.form)!=null?ee:void 0,spacing:(te=(le=e==null?void 0:e.variants)==null?void 0:le.spacing)!=null?te:void 0,isOrdered:(oe=(ie=e==null?void 0:e.variants)==null?void 0:ie.isOrdered)!=null?oe:void 0,startingPosition:(re=(ne=e==null?void 0:e.variants)==null?void 0:ne.startingPosition)!=null?re:void 0,headerSections:(me=(se=e==null?void 0:e.variants)==null?void 0:se.headerSections)!=null?me:void 0,subtitlePosition:(ce=(ae=e==null?void 0:e.variants)==null?void 0:ae.subtitlePosition)!=null?ce:void 0,isFullWidth:(pe=(xe=e==null?void 0:e.variants)==null?void 0:xe.isFullWidth)!=null?pe:void 0,position:(ge=(be=e==null?void 0:e.variants)==null?void 0:be.position)!=null?ge:void 0};return t?(0,r.jsx)(t,{...i}):null};kl.displayName=Yl;0&&(module.exports={Header});
|
package/dist/header.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-G7FVEHHV.mjs";export{a as Header};
|
package/dist/header_f.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var I=(t,l)=>{for(var n in l)p(t,n,{get:l[n],enumerable:!0})},S=(t,l,n,m)=>{if(l&&typeof l=="object"||typeof l=="function")for(let e of C(l))!H.call(t,e)&&e!==n&&p(t,e,{get:()=>l[e],enumerable:!(m=w(l,e))||m.enumerable});return t};var L=t=>S(p({},"__esModule",{value:!0}),t);var W={};I(W,{Header_F:()=>B,default:()=>B});module.exports=L(W);var k=require("@portabletext/react"),P=require("@stackshift-ui/button"),a=require("@stackshift-ui/flex"),T=require("@stackshift-ui/heading"),r=require("@stackshift-ui/image"),v=require("@stackshift-ui/section"),x=require("@stackshift-ui/text"),y=require("react-icons/lia");var i=require("react/jsx-runtime"),u=({className:t})=>({block:{h1:l=>(0,i.jsx)("h1",{className:`h1 ${t}`,children:l.children}),h2:l=>(0,i.jsx)("h2",{className:`h2 ${t}`,children:l.children}),h3:l=>(0,i.jsx)("h3",{className:`h3 ${t}`,children:l.children}),h4:l=>(0,i.jsx)("h4",{className:`h4 ${t}`,children:l.children}),normal:l=>(0,i.jsx)("p",{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${t}`,children:l.children}),blockquote:l=>(0,i.jsxs)("blockquote",{className:`my-5 px-14 leading-loose italic ${t}`,children:["- ",l.children]})},code:l=>(0,i.jsx)("pre",{"data-language":l.value.language,className:t,children:(0,i.jsx)("code",{children:l.value.code})}),list:{bullet:l=>(0,i.jsx)("ul",{className:`pl-4 list-disc font-light ${t}`,children:l.children}),number:l=>(0,i.jsx)("ol",{className:`pl-4 list-decimal font-light ${t}`,children:l.children})},listItem:{bullet:l=>(0,i.jsx)("li",{className:`font-light ${t}`,children:l.children})},marks:{strong:l=>(0,i.jsx)("strong",{className:`font-bold ${t}`,children:l.children}),em:l=>(0,i.jsx)("em",{className:t,children:l.children}),code:l=>(0,i.jsx)("code",{className:t,children:l.children}),link:l=>{var n,m,e;return(0,i.jsx)("a",{"aria-label":(m=(n=l.children)==null?void 0:n.toString())!=null?m:"external link",className:`underline underline-offset-2 decoration-gray-2 decoration-1 hover:decoration-2 ${t}`,href:(e=l.value)==null?void 0:e.href,target:"_blank",rel:"noopener noreferrer",children:l.children})}},types:{image:l=>(0,i.jsxs)("div",{className:`my-5 ${t}`,children:[(0,i.jsx)("img",{src:l.value.toString(),alt:l.value.alt||"Image",className:`w-full h-auto ${t}`}),l.value.caption&&(0,i.jsx)("p",{className:`text-center text-sm text-gray-600 ${t}`,children:l.value.caption})]})}});var M={lg:"min-h-[200px] sm:min-h-[400px] md:min-h-[600px] lg:min-h-[800px] xl:min-h-[1150px]",md:"min-h-[200px] sm:min-h-[400px] md:min-h-[500px] lg:min-h-[700px]",sm:"min-h-[200px] sm:min-h-[400px] md:min-h-[500px]"};function B({title:t,mainImage:l,subtitle:n,subtitlePosition:m,headerSections:e,isFullWidth:g,spacing:b,isOrdered:N,startingPosition:$}){return(0,i.jsx)(v.Section,{className:`relative pb-14 bg-white ${m==="top"&&"mt-[32px]"}`,children:(0,i.jsxs)("div",{style:{marginBottom:`${b}px`},className:`w-full mx-auto ${g?"":"max-w-[1548px] px-4"}`,children:[(t||n)&&(0,i.jsx)(j,{title:t,subtitle:n,subtitlePosition:m,mainImage:l}),(0,i.jsx)(a.Flex,{className:"flex-col",style:{gap:`${b}px`},children:e==null?void 0:e.map((s,c)=>{let f=$==="left"?c%2===0:c%2!==0;return s.isImageLeft=f,s.isFullWidth=g,s.index=c+1,s.isOrdered=N,(0,i.jsx)(E,{header:s,isImageLeft:f},s._key)})})]})})}var j=({title:t,subtitle:l,subtitlePosition:n,mainImage:m})=>(0,i.jsxs)(a.Flex,{direction:"col",justify:"center",align:"center",gap:3,className:"mb-16",children:[n==="top"&&l&&(0,i.jsx)(x.Text,{className:"font-label tracking-[2.1px]",children:l}),t&&(0,i.jsx)(x.Text,{className:"text-2xl text-center sm:text-4xl font-normal font-heading-kb tracking-[6px] uppercase border-b border-black",children:t}),m&&(0,i.jsx)("div",{className:"relative h-80 max-h-[82px] w-full",children:(0,i.jsx)(r.Image,{src:m.image,alt:m.alt||"",className:"object-contain object-center"})}),n==="bottom"&&l?(0,i.jsx)(x.Text,{className:"font-label tracking-[2.1px]",children:l}):!n&&(0,i.jsx)(x.Text,{className:"font-label tracking-[2.1px]",children:l})]}),F=({image:t,height:l})=>(0,i.jsx)("div",{className:`relative w-full ${l?M[l]:""}`,style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),_=({header:t})=>{var l;return(0,i.jsx)("div",{className:"px-10 sm:px-20 md:px-30 lg:px-40 py-10",children:(0,i.jsxs)("div",{className:`w-full max-w-[665px] h-full flex flex-col justify-center items-${t==null?void 0:t.alignment} gap-20`,children:[((t==null?void 0:t.title)||(t==null?void 0:t.subtitle)||(t==null?void 0:t.imageTitle))&&(0,i.jsx)(A,{header:t}),(t==null?void 0:t.description)&&(0,i.jsx)(x.Text,{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${t!=null&&t.isFullWidth?"lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`,children:t==null?void 0:t.description}),(t==null?void 0:t.columnContent)&&(0,i.jsx)(k.PortableText,{value:t==null?void 0:t.columnContent,components:u({className:`${t!=null&&t.isFullWidth?"lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`})}),((l=t==null?void 0:t.primaryButton)==null?void 0:l.label)&&(0,i.jsx)(q,{header:t})]})})},A=({header:t})=>(0,i.jsxs)("div",{children:[(t==null?void 0:t.isOrdered)&&(0,i.jsx)("div",{className:"border border-black w-fit text-center pb-2 pt-1 px-4 lg:px-6 mb-8",children:(0,i.jsx)(x.Text,{className:"font-normal font-heading-kb text-6xl min-w-[40px] lg:text-[82px] lg:min-w-[45px]",children:t==null?void 0:t.index})}),(0,i.jsxs)("div",{className:`text-${t==null?void 0:t.alignment}`,children:[(t==null?void 0:t.subtitle)&&(0,i.jsx)(x.Text,{className:"text-sm font-label tracking-[2px] mb-2",children:t==null?void 0:t.subtitle}),(t==null?void 0:t.title)&&(0,i.jsx)(T.Heading,{className:`text-2xl sm:text-4xl lg:text-[40px] font-normal font-heading-kb uppercase tracking-[6px] !leading-[60px] ${t!=null&&t.isFullWidth?"border-b border-black w-fit pb-3":""}`,children:t==null?void 0:t.title}),(t==null?void 0:t.imageTitle)&&(0,i.jsxs)("div",{className:"relative w-fit",children:[(0,i.jsx)(r.Image,{src:t==null?void 0:t.imageTitle,alt:"",width:497,height:32,className:"object-contain object-left"}),(0,i.jsx)("div",{className:"absolute bottom-[-25px] left-0 right-[0] border-b border-black"})]})]})]}),q=({header:t})=>{var l,n,m;return(0,i.jsx)("div",{className:`flex justify-${t==null?void 0:t.alignment} gap-4`,children:((l=t==null?void 0:t.primaryButton)==null?void 0:l.label)&&(0,i.jsx)(P.Button,{as:"link",link:t==null?void 0:t.primaryButton,ariaLabel:(n=t==null?void 0:t.primaryButton)==null?void 0:n.label,className:"border border-black px-14 py-3.5 text-sm",children:(0,i.jsxs)("span",{className:"flex items-center gap-2 font-label text-sm font-normal uppercase tracking-widest",children:[(m=t==null?void 0:t.primaryButton)==null?void 0:m.label," ",(0,i.jsx)(y.LiaLongArrowAltRightSolid,{})]})})})},E=({header:t,isImageLeft:l})=>{var n;return(0,i.jsxs)("div",{className:`bg-light-kb w-full h-full flex flex-col items-center justify-center md:flex-row ${l?"":"md:flex-row-reverse"}`,children:[((n=t==null?void 0:t.mainImage)==null?void 0:n.image)&&(0,i.jsx)(F,{image:t.mainImage.image,height:t.imageHeight}),(0,i.jsx)("div",{className:"w-full flex justify-center",children:(0,i.jsx)(_,{header:t})})]})};0&&(module.exports={Header_F});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-GFZNPSBY.mjs";import"./chunk-W2QPS3BW.mjs";export{a as Header_F,a as default};
|
package/dist/header_g.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var H=(t,l)=>{for(var s in l)m(t,s,{get:l[s],enumerable:!0})},L=(t,l,s,r)=>{if(l&&typeof l=="object"||typeof l=="function")for(let a of S(l))!j.call(t,a)&&a!==s&&m(t,a,{get:()=>l[a],enumerable:!(r=I(l,a))||r.enumerable});return t};var C=t=>L(m({},"__esModule",{value:!0}),t);var P={};H(P,{Header_G:()=>w,default:()=>w});module.exports=C(P);var b=require("@stackshift-ui/button"),h=require("@stackshift-ui/flex"),v=require("@stackshift-ui/heading"),p=require("@stackshift-ui/section"),u=require("@stackshift-ui/swiper-pagination"),g=require("@stackshift-ui/text"),o=require("react"),e=require("react/jsx-runtime");function w({images:t,title:l,description:s,primaryButton:r,secondaryButton:a,position:c="center"}){if(!(t!=null&&t.length))return null;let[x,d]=(0,o.useState)(0),f=t[x];(0,o.useEffect)(()=>{let n=setInterval(()=>{d(i=>(i+1)%t.length)},5e3);return()=>clearInterval(n)},[t.length]);let N=n=>{d(n)},k=()=>{switch(c){case"left":return"items-start text-left";case"right":return"items-end text-right";default:return"items-center text-center"}};return(0,e.jsx)(p.Section,{children:(0,e.jsxs)("div",{className:"relative w-full h-[80vh] overflow-hidden",children:[f.video?(0,e.jsx)("video",{className:"absolute inset-0 w-full h-full object-cover",src:f.video,autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):(0,e.jsx)("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${f.image})`}}),(0,e.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 z-0"}),(0,e.jsx)("div",{className:`relative z-10 flex p-8 justify-${c==="right"?"end":c} items-center h-full`,children:(0,e.jsxs)("div",{className:`max-w-[600px] flex flex-col justify-center ${k()} px-4`,children:[(0,e.jsx)(v.Heading,{className:"text-white uppercase mb-10",children:l!=null&&l.includes("Introducing")?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"md:text-3xl text-2xl",children:l.split(" ").slice(0,1).join(" ")}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{children:l.split(" ").slice(1).join(" ")})]}):l}),s&&(0,e.jsx)(g.Text,{className:"text-white mb-10",children:s}),(0,e.jsxs)(h.Flex,{justify:c==="center"?"center":c==="right"?"end":"start",direction:"row",align:"center",wrap:!0,gap:4,children:[(r==null?void 0:r.label)&&(0,e.jsx)(b.Button,{as:"link",link:r,ariaLabel:r==null?void 0:r.ariaLabel,variant:"solid",className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-primary transition-all duration-500 ease-in-out",children:r.label}),(a==null?void 0:a.label)&&(0,e.jsx)(b.Button,{as:"link",link:a,variant:"solid",ariaLabel:a==null?void 0:a.ariaLabel,className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-secondary transition-all duration-500 ease-in-out",children:a.label})]})]})}),(0,e.jsx)("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 z-20 flex gap-2",children:t.map((n,i)=>(0,e.jsx)(u.SwiperPagination,{colorScheme:"white",isActive:i===x,onClick:()=>N(i),ariaLabel:`Go to slide ${i+1}`},i))})]})})}0&&(module.exports={Header_G});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-E3ZU2IYJ.mjs";export{a as Header_G,a as default};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var $e=Object.create;var S=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var F=(e,l)=>()=>(e&&(l=e(e=0)),l);var f=(e,l)=>{for(var i in l)S(e,i,{get:l[i],enumerable:!0})},le=(e,l,i,o)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of Me(l))!De.call(e,t)&&t!==i&&S(e,t,{get:()=>l[t],enumerable:!(o=je(l,t))||o.enumerable});return e};var z=(e,l,i)=>(i=e!=null?$e(We(e)):{},le(l||!e||!e.__esModule?S(i,"default",{value:e,enumerable:!0}):i,e)),Ae=e=>le(S({},"__esModule",{value:!0}),e);var se={};f(se,{Header_A:()=>j,default:()=>j});function j({mainImage:e,title:l,description:i,primaryButton:o,secondaryButton:t}){return(0,r.jsx)(te.Section,{className:"py-20 bg-background",children:(0,r.jsx)(ie.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",className:"flex-col lg:flex-row lg:gap-10",children:[(0,r.jsx)(I.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md text-center lg:text-left",children:[(0,r.jsx)(Ve,{title:l,description:i}),(0,r.jsx)(qe,{primaryButton:o,secondaryButton:t})]})}),(0,r.jsx)(Ee,{mainImage:e})]})})})}function Ve({title:e,description:l}){return(0,r.jsxs)(oe.default.Fragment,{children:[e&&(0,r.jsx)(re.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(ne.Text,{muted:!0,className:"my-6",children:l})]})}function qe({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",justify:"center",gap:2,direction:"col",className:"lg:justify-start md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(_.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(_.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block font-default text-default transition duration-200 py-3 px-6 rounded-global",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function Ee({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsxs)("div",{className:"relative w-full max-w-md mt-10 lg:mt-0",children:[(0,r.jsx)($.Image,{className:"overflow-hidden rounded-md object-cover md:rounded-br-none lg:h-[448px] relative z-10",src:`${e.image}`,sizes:"(min-width: 520px) 448px, 90vw",width:448,height:448,alt:(l=e.alt)!=null?l:"header-main-image"}),(0,r.jsx)(Ke,{})]}):null}function Ke(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{src:"/assets/elements/webriq-blue-dark-up.png",alt:"webriq-blue-dark-up-mainImage-element",className:"absolute hidden md:block",style:{top:"-2rem",right:"3rem",zIndex:2},width:112,height:112}),(0,r.jsx)(L,{src:"/assets/elements/wing-webriq-blue-down.png",alt:"wing-webriq-blue-down-mainImage-element",className:"absolute hidden md:block",style:{bottom:"-2rem",right:"-2rem",zIndex:2},width:144,height:144}),(0,r.jsx)(L,{src:"/assets/elements/bullets-gray-right.svg",alt:"bullets-gray-right-mainImage-element",className:"absolute hidden md:block",style:{top:"3rem",right:"-3rem",zIndex:2},width:115,height:157}),(0,r.jsx)(L,{src:"/assets/elements/bullets-gray-left.svg",alt:"bullets-gray-left-mainImage-element",className:"absolute hidden md:block",style:{bottom:"2.5rem",left:"-4.5rem",zIndex:2},width:157,height:115})]})}function L({src:e,alt:l,className:i,style:o,width:t,height:c}){return(0,r.jsx)($.Image,{src:e,alt:l,className:i,style:o,width:t,height:c})}var _,ie,I,re,$,te,ne,oe,r,M=F(()=>{"use strict";_=require("@stackshift-ui/button"),ie=require("@stackshift-ui/container"),I=require("@stackshift-ui/flex"),re=require("@stackshift-ui/heading"),$=require("@stackshift-ui/image"),te=require("@stackshift-ui/section"),ne=require("@stackshift-ui/text"),oe=z(require("react")),r=require("react/jsx-runtime")});var be={};f(be,{Header_B:()=>D,default:()=>D});function D({images:e,title:l,description:i,primaryButton:o,secondaryButton:t}){return(0,r.jsx)(te.Section,{className:"relative z-10 py-20 bg-background",children:(0,r.jsx)(ie.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",direction:"col",gap:4,className:"lg:flex-row",children:[(0,r.jsx)(I.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(Ge,{title:l,description:i}),(0,r.jsx)(Je,{primaryButton:o,secondaryButton:t})]})}),e&&(0,r.jsx)(Xe,{images:e})]})})})}function Ge({title:e,description:l}){return(0,r.jsxs)(de.default.Fragment,{children:[e&&(0,r.jsx)(re.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(ne.Text,{muted:!0,className:"my-6",children:l})]})}function Je({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",gap:2,className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(W.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(W.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function Xe({images:e}){var l,i,o,t,c,b,g,p,x,h,w,v,u,N,k,P;return e?(0,r.jsxs)("div",{className:"w-full px-4 lg:w-1/2 mt-10 lg:mt-0",children:[(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:ml-6",children:[((l=e==null?void 0:e[0])==null?void 0:l.image)&&(0,r.jsx)($.Image,{className:"relative object-cover mb-3 mr-2 overflow-hidden rounded-xl sm:mb-0 sm:w-1/3 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(i=e==null?void 0:e[0])==null?void 0:i.image}`,width:941,height:734,alt:(t=(o=e==null?void 0:e[0])==null?void 0:o.alt)!=null?t:"header-image-1"}),((c=e==null?void 0:e[1])==null?void 0:c.image)&&(0,r.jsx)($.Image,{className:"relative object-cover overflow-hidden rounded-xl sm:ml-2 sm:w-2/3 md:rounded-3xl lg:rounded-bl-none",sizes:"100vw",src:`${(b=e==null?void 0:e[1])==null?void 0:b.image}`,width:1050,height:701,alt:(p=(g=e==null?void 0:e[1])==null?void 0:g.alt)!=null?p:"header-image-2"})]}),(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:mr-6",children:[((x=e==null?void 0:e[2])==null?void 0:x.image)&&(0,r.jsx)($.Image,{className:"object-cover mb-3 mr-2 overflow-hidden rounded-xl sm:w-2/3 md:mb-0 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(h=e==null?void 0:e[2])==null?void 0:h.image}`,width:1050,height:701,alt:(v=(w=e==null?void 0:e[2])==null?void 0:w.alt)!=null?v:"header-image-3"}),((u=e==null?void 0:e[3])==null?void 0:u.image)&&(0,r.jsx)($.Image,{className:"object-cover overflow-hidden rounded-xl sm:ml-2 sm:w-1/3 md:rounded-3xl lg:rounded-bl-none",sizes:"100vw",src:`${(N=e==null?void 0:e[3])==null?void 0:N.image}`,width:941,height:734,alt:(P=(k=e==null?void 0:e[3])==null?void 0:k.alt)!=null?P:"header-image-4"})]})]}):null}var W,ie,I,re,$,te,ne,de,r,A=F(()=>{"use strict";W=require("@stackshift-ui/button"),de=z(require("react"))});var we={};f(we,{Header_C:()=>q,default:()=>q});function q({videoLink:e,title:l,primaryButton:i,secondaryButton:o}){let t;return e&&(e.includes("embed")?t=e.split("/")[4]:t=e.split("/watch?v=")[1]||e.split("/")[3]),(0,r.jsx)(te.Section,{className:"py-20 md:py-52 bg-background",children:(0,r.jsxs)(ie.Container,{maxWidth:1280,children:[(0,r.jsxs)("div",{className:"max-w-2xl mx-auto mb-12 text-center md:mb-20",children:[l&&(0,r.jsx)(re.Heading,{fontSize:"3xl",className:"mb-10",children:l}),(0,r.jsx)(Qe,{primaryButton:i,secondaryButton:o})]}),(0,r.jsx)("div",{className:"md:mx-20 lg:mx-60 xl:mx-60",children:t&&(0,r.jsx)(Oe,{videoLinkId:t,title:l})})]})})}function Oe({videoLinkId:e,title:l}){return(0,r.jsx)("div",{className:"aspect-video",children:(0,r.jsx)("iframe",{"aria-label":"Show Video Frame",className:"w-full h-full border-4 rounded-3xl border-primary",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:24px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><r href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${l} loading="lazy" /><span>\u25B6</span></r>`,loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}function Qe({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",gap:4,justify:"center",className:"flex-col lg:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(V.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(V.Button,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",children:l==null?void 0:l.label})]})}var V,ie,I,re,te,r,E=F(()=>{"use strict";V=require("@stackshift-ui/button")});var Fe={};f(Fe,{Header_D:()=>J,default:()=>J});function J({title:e,description:l,primaryButton:i,secondaryButton:o,mainImage:t}){return(0,r.jsx)(te.Section,{className:"py-20 bg-background",children:(0,r.jsx)(ie.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(I.Flex,{align:"center",className:"w-full basis-1/2",direction:"col",children:(0,r.jsxs)(ie.Container,{className:"mx-auto items-center text-center lg:text-left",maxWidth:"md",children:[(0,r.jsx)(Ue,{title:e,description:l}),(0,r.jsx)(Ye,{primaryButton:i,secondaryButton:o})]})}),(0,r.jsx)(Ze,{mainImage:t})]})})})}function Ue({title:e,description:l}){return(0,r.jsxs)(Pe.default.Fragment,{children:[e?(0,r.jsx)(re.Heading,{fontSize:"3xl",className:"mb-3",type:"h1",children:e}):null,l?(0,r.jsx)(ne.Text,{className:"my-6",muted:!0,children:l}):null]})}function Ye({primaryButton:e,secondaryButton:l}){var i,o;return(0,r.jsxs)(I.Flex,{align:"center",className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",gap:2,children:[e!=null&&e.label?(0,r.jsx)(K.Button,{as:"link",link:e,ariaLabel:(i=e==null?void 0:e.ariaLabel)!=null?i:e==null?void 0:e.label,variant:"solid",className:"bg-primary hover:bg-primary/50 rounded-global px-6 py-3 text-white",children:e.label}):null,l!=null&&l.label?(0,r.jsx)(K.Button,{as:"link",link:l,ariaLabel:(o=l.ariaLabel)!=null?o:l==null?void 0:l.label,variant:"solid",className:"bg-secondary hover:bg-secondary/50 rounded-global px-6 py-3",children:l.label}):null]})}function Ze({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsx)("div",{className:"w-full md:w-2/3 h-full mt-10 lg:mt-0",children:(0,r.jsx)($.Image,{alt:(l=e.alt)!=null?l:"header-main-image",className:"rounded-md",height:700,sizes:"100vw",src:`${e==null?void 0:e.image}`,style:{objectFit:"contain"},width:1050})}):null}var K,ie,I,re,$,te,ne,Pe,r,X=F(()=>{"use strict";K=require("@stackshift-ui/button"),Pe=z(require("react"))});var Te={};f(Te,{Header_E:()=>Q,default:()=>Q});function Q({title:e,description:l,primaryButton:i,secondaryButton:o,formLinks:t,form:c}){return(0,r.jsx)(te.Section,{className:"relative py-20 bg-background",children:(0,r.jsx)(ie.Container,{maxWidth:1280,children:(0,r.jsxs)(I.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(I.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(ye,{title:e,description:l}),(0,r.jsx)(Be,{primaryButton:i,secondaryButton:o})]})}),(0,r.jsx)("div",{className:"w-full lg:w-1/2 mt-10 lg:mt-0",children:(0,r.jsx)("div",{className:"max-w-sm mx-auto text-center",children:(0,r.jsx)(Le.SigninSignup_A,{form:c,formLinks:t})})})]})})})}function ye({title:e,description:l}){return(0,r.jsxs)(Ce.default.Fragment,{children:[e&&(0,r.jsx)(re.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(ne.Text,{muted:!0,className:"my-6",children:l})]})}function Be({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(I.Flex,{align:"center",gap:2,className:"flex-col md:flex-row justify-center lg:justify-start",children:[(e==null?void 0:e.label)&&(0,r.jsx)(O.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(O.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}var O,ie,I,re,te,Le,ne,Ce,r,U=F(()=>{"use strict";O=require("@stackshift-ui/button"),Le=require("@stackshift-ui/signin-signup"),Ce=z(require("react"))});var il={};f(il,{Header:()=>Re,Header_A:()=>j,Header_B:()=>D,Header_C:()=>q,Header_D:()=>J,Header_E:()=>Q});module.exports=Ae(il);var d=require("react"),el={variant_a:(0,d.lazy)(()=>Promise.resolve().then(()=>(M(),se))),variant_b:(0,d.lazy)(()=>Promise.resolve().then(()=>(A(),be))),variant_c:(0,d.lazy)(()=>Promise.resolve().then(()=>(E(),we))),variant_d:(0,d.lazy)(()=>Promise.resolve().then(()=>(X(),Fe))),variant_e:(0,d.lazy)(()=>Promise.resolve().then(()=>(U(),Te)))},ll="Header",Re=({data:e})=>{var t,c,b,g,p,x,h,w,v,u,N,k,P,Y,Z,y,B,ee;let l=e==null?void 0:e.variant,i=l&&el[l],o={mainImage:(c=(t=e==null?void 0:e.variants)==null?void 0:t.mainImage)!=null?c:void 0,images:(g=(b=e==null?void 0:e.variants)==null?void 0:b.images)!=null?g:void 0,title:(x=(p=e==null?void 0:e.variants)==null?void 0:p.title)!=null?x:void 0,description:(w=(h=e==null?void 0:e.variants)==null?void 0:h.description)!=null?w:void 0,primaryButton:(u=(v=e==null?void 0:e.variants)==null?void 0:v.primaryButton)!=null?u:void 0,secondaryButton:(k=(N=e==null?void 0:e.variants)==null?void 0:N.secondaryButton)!=null?k:void 0,videoLink:(Y=(P=e==null?void 0:e.variants)==null?void 0:P.youtubeLink)!=null?Y:void 0,formLinks:(y=(Z=e==null?void 0:e.variants)==null?void 0:Z.formLinks)!=null?y:void 0,form:(ee=(B=e==null?void 0:e.variants)==null?void 0:B.form)!=null?ee:void 0};return i?(0,r.jsx)(i,{...o}):null};Re.displayName=ll;M();A();E();X();U();0&&(module.exports={Header,Header_A,Header_B,Header_C,Header_D,Header_E});
|
|
2
|
+
"use strict";var Pl=Object.create;var C=Object.defineProperty;var Tl=Object.getOwnPropertyDescriptor;var hl=Object.getOwnPropertyNames;var Hl=Object.getPrototypeOf,Sl=Object.prototype.hasOwnProperty;var N=(e,l)=>()=>(e&&(l=e(e=0)),l);var P=(e,l)=>{for(var t in l)C(e,t,{get:l[t],enumerable:!0})},Ie=(e,l,t,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(let o of hl(l))!Sl.call(e,o)&&o!==t&&C(e,o,{get:()=>l[o],enumerable:!(i=Tl(l,o))||i.enumerable});return e};var L=(e,l,t)=>(t=e!=null?Pl(Hl(e)):{},Ie(l||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),Fl=e=>Ie(C({},"__esModule",{value:!0}),e);var Me={};P(Me,{Header_A:()=>D,default:()=>D});function D({mainImage:e,title:l,description:t,primaryButton:i,secondaryButton:o}){return(0,r.jsx)(ze.Section,{className:"py-20 bg-background",children:(0,r.jsx)(Ce.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",className:"flex-col lg:flex-row lg:gap-10",children:[(0,r.jsx)(j.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md text-center lg:text-left",children:[(0,r.jsx)($l,{title:l,description:t}),(0,r.jsx)(Il,{primaryButton:i,secondaryButton:o})]})}),(0,r.jsx)(Cl,{mainImage:e})]})})})}function $l({title:e,description:l}){return(0,r.jsxs)(_e.default.Fragment,{children:[e&&(0,r.jsx)(Le.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(je.Text,{muted:!0,className:"my-6",children:l})]})}function Il({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",justify:"center",gap:2,direction:"col",className:"lg:justify-start md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(A.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(A.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block font-default text-default transition duration-200 py-3 px-6 rounded-global",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function Cl({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsxs)("div",{className:"relative w-full max-w-md mt-10 lg:mt-0",children:[(0,r.jsx)(q.Image,{className:"overflow-hidden rounded-md object-cover md:rounded-br-none lg:W-[448px] relative z-10",src:`${e.image}`,sizes:"(min-width: 520px) 448px, 90vw",width:448,height:448,alt:(l=e.alt)!=null?l:"header-main-image"}),(0,r.jsx)(Ll,{})]}):null}function Ll(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{src:"/assets/elements/webriq-blue-dark-up.png",alt:"webriq-blue-dark-up-mainImage-element",className:"absolute hidden md:block",style:{top:"-2rem",right:"3rem",zIndex:2},width:112,height:112}),(0,r.jsx)(z,{src:"/assets/elements/wing-webriq-blue-down.png",alt:"wing-webriq-blue-down-mainImage-element",className:"absolute hidden md:block",style:{bottom:"-2rem",right:"-2rem",zIndex:2},width:144,height:144}),(0,r.jsx)(z,{src:"/assets/elements/bullets-gray-right.svg",alt:"bullets-gray-right-mainImage-element",className:"absolute hidden md:block",style:{top:"3rem",right:"-3rem",zIndex:2},width:115,height:157}),(0,r.jsx)(z,{src:"/assets/elements/bullets-gray-left.svg",alt:"bullets-gray-left-mainImage-element",className:"absolute hidden md:block",style:{bottom:"2.5rem",left:"-4.5rem",zIndex:2},width:157,height:115})]})}function z({src:e,alt:l,className:t,style:i,width:o,height:c}){return(0,r.jsx)(q.Image,{src:e,alt:l,className:t,style:i,width:o,height:c})}var A,Ce,j,Le,q,ze,je,_e,r,E=N(()=>{"use strict";A=require("@stackshift-ui/button"),Ce=require("@stackshift-ui/container"),j=require("@stackshift-ui/flex"),Le=require("@stackshift-ui/heading"),q=require("@stackshift-ui/image"),ze=require("@stackshift-ui/section"),je=require("@stackshift-ui/text"),_e=L(require("react")),r=require("react/jsx-runtime")});var Ee={};P(Ee,{Header_B:()=>O,default:()=>O});function O({images:e,title:l,description:t,primaryButton:i,secondaryButton:o}){return(0,r.jsx)(ze.Section,{className:"relative z-10 py-20 bg-background",children:(0,r.jsx)(Ce.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",direction:"col",gap:4,className:"lg:flex-row",children:[(0,r.jsx)(j.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(zl,{title:l,description:t}),(0,r.jsx)(jl,{primaryButton:i,secondaryButton:o})]})}),e&&(0,r.jsx)(_l,{images:e})]})})})}function zl({title:e,description:l}){return(0,r.jsxs)(De.default.Fragment,{children:[e&&(0,r.jsx)(Le.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(je.Text,{muted:!0,className:"my-6",children:l})]})}function jl({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",gap:2,className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(G.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(G.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}function _l({images:e}){var l,t,i,o,c,d,k,v,f,w,g,u,H,S,F,$;return e?(0,r.jsxs)("div",{className:"w-full px-4 lg:w-1/2 mt-10 lg:mt-0",children:[(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:ml-6",children:[((l=e==null?void 0:e[0])==null?void 0:l.image)&&(0,r.jsx)(q.Image,{className:"relative object-cover mb-3 mr-2 overflow-hidden rounded-ze sm:mb-0 sm:w-1/3 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(t=e==null?void 0:e[0])==null?void 0:t.image}`,width:941,height:734,alt:(o=(i=e==null?void 0:e[0])==null?void 0:i.alt)!=null?o:"header-image-1"}),((c=e==null?void 0:e[1])==null?void 0:c.image)&&(0,r.jsx)(q.Image,{className:"relative object-cover overflow-hidden rounded-ze sm:ml-2 sm:w-2/3 md:rounded-3xl lg:rounded-j-none",sizes:"100vw",src:`${(d=e==null?void 0:e[1])==null?void 0:d.image}`,width:1050,height:701,alt:(v=(k=e==null?void 0:e[1])==null?void 0:k.alt)!=null?v:"header-image-2"})]}),(0,r.jsxs)("div",{className:"mb-3 sm:flex lg:mb-4 lg:mr-6",children:[((f=e==null?void 0:e[2])==null?void 0:f.image)&&(0,r.jsx)(q.Image,{className:"object-cover mb-3 mr-2 overflow-hidden rounded-ze sm:w-2/3 md:mb-0 md:rounded-3xl lg:rounded-br-none",sizes:"100vw",src:`${(w=e==null?void 0:e[2])==null?void 0:w.image}`,width:1050,height:701,alt:(u=(g=e==null?void 0:e[2])==null?void 0:g.alt)!=null?u:"header-image-3"}),((H=e==null?void 0:e[3])==null?void 0:H.image)&&(0,r.jsx)(q.Image,{className:"object-cover overflow-hidden rounded-ze sm:ml-2 sm:w-1/3 md:rounded-3xl lg:rounded-j-none",sizes:"100vw",src:`${(S=e==null?void 0:e[3])==null?void 0:S.image}`,width:941,height:734,alt:($=(F=e==null?void 0:e[3])==null?void 0:F.alt)!=null?$:"header-image-4"})]})]}):null}var G,Ce,j,Le,q,ze,je,De,r,V=N(()=>{"use strict";G=require("@stackshift-ui/button"),De=L(require("react"))});var Je={};P(Je,{Header_C:()=>J,default:()=>J});function J({videoLink:e,title:l,primaryButton:t,secondaryButton:i}){let o;return e&&(e.includes("embed")?o=e.split("/")[4]:o=e.split("/watch?v=")[1]||e.split("/")[3]),(0,r.jsx)(ze.Section,{className:"py-20 md:py-52 bg-background",children:(0,r.jsxs)(Ce.Container,{maxWidth:1280,children:[(0,r.jsxs)("div",{className:"max-w-2xl mx-auto mb-12 text-center md:mb-20",children:[l&&(0,r.jsx)(Le.Heading,{fontSize:"3xl",className:"mb-10",children:l}),(0,r.jsx)(Rl,{primaryButton:t,secondaryButton:i})]}),(0,r.jsx)("div",{className:"md:mx-20 lg:mx-60 ze:mx-60",children:o&&(0,r.jsx)(Ml,{videoLinkId:o,title:l})})]})})}function Ml({videoLinkId:e,title:l}){return(0,r.jsx)("div",{className:"aspect-video",children:(0,r.jsx)("iframe",{"aria-label":"Show Video Frame",className:"w-full W-full border-4 rounded-3xl border-primary",src:`https://www.youtube.com/embed/${e}`,srcDoc:`<style>*{padding:0;margin:0;overflow:hidden;border-radius:24px}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=${`https://www.youtube.com/embed/${e}`}><img src=${`https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp`} alt=${l} loading="lazy" /><span>\u25B6</span></a>`,loading:"lazy",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}function Rl({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",gap:4,justify:"center",className:"flex-col lg:flex-row",children:[(e==null?void 0:e.label)&&(0,r.jsx)(K.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(K.Button,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",children:l==null?void 0:l.label})]})}var K,Ce,j,Le,ze,r,X=N(()=>{"use strict";K=require("@stackshift-ui/button")});var ye={};P(ye,{Header_D:()=>Y,default:()=>Y});function Y({title:e,description:l,primaryButton:t,secondaryButton:i,mainImage:o}){return(0,r.jsx)(ze.Section,{className:"py-20 bg-background",children:(0,r.jsx)(Ce.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(j.Flex,{align:"center",className:"w-full basis-1/2",direction:"col",children:(0,r.jsxs)(Ce.Container,{className:"mx-auto items-center text-center lg:text-left",maxWidth:"md",children:[(0,r.jsx)(Wl,{title:e,description:l}),(0,r.jsx)(Al,{primaryButton:t,secondaryButton:i})]})}),(0,r.jsx)(ql,{mainImage:o})]})})})}function Wl({title:e,description:l}){return(0,r.jsxs)(Ze.default.Fragment,{children:[e?(0,r.jsx)(Le.Heading,{fontSize:"3xl",className:"mb-3",type:"h1",children:e}):null,l?(0,r.jsx)(je.Text,{className:"my-6",muted:!0,children:l}):null]})}function Al({primaryButton:e,secondaryButton:l}){var t,i;return(0,r.jsxs)(j.Flex,{align:"center",className:"flex items-center justify-center lg:justify-start gap-2 flex-col md:flex-row",gap:2,children:[e!=null&&e.label?(0,r.jsx)(Q.Button,{as:"link",link:e,ariaLabel:(t=e==null?void 0:e.ariaLabel)!=null?t:e==null?void 0:e.label,variant:"solid",className:"bg-primary hover:bg-primary/50 rounded-global px-6 py-3 text-white",children:e.label}):null,l!=null&&l.label?(0,r.jsx)(Q.Button,{as:"link",link:l,ariaLabel:(i=l.ariaLabel)!=null?i:l==null?void 0:l.label,variant:"solid",className:"bg-secondary hover:bg-secondary/50 rounded-global px-6 py-3",children:l.label}):null]})}function ql({mainImage:e}){var l;return e!=null&&e.image?(0,r.jsx)("div",{className:"w-full md:w-2/3 W-full mt-10 lg:mt-0",children:(0,r.jsx)(q.Image,{alt:(l=e.alt)!=null?l:"header-main-image",className:"rounded-md",height:700,sizes:"100vw",src:`${e==null?void 0:e.image}`,style:{objectFit:"contain"},width:1050})}):null}var Q,Ce,j,Le,q,ze,je,Ze,r,Z=N(()=>{"use strict";Q=require("@stackshift-ui/button"),Ze=L(require("react"))});var nl={};P(nl,{Header_E:()=>B,default:()=>B});function B({title:e,description:l,primaryButton:t,secondaryButton:i,formLinks:o,form:c}){return(0,r.jsx)(ze.Section,{className:"relative py-20 bg-background",children:(0,r.jsx)(Ce.Container,{maxWidth:1280,children:(0,r.jsxs)(j.Flex,{align:"center",className:"flex-col lg:flex-row",gap:4,children:[(0,r.jsx)(j.Flex,{align:"center",direction:"col",className:"w-full basis-1/2",children:(0,r.jsxs)("div",{className:"max-w-md mx-auto text-center lg:text-left",children:[(0,r.jsx)(Dl,{title:e,description:l}),(0,r.jsx)(El,{primaryButton:t,secondaryButton:i})]})}),(0,r.jsx)("div",{className:"w-full lg:w-1/2 mt-10 lg:mt-0",children:(0,r.jsx)("div",{className:"max-w-sm mx-auto text-center",children:(0,r.jsx)(tl.SigninSignup_A,{form:c,formLinks:o})})})]})})})}function Dl({title:e,description:l}){return(0,r.jsxs)(ol.default.Fragment,{children:[e&&(0,r.jsx)(Le.Heading,{fontSize:"3xl",className:"mb-3",children:e}),l&&(0,r.jsx)(je.Text,{muted:!0,className:"my-6",children:l})]})}function El({primaryButton:e,secondaryButton:l}){return(0,r.jsxs)(j.Flex,{align:"center",gap:2,className:"flex-col md:flex-row justify-center lg:justify-start",children:[(e==null?void 0:e.label)&&(0,r.jsx)(y.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,r.jsx)(y.Button,{as:"link",link:l,className:"bg-secondary hover:bg-secondary/50 inline-block rounded-global font-bold transition duration-200 px-6 py-3",ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})]})}var y,Ce,j,Le,ze,tl,je,ol,r,ee=N(()=>{"use strict";y=require("@stackshift-ui/button"),tl=require("@stackshift-ui/signin-signup"),ol=L(require("react"))});var a,rl,sl=N(()=>{"use strict";a=require("react/jsx-runtime"),rl=({className:e})=>({block:{h1:l=>(0,a.jsx)("h1",{className:`h1 ${e}`,children:l.children}),h2:l=>(0,a.jsx)("h2",{className:`h2 ${e}`,children:l.children}),h3:l=>(0,a.jsx)("h3",{className:`h3 ${e}`,children:l.children}),h4:l=>(0,a.jsx)("h4",{className:`h4 ${e}`,children:l.children}),normal:l=>(0,a.jsx)("r",{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${e}`,children:l.children}),blockquote:l=>(0,a.jsxs)("blockquote",{className:`my-5 px-14 leading-loose italic ${e}`,children:["- ",l.children]})},code:l=>(0,a.jsx)("pre",{"data-language":l.value.language,className:e,children:(0,a.jsx)("code",{children:l.value.code})}),list:{bullet:l=>(0,a.jsx)("ze",{className:`pl-4 list-disc font-light ${e}`,children:l.children}),number:l=>(0,a.jsx)("ol",{className:`pl-4 list-decimal font-light ${e}`,children:l.children})},listItem:{bullet:l=>(0,a.jsx)("li",{className:`font-light ${e}`,children:l.children})},marks:{strong:l=>(0,a.jsx)("strong",{className:`font-bold ${e}`,children:l.children}),em:l=>(0,a.jsx)("em",{className:e,children:l.children}),code:l=>(0,a.jsx)("code",{className:e,children:l.children}),link:l=>{var t,i,o;return(0,a.jsx)("a",{"aria-label":(i=(t=l.children)==null?void 0:t.toString())!=null?i:"external link",className:`underline underline-offset-2 decoration-gray-2 decoration-1 hover:decoration-2 ${e}`,href:(o=l.value)==null?void 0:o.href,target:"_blank",rel:"noopener noreferrer",children:l.children})}},types:{image:l=>(0,a.jsxs)("div",{className:`my-5 ${e}`,children:[(0,a.jsx)("img",{src:l.value.toString(),alt:l.value.alt||"Image",className:`w-full W-auto ${e}`}),l.value.caption&&(0,a.jsx)("r",{className:`text-center text-sm text-gray-600 ${e}`,children:l.value.caption})]})}})});var fl={};P(fl,{Header_F:()=>ie,default:()=>ie});function ie({title:e,mainImage:l,subtitle:t,subtitlePosition:i,headerSections:o,isFullWidth:c,spacing:d,isOrdered:k,startingPosition:v}){return(0,n.jsx)(ze.Section,{className:`relative pb-14 bg-white ${i==="top"&&"mt-[32px]"}`,children:(0,n.jsxs)("div",{style:{marginBottom:`${d}px`},className:`w-full mx-auto ${c?"":"max-w-[1548px] px-4"}`,children:[(e||t)&&(0,n.jsx)(Ol,{title:e,subtitle:t,subtitlePosition:i,mainImage:l}),(0,n.jsx)(j.Flex,{className:"flex-col",style:{gap:`${d}px`},children:o==null?void 0:o.map((f,w)=>{let g=v==="left"?w%2===0:w%2!==0;return f.isImageLeft=g,f.isFullWidth=c,f.index=w+1,f.isOrdered=k,(0,n.jsx)(Ql,{header:f,isImageLeft:g},f._key)})})]})})}var ml,al,j,Le,q,ze,je,pl,n,Gl,Ol,Vl,Kl,Jl,Xl,Ql,oe=N(()=>{"use strict";ml=require("@portabletext/react"),al=require("@stackshift-ui/button"),pl=require("react-icons/lia");sl();n=require("react/jsx-runtime"),Gl={lg:"min-W-[200px] sm:min-W-[400px] md:min-W-[600px] lg:min-W-[800px] ze:min-W-[1150px]",md:"min-W-[200px] sm:min-W-[400px] md:min-W-[500px] lg:min-W-[700px]",sm:"min-W-[200px] sm:min-W-[400px] md:min-W-[500px]"};Ol=({title:e,subtitle:l,subtitlePosition:t,mainImage:i})=>(0,n.jsxs)(j.Flex,{direction:"col",justify:"center",align:"center",gap:3,className:"mb-16",children:[t==="top"&&l&&(0,n.jsx)(je.Text,{className:"font-label tracking-[2.1px]",children:l}),e&&(0,n.jsx)(je.Text,{className:"text-2xl text-center sm:text-4xl font-normal font-heading-kb tracking-[6px] uppercase border-r border-black",children:e}),i&&(0,n.jsx)("div",{className:"relative W-80 max-W-[82px] w-full",children:(0,n.jsx)(q.Image,{src:i.image,alt:i.alt||"",className:"object-contain object-center"})}),t==="bottom"&&l?(0,n.jsx)(je.Text,{className:"font-label tracking-[2.1px]",children:l}):!t&&(0,n.jsx)(je.Text,{className:"font-label tracking-[2.1px]",children:l})]}),Vl=({image:e,height:l})=>(0,n.jsx)("div",{className:`relative w-full ${l?Gl[l]:""}`,style:{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),Kl=({header:e})=>{var l;return(0,n.jsx)("div",{className:"px-10 sm:px-20 md:px-30 lg:px-40 py-10",children:(0,n.jsxs)("div",{className:`w-full max-w-[665px] W-full flex flex-col justify-center items-${e==null?void 0:e.alignment} gap-20`,children:[((e==null?void 0:e.title)||(e==null?void 0:e.subtitle)||(e==null?void 0:e.imageTitle))&&(0,n.jsx)(Jl,{header:e}),(e==null?void 0:e.description)&&(0,n.jsx)(je.Text,{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${e!=null&&e.isFullWidth?"lg:text-[18px] lg:!leading-[30px] ze:text-[28px] ze:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`,children:e==null?void 0:e.description}),(e==null?void 0:e.columnContent)&&(0,n.jsx)(ml.PortableText,{value:e==null?void 0:e.columnContent,components:rl({className:`${e!=null&&e.isFullWidth?"lg:text-[18px] lg:!leading-[30px] ze:text-[28px] ze:!leading-[50px]":"lg:text-[18px] lg:!leading-[30px]"}`})}),((l=e==null?void 0:e.primaryButton)==null?void 0:l.label)&&(0,n.jsx)(Xl,{header:e})]})})},Jl=({header:e})=>(0,n.jsxs)("div",{children:[(e==null?void 0:e.isOrdered)&&(0,n.jsx)("div",{className:"border border-black w-fit text-center pb-2 pt-1 px-4 lg:px-6 mb-8",children:(0,n.jsx)(je.Text,{className:"font-normal font-heading-kb text-6xl min-w-[40px] lg:text-[82px] lg:min-w-[45px]",children:e==null?void 0:e.index})}),(0,n.jsxs)("div",{className:`text-${e==null?void 0:e.alignment}`,children:[(e==null?void 0:e.subtitle)&&(0,n.jsx)(je.Text,{className:"text-sm font-label tracking-[2px] mb-2",children:e==null?void 0:e.subtitle}),(e==null?void 0:e.title)&&(0,n.jsx)(Le.Heading,{className:`text-2xl sm:text-4xl lg:text-[40px] font-normal font-heading-kb uppercase tracking-[6px] !leading-[60px] ${e!=null&&e.isFullWidth?"border-r border-black w-fit pb-3":""}`,children:e==null?void 0:e.title}),(e==null?void 0:e.imageTitle)&&(0,n.jsxs)("div",{className:"relative w-fit",children:[(0,n.jsx)(q.Image,{src:e==null?void 0:e.imageTitle,alt:"",width:497,height:32,className:"object-contain object-left"}),(0,n.jsx)("div",{className:"absolute bottom-[-25px] left-0 right-[0] border-r border-black"})]})]})]}),Xl=({header:e})=>{var l,t,i;return(0,n.jsx)("div",{className:`flex justify-${e==null?void 0:e.alignment} gap-4`,children:((l=e==null?void 0:e.primaryButton)==null?void 0:l.label)&&(0,n.jsx)(al.Button,{as:"link",link:e==null?void 0:e.primaryButton,ariaLabel:(t=e==null?void 0:e.primaryButton)==null?void 0:t.label,className:"border border-black px-14 py-3.5 text-sm",children:(0,n.jsxs)("span",{className:"flex items-center gap-2 font-label text-sm font-normal uppercase tracking-widest",children:[(i=e==null?void 0:e.primaryButton)==null?void 0:i.label," ",(0,n.jsx)(pl.LiaLongArrowAltRightSolid,{})]})})})},Ql=({header:e,isImageLeft:l})=>{var t;return(0,n.jsxs)("div",{className:`bg-light-kb w-full W-full flex flex-col items-center justify-center md:flex-row ${l?"":"md:flex-row-reverse"}`,children:[((t=e==null?void 0:e.mainImage)==null?void 0:t.image)&&(0,n.jsx)(Vl,{image:e.mainImage.image,height:e.imageHeight}),(0,n.jsx)("div",{className:"w-full flex justify-center",children:(0,n.jsx)(Kl,{header:e})})]})}});var wl={};P(wl,{Header_G:()=>re,default:()=>re});function re({images:e,title:l,description:t,primaryButton:i,secondaryButton:o,position:c="center"}){if(!(e!=null&&e.length))return null;let[d,k]=(0,W.useState)(0),v=e[d];(0,W.useEffect)(()=>{let g=setInterval(()=>{k(u=>(u+1)%e.length)},5e3);return()=>clearInterval(g)},[e.length]);let f=g=>{k(g)},w=()=>{switch(c){case"left":return"items-start text-left";case"right":return"items-end text-right";default:return"items-center text-center"}};return(0,r.jsx)(ze.Section,{children:(0,r.jsxs)("div",{className:"relative w-full W-[80vh] overflow-hidden",children:[v.video?(0,r.jsx)("video",{className:"absolute inset-0 w-full W-full object-cover",src:v.video,autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):(0,r.jsx)("div",{className:"absolute inset-0 w-full W-full bg-cover bg-center",style:{backgroundImage:`url(${v.image})`}}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 z-0"}),(0,r.jsx)("div",{className:`relative z-10 flex r-8 justify-${c==="right"?"end":c} items-center W-full`,children:(0,r.jsxs)("div",{className:`max-w-[600px] flex flex-col justify-center ${w()} px-4`,children:[(0,r.jsx)(Le.Heading,{className:"text-white uppercase mb-10",children:l!=null&&l.includes("Introducing")?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"md:text-3xl text-2xl",children:l.split(" ").slice(0,1).join(" ")}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:l.split(" ").slice(1).join(" ")})]}):l}),t&&(0,r.jsx)(je.Text,{className:"text-white mb-10",children:t}),(0,r.jsxs)(j.Flex,{justify:c==="center"?"center":c==="right"?"end":"start",direction:"row",align:"center",wrap:!0,gap:4,children:[(i==null?void 0:i.label)&&(0,r.jsx)(ne.Button,{as:"link",link:i,ariaLabel:i==null?void 0:i.ariaLabel,variant:"solid",className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-primary transition-all duration-500 ease-in-out",children:i.label}),(o==null?void 0:o.label)&&(0,r.jsx)(ne.Button,{as:"link",link:o,variant:"solid",ariaLabel:o==null?void 0:o.ariaLabel,className:"text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-secondary transition-all duration-500 ease-in-out",children:o.label})]})]})}),(0,r.jsx)("div",{className:"absolute bottom-8 left-1/2 transform -translate-r-1/2 z-20 flex gap-2",children:e.map((g,u)=>(0,r.jsx)(dl.SwiperPagination,{colorScheme:"white",isActive:u===d,onClick:()=>f(u),ariaLabel:`Go to slide ${u+1}`},u))})]})})}var ne,j,Le,ze,dl,je,W,r,se=N(()=>{"use strict";ne=require("@stackshift-ui/button"),dl=require("@stackshift-ui/swiper-pagination"),W=require("react")});var Zl={};P(Zl,{Header:()=>kl,Header_A:()=>D,Header_B:()=>O,Header_C:()=>J,Header_D:()=>Y,Header_E:()=>B,Header_F:()=>ie,Header_G:()=>re});module.exports=Fl(Zl);var Ul={variant_a:(0,W.lazy)(()=>Promise.resolve().then(()=>(E(),Me))),variant_b:(0,W.lazy)(()=>Promise.resolve().then(()=>(V(),Ee))),variant_c:(0,W.lazy)(()=>Promise.resolve().then(()=>(X(),Je))),variant_d:(0,W.lazy)(()=>Promise.resolve().then(()=>(Z(),ye))),variant_e:(0,W.lazy)(()=>Promise.resolve().then(()=>(ee(),nl))),variant_f:(0,W.lazy)(()=>Promise.resolve().then(()=>(oe(),fl))),variant_g:(0,W.lazy)(()=>Promise.resolve().then(()=>(se(),wl)))},Yl="Header",kl=({data:e})=>{var o,c,d,k,v,f,w,g,u,H,S,F,$,me,ae,ce,xe,pe,fe,be,ge,ue,de,ve,we,ke,Ne,Pe,Te,he,He,Se,Fe,$e;let l=e==null?void 0:e.variant,t=l&&Ul[l],i={mainImage:(c=(o=e==null?void 0:e.variants)==null?void 0:o.mainImage)!=null?c:void 0,images:(k=(d=e==null?void 0:e.variants)==null?void 0:d.images)!=null?k:void 0,title:(f=(v=e==null?void 0:e.variants)==null?void 0:v.title)!=null?f:void 0,subtitle:(g=(w=e==null?void 0:e.variants)==null?void 0:w.subtitle)!=null?g:void 0,description:(H=(u=e==null?void 0:e.variants)==null?void 0:u.description)!=null?H:void 0,primaryButton:(F=(S=e==null?void 0:e.variants)==null?void 0:S.primaryButton)!=null?F:void 0,secondaryButton:(me=($=e==null?void 0:e.variants)==null?void 0:$.secondaryButton)!=null?me:void 0,videoLink:(ce=(ae=e==null?void 0:e.variants)==null?void 0:ae.youtubeLink)!=null?ce:void 0,formLinks:(pe=(xe=e==null?void 0:e.variants)==null?void 0:xe.formLinks)!=null?pe:void 0,form:(be=(fe=e==null?void 0:e.variants)==null?void 0:fe.form)!=null?be:void 0,spacing:(ue=(ge=e==null?void 0:e.variants)==null?void 0:ge.spacing)!=null?ue:void 0,isOrdered:(ve=(de=e==null?void 0:e.variants)==null?void 0:de.isOrdered)!=null?ve:void 0,startingPosition:(ke=(we=e==null?void 0:e.variants)==null?void 0:we.startingPosition)!=null?ke:void 0,headerSections:(Pe=(Ne=e==null?void 0:e.variants)==null?void 0:Ne.headerSections)!=null?Pe:void 0,subtitlePosition:(he=(Te=e==null?void 0:e.variants)==null?void 0:Te.subtitlePosition)!=null?he:void 0,isFullWidth:(Se=(He=e==null?void 0:e.variants)==null?void 0:He.isFullWidth)!=null?Se:void 0,position:($e=(Fe=e==null?void 0:e.variants)==null?void 0:Fe.position)!=null?$e:void 0};return t?(0,r.jsx)(t,{...i}):null};kl.displayName=Yl;E();V();X();Z();ee();oe();se();0&&(module.exports={Header,Header_A,Header_B,Header_C,Header_D,Header_E,Header_F,Header_G});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as
|
|
2
|
+
"use strict";import{a as p}from"./chunk-E3ZU2IYJ.mjs";import{a as x}from"./chunk-G7FVEHHV.mjs";import{a as o}from"./chunk-7SQGIFHM.mjs";import{a as r}from"./chunk-KCZJVXVR.mjs";import{a as e}from"./chunk-DN6UM2LP.mjs";import{a as t}from"./chunk-IZSK2OAC.mjs";import{a as f}from"./chunk-O23POPQC.mjs";import{a as m}from"./chunk-GFZNPSBY.mjs";import"./chunk-W2QPS3BW.mjs";export{x as Header,o as Header_A,r as Header_B,e as Header_C,t as Header_D,f as Header_E,m as Header_F,p as Header_G};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PortableTextComponents } from "@portabletext/react";
|
|
2
|
+
import { ButtonProps } from "./header";
|
|
1
3
|
export type StyleVariants<T extends string> = Record<T, string>;
|
|
2
4
|
export type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
|
|
3
5
|
export interface MainImage {
|
|
@@ -30,7 +32,8 @@ export interface Logo extends ConditionalLink {
|
|
|
30
32
|
image?: string;
|
|
31
33
|
}
|
|
32
34
|
export interface Images {
|
|
33
|
-
image?: string;
|
|
35
|
+
image?: string | null;
|
|
36
|
+
video?: string | null;
|
|
34
37
|
_key?: string;
|
|
35
38
|
_type?: string;
|
|
36
39
|
alt?: string;
|
|
@@ -168,6 +171,7 @@ export interface Variants {
|
|
|
168
171
|
multipleMenus?: any;
|
|
169
172
|
arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
|
|
170
173
|
logo?: Logo | null;
|
|
174
|
+
imageSrc?: string | null;
|
|
171
175
|
primaryButton?: LabeledRoute | null;
|
|
172
176
|
secondaryButton?: LabeledRoute | null;
|
|
173
177
|
routes?: LabeledRouteWithKey[] | null;
|
|
@@ -181,6 +185,7 @@ export interface Variants {
|
|
|
181
185
|
signinLink?: LabeledRoute | null;
|
|
182
186
|
tags?: string[] | null;
|
|
183
187
|
posts?: BlogPost[] | null;
|
|
188
|
+
position?: "left" | "center" | "right";
|
|
184
189
|
blogsPerPage?: number | null;
|
|
185
190
|
form?: Form | null;
|
|
186
191
|
collections?: Collection | null;
|
|
@@ -233,6 +238,33 @@ export interface Variants {
|
|
|
233
238
|
consentModalPosition?: string;
|
|
234
239
|
};
|
|
235
240
|
contactLink?: LabeledRoute;
|
|
241
|
+
isFullWidth?: boolean;
|
|
242
|
+
subtitlePosition?: "top" | "bottom";
|
|
243
|
+
spacing?: number;
|
|
244
|
+
isOrdered?: boolean;
|
|
245
|
+
startingPosition?: "left" | "right";
|
|
246
|
+
headerSections?: HeaderSections[];
|
|
247
|
+
}
|
|
248
|
+
export interface HeaderBox extends HeaderSections {
|
|
249
|
+
isImageLeft?: boolean;
|
|
250
|
+
isFullWidth?: boolean;
|
|
251
|
+
index?: number;
|
|
252
|
+
isOrdered?: boolean;
|
|
253
|
+
}
|
|
254
|
+
export interface HeaderSections {
|
|
255
|
+
_key: string;
|
|
256
|
+
title?: string;
|
|
257
|
+
subtitle?: string;
|
|
258
|
+
description?: string;
|
|
259
|
+
mainImage?: {
|
|
260
|
+
image: any;
|
|
261
|
+
alt?: string;
|
|
262
|
+
};
|
|
263
|
+
imageTitle?: any;
|
|
264
|
+
alignment?: string;
|
|
265
|
+
imageHeight?: "sm" | "md" | "lg";
|
|
266
|
+
columnContent?: any;
|
|
267
|
+
primaryButton?: ButtonProps;
|
|
236
268
|
}
|
|
237
269
|
export interface Template {
|
|
238
270
|
bg?: string;
|
|
@@ -359,4 +391,12 @@ export declare interface Reference {
|
|
|
359
391
|
};
|
|
360
392
|
};
|
|
361
393
|
}
|
|
394
|
+
export type MyPortableTextComponents = PortableTextComponents & {
|
|
395
|
+
code?: ({ value }: {
|
|
396
|
+
value: {
|
|
397
|
+
language?: string;
|
|
398
|
+
code?: string;
|
|
399
|
+
};
|
|
400
|
+
}) => JSX.Element;
|
|
401
|
+
};
|
|
362
402
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var b=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},m=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of i(e))!P.call(t,l)&&l!==r&&a(t,l,{get:()=>e[l],enumerable:!(n=c(e,l))||n.enumerable});return t};var x=t=>m(a({},"__esModule",{value:!0}),t);var p={};b(p,{customBlockStyle:()=>h});module.exports=x(p);var o=require("react/jsx-runtime"),h=({className:t})=>({block:{h1:e=>(0,o.jsx)("h1",{className:`h1 ${t}`,children:e.children}),h2:e=>(0,o.jsx)("h2",{className:`h2 ${t}`,children:e.children}),h3:e=>(0,o.jsx)("h3",{className:`h3 ${t}`,children:e.children}),h4:e=>(0,o.jsx)("h4",{className:`h4 ${t}`,children:e.children}),normal:e=>(0,o.jsx)("p",{className:`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${t}`,children:e.children}),blockquote:e=>(0,o.jsxs)("blockquote",{className:`my-5 px-14 leading-loose italic ${t}`,children:["- ",e.children]})},code:e=>(0,o.jsx)("pre",{"data-language":e.value.language,className:t,children:(0,o.jsx)("code",{children:e.value.code})}),list:{bullet:e=>(0,o.jsx)("ul",{className:`pl-4 list-disc font-light ${t}`,children:e.children}),number:e=>(0,o.jsx)("ol",{className:`pl-4 list-decimal font-light ${t}`,children:e.children})},listItem:{bullet:e=>(0,o.jsx)("li",{className:`font-light ${t}`,children:e.children})},marks:{strong:e=>(0,o.jsx)("strong",{className:`font-bold ${t}`,children:e.children}),em:e=>(0,o.jsx)("em",{className:t,children:e.children}),code:e=>(0,o.jsx)("code",{className:t,children:e.children}),link:e=>{var r,n,l;return(0,o.jsx)("a",{"aria-label":(n=(r=e.children)==null?void 0:r.toString())!=null?n:"external link",className:`underline underline-offset-2 decoration-gray-2 decoration-1 hover:decoration-2 ${t}`,href:(l=e.value)==null?void 0:l.href,target:"_blank",rel:"noopener noreferrer",children:e.children})}},types:{image:e=>(0,o.jsxs)("div",{className:`my-5 ${t}`,children:[(0,o.jsx)("img",{src:e.value.toString(),alt:e.value.alt||"Image",className:`w-full h-auto ${t}`}),e.value.caption&&(0,o.jsx)("p",{className:`text-center text-sm text-gray-600 ${t}`,children:e.value.caption})]})}});0&&(module.exports={customBlockStyle});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-W2QPS3BW.mjs";export{a as customBlockStyle};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/header",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.1.0-alpha.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -33,23 +33,27 @@
|
|
|
33
33
|
"@stackshift-ui/typescript-config": "6.0.10"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@portabletext/react": "^3.1.0",
|
|
37
|
+
"react-icons": "^5.3.0",
|
|
36
38
|
"@stackshift-ui/button": "6.0.11",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/heading": "6.0.11",
|
|
39
|
+
"@stackshift-ui/image": "6.0.11",
|
|
39
40
|
"@stackshift-ui/scripts": "6.0.10",
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/container": "6.0.11",
|
|
41
|
+
"@stackshift-ui/heading": "6.0.11",
|
|
42
|
+
"@stackshift-ui/flex": "6.0.11",
|
|
43
43
|
"@stackshift-ui/section": "6.0.11",
|
|
44
|
-
"@stackshift-ui/
|
|
45
|
-
"@stackshift-ui/
|
|
44
|
+
"@stackshift-ui/system": "6.0.11",
|
|
45
|
+
"@stackshift-ui/container": "6.0.11",
|
|
46
|
+
"@stackshift-ui/text": "6.0.11",
|
|
47
|
+
"@stackshift-ui/swiper-pagination": "6.0.11",
|
|
48
|
+
"@stackshift-ui/link": "6.0.11",
|
|
49
|
+
"@stackshift-ui/signin-signup": "6.0.14"
|
|
46
50
|
},
|
|
47
51
|
"peerDependencies": {
|
|
52
|
+
"@stackshift-ui/system": ">=6.0.11",
|
|
48
53
|
"@types/react": "16.8 - 19",
|
|
49
54
|
"next": "10 - 14",
|
|
50
55
|
"react": "16.8 - 19",
|
|
51
|
-
"react-dom": "16.8 - 19"
|
|
52
|
-
"@stackshift-ui/system": ">=6.0.11"
|
|
56
|
+
"react-dom": "16.8 - 19"
|
|
53
57
|
},
|
|
54
58
|
"peerDependenciesMeta": {
|
|
55
59
|
"next": {
|
package/src/header.tsx
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { lazy } from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Form,
|
|
5
|
+
HeaderSections,
|
|
6
|
+
Images,
|
|
7
|
+
LabeledRoute,
|
|
8
|
+
LabeledRouteWithKey,
|
|
9
|
+
MainImage,
|
|
10
|
+
SectionsProps,
|
|
11
|
+
Template,
|
|
12
|
+
} from "./types";
|
|
4
13
|
|
|
5
14
|
const Variants = {
|
|
6
15
|
variant_a: lazy(() => import("./header_a")),
|
|
@@ -8,6 +17,8 @@ const Variants = {
|
|
|
8
17
|
variant_c: lazy(() => import("./header_c")),
|
|
9
18
|
variant_d: lazy(() => import("./header_d")),
|
|
10
19
|
variant_e: lazy(() => import("./header_e")),
|
|
20
|
+
variant_f: lazy(() => import("./header_f")),
|
|
21
|
+
variant_g: lazy(() => import("./header_g")),
|
|
11
22
|
};
|
|
12
23
|
|
|
13
24
|
export interface ButtonProps {
|
|
@@ -26,12 +37,20 @@ export interface HeaderProps {
|
|
|
26
37
|
mainImage?: MainImage;
|
|
27
38
|
images?: Images[];
|
|
28
39
|
title?: string;
|
|
40
|
+
subtitle?: string;
|
|
29
41
|
description?: string;
|
|
30
42
|
primaryButton?: ButtonProps;
|
|
31
43
|
secondaryButton?: ButtonProps;
|
|
32
44
|
videoLink?: string;
|
|
33
45
|
formLinks?: LabeledRouteWithKey[];
|
|
34
46
|
form?: Form;
|
|
47
|
+
isFullWidth?: boolean;
|
|
48
|
+
subtitlePosition?: "top" | "bottom";
|
|
49
|
+
position?: "left" | "center" | "right";
|
|
50
|
+
spacing?: number;
|
|
51
|
+
isOrdered?: boolean;
|
|
52
|
+
startingPosition?: "left" | "right";
|
|
53
|
+
headerSections?: HeaderSections[];
|
|
35
54
|
}
|
|
36
55
|
|
|
37
56
|
const displayName = "Header";
|
|
@@ -44,12 +63,20 @@ export const Header: React.FC<SectionsProps> = ({ data }) => {
|
|
|
44
63
|
mainImage: data?.variants?.mainImage ?? undefined,
|
|
45
64
|
images: data?.variants?.images ?? undefined,
|
|
46
65
|
title: data?.variants?.title ?? undefined,
|
|
66
|
+
subtitle: data?.variants?.subtitle ?? undefined,
|
|
47
67
|
description: data?.variants?.description ?? undefined,
|
|
48
68
|
primaryButton: data?.variants?.primaryButton ?? undefined,
|
|
49
69
|
secondaryButton: data?.variants?.secondaryButton ?? undefined,
|
|
50
70
|
videoLink: data?.variants?.youtubeLink ?? undefined,
|
|
51
71
|
formLinks: data?.variants?.formLinks ?? undefined,
|
|
52
72
|
form: data?.variants?.form ?? undefined,
|
|
73
|
+
spacing: data?.variants?.spacing ?? undefined,
|
|
74
|
+
isOrdered: data?.variants?.isOrdered ?? undefined,
|
|
75
|
+
startingPosition: data?.variants?.startingPosition ?? undefined,
|
|
76
|
+
headerSections: data?.variants?.headerSections ?? undefined,
|
|
77
|
+
subtitlePosition: data?.variants?.subtitlePosition ?? undefined,
|
|
78
|
+
isFullWidth: data?.variants?.isFullWidth ?? undefined,
|
|
79
|
+
position: data?.variants?.position ?? undefined,
|
|
53
80
|
};
|
|
54
81
|
|
|
55
82
|
return Variant ? <Variant {...props} /> : null;
|
package/src/header_f.tsx
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { PortableText } from "@portabletext/react";
|
|
2
|
+
import { Button } from "@stackshift-ui/button";
|
|
3
|
+
import { Flex } from "@stackshift-ui/flex";
|
|
4
|
+
import { Heading } from "@stackshift-ui/heading";
|
|
5
|
+
import { Image } from "@stackshift-ui/image";
|
|
6
|
+
import { Section } from "@stackshift-ui/section";
|
|
7
|
+
import { Text } from "@stackshift-ui/text";
|
|
8
|
+
import { LiaLongArrowAltRightSolid } from "react-icons/lia";
|
|
9
|
+
import { customBlockStyle } from "./utils/portableText/customBlockStyle";
|
|
10
|
+
|
|
11
|
+
import { HeaderProps } from ".";
|
|
12
|
+
import { HeaderBox, HeaderSections } from "./types";
|
|
13
|
+
|
|
14
|
+
// Constants
|
|
15
|
+
const IMAGE_HEIGHT_CLASSES = {
|
|
16
|
+
lg: "min-h-[200px] sm:min-h-[400px] md:min-h-[600px] lg:min-h-[800px] xl:min-h-[1150px]",
|
|
17
|
+
md: "min-h-[200px] sm:min-h-[400px] md:min-h-[500px] lg:min-h-[700px]",
|
|
18
|
+
sm: "min-h-[200px] sm:min-h-[400px] md:min-h-[500px]",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default function Header_F({
|
|
22
|
+
title,
|
|
23
|
+
mainImage,
|
|
24
|
+
subtitle,
|
|
25
|
+
subtitlePosition,
|
|
26
|
+
headerSections,
|
|
27
|
+
isFullWidth,
|
|
28
|
+
spacing,
|
|
29
|
+
isOrdered,
|
|
30
|
+
startingPosition,
|
|
31
|
+
}: HeaderProps) {
|
|
32
|
+
return (
|
|
33
|
+
<Section className={`relative pb-14 bg-white ${subtitlePosition === "top" && "mt-[32px]"}`}>
|
|
34
|
+
<div
|
|
35
|
+
style={{ marginBottom: `${spacing}px` }}
|
|
36
|
+
className={`w-full mx-auto ${!isFullWidth ? "max-w-[1548px] px-4" : ""}`}>
|
|
37
|
+
{(title || subtitle) && (
|
|
38
|
+
<HeaderTitle
|
|
39
|
+
title={title}
|
|
40
|
+
subtitle={subtitle}
|
|
41
|
+
subtitlePosition={subtitlePosition}
|
|
42
|
+
mainImage={mainImage}
|
|
43
|
+
/>
|
|
44
|
+
)}
|
|
45
|
+
<Flex className="flex-col" style={{ gap: `${spacing}px` }}>
|
|
46
|
+
{headerSections?.map((header: HeaderBox, index: number) => {
|
|
47
|
+
const isImageLeft = startingPosition === "left" ? index % 2 === 0 : index % 2 !== 0;
|
|
48
|
+
header.isImageLeft = isImageLeft;
|
|
49
|
+
header.isFullWidth = isFullWidth;
|
|
50
|
+
header.index = index + 1;
|
|
51
|
+
header.isOrdered = isOrdered;
|
|
52
|
+
return <HeaderItem header={header} key={header._key} isImageLeft={isImageLeft} />;
|
|
53
|
+
})}
|
|
54
|
+
</Flex>
|
|
55
|
+
</div>
|
|
56
|
+
</Section>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const HeaderTitle = ({
|
|
61
|
+
title,
|
|
62
|
+
subtitle,
|
|
63
|
+
subtitlePosition,
|
|
64
|
+
mainImage,
|
|
65
|
+
}: {
|
|
66
|
+
title?: string;
|
|
67
|
+
subtitle?: string;
|
|
68
|
+
subtitlePosition?: string;
|
|
69
|
+
mainImage?: { image: string; alt?: string };
|
|
70
|
+
}) => (
|
|
71
|
+
<Flex direction="col" justify="center" align="center" gap={3} className="mb-16">
|
|
72
|
+
{subtitlePosition === "top" && subtitle && (
|
|
73
|
+
<Text className="font-label tracking-[2.1px]">{subtitle}</Text>
|
|
74
|
+
)}
|
|
75
|
+
{title && (
|
|
76
|
+
<Text className="text-2xl text-center sm:text-4xl font-normal font-heading-kb tracking-[6px] uppercase border-b border-black">
|
|
77
|
+
{title}
|
|
78
|
+
</Text>
|
|
79
|
+
)}
|
|
80
|
+
{mainImage && (
|
|
81
|
+
<div className="relative h-80 max-h-[82px] w-full">
|
|
82
|
+
<Image
|
|
83
|
+
src={mainImage.image}
|
|
84
|
+
alt={mainImage.alt || ""}
|
|
85
|
+
className="object-contain object-center"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
{subtitlePosition === "bottom" && subtitle ? (
|
|
90
|
+
<Text className="font-label tracking-[2.1px]">{subtitle}</Text>
|
|
91
|
+
) : (
|
|
92
|
+
!subtitlePosition && <Text className="font-label tracking-[2.1px]">{subtitle}</Text>
|
|
93
|
+
)}
|
|
94
|
+
</Flex>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
const HeaderImage = ({ image, height }: { image: string; height?: "sm" | "md" | "lg" }) => (
|
|
98
|
+
<div
|
|
99
|
+
className={`relative w-full ${height ? IMAGE_HEIGHT_CLASSES[height] : ""}`}
|
|
100
|
+
style={{
|
|
101
|
+
backgroundImage: `url(${image})`,
|
|
102
|
+
backgroundSize: "cover",
|
|
103
|
+
backgroundPosition: "center",
|
|
104
|
+
backgroundRepeat: "no-repeat",
|
|
105
|
+
}}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
const HeaderContent = ({ header }: { header: HeaderBox }) => (
|
|
110
|
+
<div className="px-10 sm:px-20 md:px-30 lg:px-40 py-10">
|
|
111
|
+
<div
|
|
112
|
+
className={`w-full max-w-[665px] h-full flex flex-col justify-center items-${header?.alignment} gap-20`}>
|
|
113
|
+
{(header?.title || header?.subtitle || header?.imageTitle) && (
|
|
114
|
+
<HeaderTitleSection header={header} />
|
|
115
|
+
)}
|
|
116
|
+
{header?.description && (
|
|
117
|
+
<Text
|
|
118
|
+
className={`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${
|
|
119
|
+
header?.isFullWidth
|
|
120
|
+
? "lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]"
|
|
121
|
+
: "lg:text-[18px] lg:!leading-[30px]"
|
|
122
|
+
}`}>
|
|
123
|
+
{header?.description}
|
|
124
|
+
</Text>
|
|
125
|
+
)}
|
|
126
|
+
{header?.columnContent && (
|
|
127
|
+
<PortableText
|
|
128
|
+
value={header?.columnContent}
|
|
129
|
+
components={customBlockStyle({
|
|
130
|
+
className: `${
|
|
131
|
+
header?.isFullWidth
|
|
132
|
+
? "lg:text-[18px] lg:!leading-[30px] xl:text-[28px] xl:!leading-[50px]"
|
|
133
|
+
: "lg:text-[18px] lg:!leading-[30px]"
|
|
134
|
+
}`,
|
|
135
|
+
})}
|
|
136
|
+
/>
|
|
137
|
+
)}
|
|
138
|
+
{header?.primaryButton?.label && <HeaderButton header={header} />}
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const HeaderTitleSection = ({ header }: { header: HeaderBox }) => (
|
|
144
|
+
<div>
|
|
145
|
+
{header?.isOrdered && (
|
|
146
|
+
<div className="border border-black w-fit text-center pb-2 pt-1 px-4 lg:px-6 mb-8">
|
|
147
|
+
<Text className="font-normal font-heading-kb text-6xl min-w-[40px] lg:text-[82px] lg:min-w-[45px]">
|
|
148
|
+
{header?.index}
|
|
149
|
+
</Text>
|
|
150
|
+
</div>
|
|
151
|
+
)}
|
|
152
|
+
<div className={`text-${header?.alignment}`}>
|
|
153
|
+
{header?.subtitle && (
|
|
154
|
+
<Text className="text-sm font-label tracking-[2px] mb-2">{header?.subtitle}</Text>
|
|
155
|
+
)}
|
|
156
|
+
{header?.title && (
|
|
157
|
+
<Heading
|
|
158
|
+
className={`text-2xl sm:text-4xl lg:text-[40px] font-normal font-heading-kb uppercase tracking-[6px] !leading-[60px] ${
|
|
159
|
+
header?.isFullWidth ? "border-b border-black w-fit pb-3" : ""
|
|
160
|
+
}`}>
|
|
161
|
+
{header?.title}
|
|
162
|
+
</Heading>
|
|
163
|
+
)}
|
|
164
|
+
{header?.imageTitle && (
|
|
165
|
+
<div className="relative w-fit">
|
|
166
|
+
<Image
|
|
167
|
+
src={header?.imageTitle}
|
|
168
|
+
alt={""}
|
|
169
|
+
width={497}
|
|
170
|
+
height={32}
|
|
171
|
+
className="object-contain object-left"
|
|
172
|
+
/>
|
|
173
|
+
<div className="absolute bottom-[-25px] left-0 right-[0] border-b border-black" />
|
|
174
|
+
</div>
|
|
175
|
+
)}
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
const HeaderButton = ({ header }: { header: HeaderSections }) => (
|
|
181
|
+
<div className={`flex justify-${header?.alignment} gap-4`}>
|
|
182
|
+
{header?.primaryButton?.label && (
|
|
183
|
+
<Button
|
|
184
|
+
as="link"
|
|
185
|
+
link={header?.primaryButton}
|
|
186
|
+
ariaLabel={header?.primaryButton?.label}
|
|
187
|
+
className="border border-black px-14 py-3.5 text-sm">
|
|
188
|
+
<span className="flex items-center gap-2 font-label text-sm font-normal uppercase tracking-widest">
|
|
189
|
+
{header?.primaryButton?.label} <LiaLongArrowAltRightSolid />
|
|
190
|
+
</span>
|
|
191
|
+
</Button>
|
|
192
|
+
)}
|
|
193
|
+
</div>
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
const HeaderItem = ({ header, isImageLeft }: { header: HeaderSections; isImageLeft: boolean }) => (
|
|
197
|
+
<div
|
|
198
|
+
className={`bg-light-kb w-full h-full flex flex-col items-center justify-center md:flex-row ${
|
|
199
|
+
!isImageLeft ? "md:flex-row-reverse" : ""
|
|
200
|
+
}`}>
|
|
201
|
+
{header?.mainImage?.image && (
|
|
202
|
+
<HeaderImage image={header.mainImage.image} height={header.imageHeight} />
|
|
203
|
+
)}
|
|
204
|
+
<div className="w-full flex justify-center">
|
|
205
|
+
<HeaderContent header={header} />
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
export { Header_F };
|
package/src/header_g.tsx
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Button } from "@stackshift-ui/button";
|
|
2
|
+
import { Flex } from "@stackshift-ui/flex";
|
|
3
|
+
import { Heading } from "@stackshift-ui/heading";
|
|
4
|
+
import { Section } from "@stackshift-ui/section";
|
|
5
|
+
import { SwiperPagination } from "@stackshift-ui/swiper-pagination";
|
|
6
|
+
import { Text } from "@stackshift-ui/text";
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
import { HeaderProps } from ".";
|
|
9
|
+
|
|
10
|
+
export default function Header_G({
|
|
11
|
+
images,
|
|
12
|
+
title,
|
|
13
|
+
description,
|
|
14
|
+
primaryButton,
|
|
15
|
+
secondaryButton,
|
|
16
|
+
position = "center",
|
|
17
|
+
}: HeaderProps) {
|
|
18
|
+
if (!images?.length) return null;
|
|
19
|
+
|
|
20
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
21
|
+
const currentItem = images[currentIndex];
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const timer = setInterval(() => {
|
|
25
|
+
setCurrentIndex(prevIndex => (prevIndex + 1) % images.length);
|
|
26
|
+
}, 5000);
|
|
27
|
+
|
|
28
|
+
return () => clearInterval(timer);
|
|
29
|
+
}, [images.length]);
|
|
30
|
+
|
|
31
|
+
const handleSlideChange = (index: number) => {
|
|
32
|
+
setCurrentIndex(index);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getAlignmentClasses = () => {
|
|
36
|
+
switch (position) {
|
|
37
|
+
case "left":
|
|
38
|
+
return "items-start text-left";
|
|
39
|
+
case "right":
|
|
40
|
+
return "items-end text-right";
|
|
41
|
+
default:
|
|
42
|
+
return "items-center text-center";
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<Section>
|
|
48
|
+
<div className="relative w-full h-[80vh] overflow-hidden">
|
|
49
|
+
{currentItem.video ? (
|
|
50
|
+
<video
|
|
51
|
+
className="absolute inset-0 w-full h-full object-cover"
|
|
52
|
+
src={currentItem.video}
|
|
53
|
+
autoPlay
|
|
54
|
+
loop
|
|
55
|
+
muted
|
|
56
|
+
playsInline
|
|
57
|
+
/>
|
|
58
|
+
) : (
|
|
59
|
+
<div
|
|
60
|
+
className="absolute inset-0 w-full h-full bg-cover bg-center"
|
|
61
|
+
style={{ backgroundImage: `url(${currentItem.image})` }}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
<div className="absolute inset-0 bg-black bg-opacity-50 z-0" />
|
|
66
|
+
|
|
67
|
+
<div
|
|
68
|
+
className={`relative z-10 flex p-8 justify-${position === "right" ? "end" : position} items-center h-full`}>
|
|
69
|
+
<div
|
|
70
|
+
className={`max-w-[600px] flex flex-col justify-center ${getAlignmentClasses()} px-4`}>
|
|
71
|
+
<Heading className="text-white uppercase mb-10">
|
|
72
|
+
{title?.includes("Introducing") ? (
|
|
73
|
+
<>
|
|
74
|
+
<span className="md:text-3xl text-2xl">
|
|
75
|
+
{title.split(" ").slice(0, 1).join(" ")}
|
|
76
|
+
</span>
|
|
77
|
+
<br />
|
|
78
|
+
<span>{title.split(" ").slice(1).join(" ")}</span>
|
|
79
|
+
</>
|
|
80
|
+
) : (
|
|
81
|
+
title
|
|
82
|
+
)}
|
|
83
|
+
</Heading>
|
|
84
|
+
{description && <Text className="text-white mb-10">{description}</Text>}
|
|
85
|
+
<Flex
|
|
86
|
+
justify={position === "center" ? "center" : position === "right" ? "end" : "start"}
|
|
87
|
+
direction="row"
|
|
88
|
+
align="center"
|
|
89
|
+
wrap
|
|
90
|
+
gap={4}>
|
|
91
|
+
{primaryButton?.label && (
|
|
92
|
+
<Button
|
|
93
|
+
as="link"
|
|
94
|
+
link={primaryButton}
|
|
95
|
+
ariaLabel={primaryButton?.ariaLabel}
|
|
96
|
+
variant="solid"
|
|
97
|
+
className="text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-primary transition-all duration-500 ease-in-out">
|
|
98
|
+
{primaryButton.label}
|
|
99
|
+
</Button>
|
|
100
|
+
)}
|
|
101
|
+
{secondaryButton?.label && (
|
|
102
|
+
<Button
|
|
103
|
+
as="link"
|
|
104
|
+
link={secondaryButton}
|
|
105
|
+
variant="solid"
|
|
106
|
+
ariaLabel={secondaryButton?.ariaLabel}
|
|
107
|
+
className="text-white border text-sm uppercase cursor-pointer px-10 py-4 hover:bg-white hover:text-secondary transition-all duration-500 ease-in-out">
|
|
108
|
+
{secondaryButton.label}
|
|
109
|
+
</Button>
|
|
110
|
+
)}
|
|
111
|
+
</Flex>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div className="absolute bottom-8 left-1/2 transform -translate-x-1/2 z-20 flex gap-2">
|
|
116
|
+
{images.map((_, index) => (
|
|
117
|
+
<SwiperPagination
|
|
118
|
+
key={index}
|
|
119
|
+
colorScheme="white"
|
|
120
|
+
isActive={index === currentIndex}
|
|
121
|
+
onClick={() => handleSlideChange(index)}
|
|
122
|
+
ariaLabel={`Go to slide ${index + 1}`}
|
|
123
|
+
/>
|
|
124
|
+
))}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</Section>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export { Header_G };
|
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { PortableTextComponents } from "@portabletext/react";
|
|
2
|
+
import { ButtonProps } from "./header";
|
|
3
|
+
|
|
1
4
|
export type StyleVariants<T extends string> = Record<T, string>;
|
|
2
5
|
|
|
3
6
|
export type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
|
|
@@ -35,7 +38,8 @@ export interface Logo extends ConditionalLink {
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
export interface Images {
|
|
38
|
-
image?: string;
|
|
41
|
+
image?: string | null;
|
|
42
|
+
video?: string | null;
|
|
39
43
|
_key?: string;
|
|
40
44
|
_type?: string;
|
|
41
45
|
alt?: string;
|
|
@@ -203,6 +207,7 @@ export interface Variants {
|
|
|
203
207
|
multipleMenus?: any;
|
|
204
208
|
arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
|
|
205
209
|
logo?: Logo | null;
|
|
210
|
+
imageSrc?: string | null;
|
|
206
211
|
primaryButton?: LabeledRoute | null;
|
|
207
212
|
secondaryButton?: LabeledRoute | null;
|
|
208
213
|
routes?: LabeledRouteWithKey[] | null;
|
|
@@ -216,6 +221,7 @@ export interface Variants {
|
|
|
216
221
|
signinLink?: LabeledRoute | null;
|
|
217
222
|
tags?: string[] | null;
|
|
218
223
|
posts?: BlogPost[] | null;
|
|
224
|
+
position?: "left" | "center" | "right";
|
|
219
225
|
blogsPerPage?: number | null;
|
|
220
226
|
form?: Form | null;
|
|
221
227
|
collections?: Collection | null;
|
|
@@ -268,6 +274,35 @@ export interface Variants {
|
|
|
268
274
|
consentModalPosition?: string;
|
|
269
275
|
};
|
|
270
276
|
contactLink?: LabeledRoute;
|
|
277
|
+
isFullWidth?: boolean;
|
|
278
|
+
subtitlePosition?: "top" | "bottom";
|
|
279
|
+
spacing?: number;
|
|
280
|
+
isOrdered?: boolean;
|
|
281
|
+
startingPosition?: "left" | "right";
|
|
282
|
+
headerSections?: HeaderSections[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface HeaderBox extends HeaderSections {
|
|
286
|
+
isImageLeft?: boolean;
|
|
287
|
+
isFullWidth?: boolean;
|
|
288
|
+
index?: number;
|
|
289
|
+
isOrdered?: boolean;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface HeaderSections {
|
|
293
|
+
_key: string;
|
|
294
|
+
title?: string;
|
|
295
|
+
subtitle?: string;
|
|
296
|
+
description?: string;
|
|
297
|
+
mainImage?: {
|
|
298
|
+
image: any;
|
|
299
|
+
alt?: string;
|
|
300
|
+
};
|
|
301
|
+
imageTitle?: any;
|
|
302
|
+
alignment?: string;
|
|
303
|
+
imageHeight?: "sm" | "md" | "lg";
|
|
304
|
+
columnContent?: any;
|
|
305
|
+
primaryButton?: ButtonProps;
|
|
271
306
|
}
|
|
272
307
|
|
|
273
308
|
export interface Template {
|
|
@@ -410,3 +445,7 @@ export declare interface Reference {
|
|
|
410
445
|
};
|
|
411
446
|
};
|
|
412
447
|
}
|
|
448
|
+
|
|
449
|
+
export type MyPortableTextComponents = PortableTextComponents & {
|
|
450
|
+
code?: ({ value }: { value: { language?: string; code?: string } }) => JSX.Element;
|
|
451
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PortableTextBlock,
|
|
3
|
+
PortableTextComponentProps,
|
|
4
|
+
PortableTextMarkComponentProps,
|
|
5
|
+
} from "@portabletext/react";
|
|
6
|
+
import { MyPortableTextComponents } from "../../types";
|
|
7
|
+
|
|
8
|
+
export const customBlockStyle = ({ className }: any): MyPortableTextComponents => ({
|
|
9
|
+
block: {
|
|
10
|
+
h1: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
11
|
+
return <h1 className={`h1 ${className}`}>{props.children}</h1>;
|
|
12
|
+
},
|
|
13
|
+
h2: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
14
|
+
return <h2 className={`h2 ${className}`}>{props.children}</h2>;
|
|
15
|
+
},
|
|
16
|
+
h3: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
17
|
+
return <h3 className={`h3 ${className}`}>{props.children}</h3>;
|
|
18
|
+
},
|
|
19
|
+
h4: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
20
|
+
return <h4 className={`h4 ${className}`}>{props.children}</h4>;
|
|
21
|
+
},
|
|
22
|
+
normal: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
23
|
+
return (
|
|
24
|
+
<p
|
|
25
|
+
className={`text-normal lg:text-left sm:text-lg sm:!leading-[32px] font-normal font-body-kb tracking-wide ${className}`}>
|
|
26
|
+
{props.children}
|
|
27
|
+
</p>
|
|
28
|
+
);
|
|
29
|
+
},
|
|
30
|
+
blockquote: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
31
|
+
return (
|
|
32
|
+
<blockquote className={`my-5 px-14 leading-loose italic ${className}`}>
|
|
33
|
+
- {props.children}
|
|
34
|
+
</blockquote>
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
code: (props: { value: { language?: string; code?: string } }) => (
|
|
39
|
+
<pre data-language={props.value.language} className={className}>
|
|
40
|
+
<code>{props.value.code}</code>
|
|
41
|
+
</pre>
|
|
42
|
+
),
|
|
43
|
+
list: {
|
|
44
|
+
bullet: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
45
|
+
return <ul className={`pl-4 list-disc font-light ${className}`}>{props.children}</ul>;
|
|
46
|
+
},
|
|
47
|
+
number: (props: PortableTextComponentProps<PortableTextBlock>) => {
|
|
48
|
+
return <ol className={`pl-4 list-decimal font-light ${className}`}>{props.children}</ol>;
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
listItem: {
|
|
52
|
+
bullet: (props: PortableTextComponentProps<PortableTextBlock>) => (
|
|
53
|
+
<li className={`font-light ${className}`}>{props.children}</li>
|
|
54
|
+
),
|
|
55
|
+
},
|
|
56
|
+
marks: {
|
|
57
|
+
strong: (props: PortableTextMarkComponentProps<PortableTextBlock>) => (
|
|
58
|
+
<strong className={`font-bold ${className}`}>{props.children}</strong>
|
|
59
|
+
),
|
|
60
|
+
em: (props: PortableTextMarkComponentProps<PortableTextBlock>) => (
|
|
61
|
+
<em className={className}>{props.children}</em>
|
|
62
|
+
),
|
|
63
|
+
code: (props: PortableTextMarkComponentProps<PortableTextBlock>) => (
|
|
64
|
+
<code className={className}>{props.children}</code>
|
|
65
|
+
),
|
|
66
|
+
link: (props: PortableTextMarkComponentProps<PortableTextBlock & { href: string }>) => (
|
|
67
|
+
<a
|
|
68
|
+
aria-label={props.children?.toString() ?? "external link"}
|
|
69
|
+
className={`underline underline-offset-2 decoration-gray-2 decoration-1 hover:decoration-2 ${className}`}
|
|
70
|
+
href={props.value?.href}
|
|
71
|
+
target="_blank"
|
|
72
|
+
rel="noopener noreferrer">
|
|
73
|
+
{props.children}
|
|
74
|
+
</a>
|
|
75
|
+
),
|
|
76
|
+
},
|
|
77
|
+
types: {
|
|
78
|
+
image: (props: { value: { alt?: string; caption?: string } }) => (
|
|
79
|
+
<div className={`my-5 ${className}`}>
|
|
80
|
+
<img
|
|
81
|
+
src={props.value.toString()}
|
|
82
|
+
alt={props.value.alt || "Image"}
|
|
83
|
+
className={`w-full h-auto ${className}`}
|
|
84
|
+
/>
|
|
85
|
+
{props.value.caption && (
|
|
86
|
+
<p className={`text-center text-sm text-gray-600 ${className}`}>{props.value.caption}</p>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
),
|
|
90
|
+
},
|
|
91
|
+
});
|
|
File without changes
|
package/dist/chunk-H67LWHVN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lazy as i}from"react";import{jsx as V}from"react/jsx-runtime";var F={variant_a:i(()=>import("./header_a.mjs")),variant_b:i(()=>import("./header_b.mjs")),variant_c:i(()=>import("./header_c.mjs")),variant_d:i(()=>import("./header_d.mjs")),variant_e:i(()=>import("./header_e.mjs"))},H="Header",R=({data:n})=>{var o,s,t,m,p,u,f,g,v,c,l,y,B,L,k,I,b,P;let e=n==null?void 0:n.variant,r=e&&F[e],_={mainImage:(s=(o=n==null?void 0:n.variants)==null?void 0:o.mainImage)!=null?s:void 0,images:(m=(t=n==null?void 0:n.variants)==null?void 0:t.images)!=null?m:void 0,title:(u=(p=n==null?void 0:n.variants)==null?void 0:p.title)!=null?u:void 0,description:(g=(f=n==null?void 0:n.variants)==null?void 0:f.description)!=null?g:void 0,primaryButton:(c=(v=n==null?void 0:n.variants)==null?void 0:v.primaryButton)!=null?c:void 0,secondaryButton:(y=(l=n==null?void 0:n.variants)==null?void 0:l.secondaryButton)!=null?y:void 0,videoLink:(L=(B=n==null?void 0:n.variants)==null?void 0:B.youtubeLink)!=null?L:void 0,formLinks:(I=(k=n==null?void 0:n.variants)==null?void 0:k.formLinks)!=null?I:void 0,form:(P=(b=n==null?void 0:n.variants)==null?void 0:b.form)!=null?P:void 0};return r?V(r,{..._}):null};R.displayName=H;export{R as a};
|