@stackshift-ui/navigation 6.0.13 → 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-4N6ET2I6.mjs +1 -0
- package/dist/{chunk-YNDJK4RH.mjs → chunk-67XVPRGX.mjs} +1 -1
- package/dist/chunk-6QSBJPEW.mjs +1 -0
- package/dist/{chunk-6XDFQS4J.mjs → chunk-EASZP4S2.mjs} +1 -1
- package/dist/{chunk-DJV2UTMZ.mjs → chunk-LBUYM4NV.mjs} +1 -1
- package/dist/chunk-MSVUIX4E.mjs +1 -0
- package/dist/chunk-OXF5VEOU.mjs +1 -0
- package/dist/chunk-P3TZNIE6.mjs +1 -0
- package/dist/chunk-PCTXJCVP.mjs +1 -0
- package/dist/{chunk-KB2HS5UA.mjs → chunk-SVLHEWIY.mjs} +1 -1
- package/dist/chunk-V7KKZJMX.mjs +1 -0
- package/dist/context/megaNavContext.d.ts +14 -0
- package/dist/context/megaNavContext.mjs +1 -0
- package/dist/helper/index.d.ts +2 -1
- package/dist/helper/index.mjs +1 -1
- package/dist/helper.d.ts +6 -0
- package/dist/helper.mjs +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +1 -1
- package/dist/navigation.d.ts +9 -1
- package/dist/navigation.mjs +1 -1
- package/dist/navigation_a.mjs +1 -1
- package/dist/navigation_b.mjs +1 -1
- package/dist/navigation_c.mjs +1 -1
- package/dist/navigation_d.mjs +1 -1
- package/dist/navigation_e.mjs +1 -1
- package/dist/navigation_f.d.ts +3 -0
- package/dist/navigation_f.mjs +1 -0
- package/dist/navigation_g.d.ts +3 -0
- package/dist/navigation_g.mjs +1 -0
- package/dist/navigation_h.d.ts +3 -0
- package/dist/navigation_h.mjs +1 -0
- package/dist/types.d.ts +104 -1
- package/package.json +16 -8
- package/src/context/megaNavContext.tsx +78 -0
- package/src/helper/index.tsx +130 -0
- package/src/helper.ts +14 -0
- package/src/index.ts +3 -0
- package/src/navigation.tsx +29 -1
- package/src/navigation_f.tsx +531 -0
- package/src/navigation_g.tsx +607 -0
- package/src/navigation_h.tsx +742 -0
- package/src/types.ts +113 -1
- package/dist/chunk-KQFO7OZP.mjs +0 -1
- package/dist/chunk-TTJMPYYC.mjs +0 -1
- package/dist/helper/blockStyle.js +0 -1
- package/dist/helper/index.js +0 -1
- package/dist/index.js +0 -2
- package/dist/navigation.js +0 -1
- package/dist/navigation_a.js +0 -1
- package/dist/navigation_b.js +0 -1
- package/dist/navigation_c.js +0 -1
- package/dist/navigation_d.js +0 -1
- package/dist/navigation_e.js +0 -1
- package/dist/types.js +0 -1
- package/src/helper/index.ts +0 -14
package/src/types.ts
CHANGED
|
@@ -8,6 +8,74 @@ export interface MainImage {
|
|
|
8
8
|
alt?: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export interface MegaMenu {
|
|
12
|
+
_type: string;
|
|
13
|
+
showcaseLink?: ShowcaseLink[];
|
|
14
|
+
links?: MegaMenuLink[];
|
|
15
|
+
_key: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
groupOfLinks?: GroupOfLink[];
|
|
18
|
+
label?: string;
|
|
19
|
+
linkTarget?: string;
|
|
20
|
+
linkType?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
linkExternal?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Logo extends ConditionalLink {
|
|
26
|
+
alt?: string;
|
|
27
|
+
linkTarget?: string;
|
|
28
|
+
image?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Logos {
|
|
32
|
+
logo: Logo;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface GroupOfLink {
|
|
36
|
+
_type: string;
|
|
37
|
+
links: GroupOfLinkRoot[];
|
|
38
|
+
_key: string;
|
|
39
|
+
title: string;
|
|
40
|
+
primaryButton: LabeledRouteWithKey;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GroupOfLinkRoot {
|
|
44
|
+
title: string;
|
|
45
|
+
_type: string;
|
|
46
|
+
label?: string;
|
|
47
|
+
links: LabeledRouteWithKey[];
|
|
48
|
+
_key: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MegaMenu {
|
|
51
|
+
_type: string;
|
|
52
|
+
showcaseLink?: ShowcaseLink[];
|
|
53
|
+
links?: MegaMenuLink[];
|
|
54
|
+
_key: string;
|
|
55
|
+
title?: string;
|
|
56
|
+
groupOfLinks?: GroupOfLink[];
|
|
57
|
+
label?: string;
|
|
58
|
+
linkTarget?: string;
|
|
59
|
+
linkType?: string;
|
|
60
|
+
url?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ShowcaseLink {
|
|
64
|
+
mainImage: MainImage;
|
|
65
|
+
_type: string;
|
|
66
|
+
primaryButton: LabeledRouteWithKey;
|
|
67
|
+
_key: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface MegaMenuLink {
|
|
71
|
+
_key: string;
|
|
72
|
+
title: string;
|
|
73
|
+
_type: string;
|
|
74
|
+
links: LabeledRouteWithKey[];
|
|
75
|
+
primaryButton: LabeledRouteWithKey;
|
|
76
|
+
label: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
11
79
|
export interface LabeledRoute extends ConditionalLink {
|
|
12
80
|
ariaLabel?: string;
|
|
13
81
|
label?: string;
|
|
@@ -15,6 +83,10 @@ export interface LabeledRoute extends ConditionalLink {
|
|
|
15
83
|
linkType?: string;
|
|
16
84
|
_type?: string;
|
|
17
85
|
linkInternal?: any;
|
|
86
|
+
linkExternal?: any;
|
|
87
|
+
referenceType?: string;
|
|
88
|
+
multipleRoutes?: LabeledRouteWithKey[];
|
|
89
|
+
multipleInnerRoutes?: LabeledRouteWithKey[];
|
|
18
90
|
}
|
|
19
91
|
export interface ConditionalLink {
|
|
20
92
|
type?: string;
|
|
@@ -30,10 +102,15 @@ export interface StatItems {
|
|
|
30
102
|
_type?: string;
|
|
31
103
|
}
|
|
32
104
|
|
|
33
|
-
export interface Logo
|
|
105
|
+
export interface Logo {
|
|
34
106
|
alt?: string;
|
|
35
107
|
linkTarget?: string;
|
|
36
108
|
image?: string;
|
|
109
|
+
type?: string;
|
|
110
|
+
internalLink?: string;
|
|
111
|
+
externalLink?: string;
|
|
112
|
+
linkExternal?: string;
|
|
113
|
+
linkInternal?: string;
|
|
37
114
|
}
|
|
38
115
|
|
|
39
116
|
export interface Images {
|
|
@@ -64,6 +141,17 @@ export interface SocialLink {
|
|
|
64
141
|
|
|
65
142
|
export interface LabeledRouteWithKey extends LabeledRoute {
|
|
66
143
|
_key?: string;
|
|
144
|
+
image?: string;
|
|
145
|
+
alt?: string;
|
|
146
|
+
multipleRoutes?: LabeledRouteWithKey[];
|
|
147
|
+
featuredRoute?: {
|
|
148
|
+
featuredLink: LabeledRoute;
|
|
149
|
+
mainImage: {
|
|
150
|
+
image: string;
|
|
151
|
+
alt: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
routeType?: string;
|
|
67
155
|
}
|
|
68
156
|
|
|
69
157
|
export interface ArrayOfImageTitleAndText {
|
|
@@ -203,12 +291,18 @@ export interface Sections extends SanityBody {
|
|
|
203
291
|
export interface Variants {
|
|
204
292
|
template?: Template;
|
|
205
293
|
multipleMenus?: any;
|
|
294
|
+
multipleLinks?: any;
|
|
295
|
+
megaMenu?: MegaMenu[];
|
|
206
296
|
arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
|
|
207
297
|
logo?: Logo | null;
|
|
298
|
+
smallLogo?: Logo | null;
|
|
299
|
+
logos?: Logos[] | null;
|
|
208
300
|
primaryButton?: LabeledRoute | null;
|
|
209
301
|
secondaryButton?: LabeledRoute | null;
|
|
210
302
|
routes?: LabeledRouteWithKey[] | null;
|
|
211
303
|
menu?: LabeledRouteWithKey[] | null;
|
|
304
|
+
dropdownMenu?: LabeledRouteWithKey[] | null;
|
|
305
|
+
iconLinks?: LabeledRouteWithKey[] | null;
|
|
212
306
|
plans?: Plans[] | null;
|
|
213
307
|
formLinks?: LabeledRouteWithKey[] | null;
|
|
214
308
|
portfolios?: Portfolios[] | null;
|
|
@@ -232,6 +326,7 @@ export interface Variants {
|
|
|
232
326
|
contactEmail?: string | null;
|
|
233
327
|
contactNumber?: string | null;
|
|
234
328
|
socialLinks?: SocialLink[] | null;
|
|
329
|
+
socialMedia?: SocialLink[] | null;
|
|
235
330
|
block?: any;
|
|
236
331
|
heading?: string | null;
|
|
237
332
|
acceptButtonLabel?: string | null;
|
|
@@ -416,3 +511,20 @@ export declare interface Reference {
|
|
|
416
511
|
export type MyPortableTextComponents = PortableTextComponents & {
|
|
417
512
|
code?: ({ value }: { value: { language?: string; code?: string } }) => JSX.Element;
|
|
418
513
|
};
|
|
514
|
+
|
|
515
|
+
export interface ConditionalLinkTypes {
|
|
516
|
+
className?: string;
|
|
517
|
+
ariaLabel: string; // required for A11Y
|
|
518
|
+
style?: any;
|
|
519
|
+
children: string | React.ReactNode;
|
|
520
|
+
link: LabeledRoute | LabeledRouteWithKey | undefined;
|
|
521
|
+
target?: string;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export interface IconLink {
|
|
525
|
+
_key: string;
|
|
526
|
+
image: string;
|
|
527
|
+
alt?: string;
|
|
528
|
+
linkExternal: string;
|
|
529
|
+
linkTarget?: "_blank" | "_self";
|
|
530
|
+
}
|
package/dist/chunk-KQFO7OZP.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=n=>{var e,r,t;return n!=null&&n.internalLink&&(n==null?void 0:n.type)==="linkInternal"?(r=(e=n==null?void 0:n.internalLink)==null?void 0:e.toLowerCase())!=null&&r.includes("home")?"/":`/${n.internalLink}`:n!=null&&n.externalLink&&(n==null?void 0:n.type)==="linkExternal"&&(t=n==null?void 0:n.externalLink)!=null?t:"/"};export{i as a};
|
package/dist/chunk-TTJMPYYC.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lazy as o}from"react";import{jsx as g}from"react/jsx-runtime";var n={variant_a:o(()=>import("./navigation_a.mjs")),variant_b:o(()=>import("./navigation_b.mjs")),variant_c:o(()=>import("./navigation_c.mjs")),variant_d:o(()=>import("./navigation_d.mjs"))},L="Navigation",R=({data:e})=>{var t,s,u,p,l,y,v,c,m,b;let i=e==null?void 0:e.variant,r=i&&(n==null?void 0:n[i]),f={logo:(s=(t=e==null?void 0:e.variants)==null?void 0:t.logo)!=null?s:void 0,links:(p=(u=e==null?void 0:e.variants)==null?void 0:u.routes)!=null?p:void 0,primaryButton:(y=(l=e==null?void 0:e.variants)==null?void 0:l.primaryButton)!=null?y:void 0,secondaryButton:(c=(v=e==null?void 0:e.variants)==null?void 0:v.secondaryButton)!=null?c:void 0,banner:(b=(m=e==null?void 0:e.variants)==null?void 0:m.banner)!=null?b:void 0};return r?g(r,{...f}):null};R.displayName=L;export{R as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var f=(e,o)=>{for(var t in o)a(e,t,{get:o[t],enumerable:!0})},p=(e,o,t,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of s(o))!g.call(e,n)&&n!==t&&a(e,n,{get:()=>o[n],enumerable:!(m=d(o,n))||m.enumerable});return e};var x=e=>p(a({},"__esModule",{value:!0}),e);var l={};f(l,{blockStyle:()=>i});module.exports=x(l);var c=require("@stackshift-ui/text"),r=require("react/jsx-runtime"),i={block:{normal:({children:e})=>(0,r.jsx)(c.Text,{fontSize:"xs",weight:"bold",className:"text-white ",children:e})},code:({value:e})=>(0,r.jsx)("pre",{"data-language":e.language,children:(0,r.jsx)("code",{children:e.code})}),marks:{strong:({children:e})=>(0,r.jsx)("strong",{children:e}),em:({children:e})=>(0,r.jsx)("em",{children:e}),code:({children:e})=>(0,r.jsx)("code",{children:e}),link:({children:e,value:o})=>{var t;return(0,r.jsx)("a",{"aria-label":(t=o==null?void 0:o.href)!=null?t:"external link",className:"text-primary-foreground hover:text-secondary-foreground",href:o==null?void 0:o.href,target:"_blank",rel:"noopener noreferrer",children:e})}}};0&&(module.exports={blockStyle});
|
package/dist/helper/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(n,e)=>{for(var r in e)L(n,r,{get:e[r],enumerable:!0})},f=(n,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of k(e))!s.call(n,i)&&i!==r&&L(n,i,{get:()=>e[i],enumerable:!(t=a(e,i))||t.enumerable});return n};var p=n=>f(L({},"__esModule",{value:!0}),n);var m={};u(m,{logoLink:()=>x});module.exports=p(m);var x=n=>{var e,r,t;return n!=null&&n.internalLink&&(n==null?void 0:n.type)==="linkInternal"?(r=(e=n==null?void 0:n.internalLink)==null?void 0:e.toLowerCase())!=null&&r.includes("home")?"/":`/${n.internalLink}`:n!=null&&n.externalLink&&(n==null?void 0:n.type)==="linkExternal"&&(t=n==null?void 0:n.externalLink)!=null?t:"/"};0&&(module.exports={logoLink});
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var ue=Object.create;var L=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty;var p=(e,a)=>()=>(e&&(a=e(e=0)),a);var h=(e,a)=>{for(var l in a)L(e,l,{get:a[l],enumerable:!0})},J=(e,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of he(a))!Ne.call(e,t)&&t!==l&&L(e,t,{get:()=>a[t],enumerable:!(i=pe(a,t))||i.enumerable});return e};var k=(e,a,l)=>(l=e!=null?ue(we(e)):{},J(a||!e||!e.__esModule?L(l,"default",{value:e,enumerable:!0}):l,e)),Le=e=>J(L({},"__esModule",{value:!0}),e);var v,w=p(()=>{"use strict";v=e=>{var a,l,i;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(l=(a=e==null?void 0:e.internalLink)==null?void 0:a.toLowerCase())!=null&&l.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(i=e==null?void 0:e.externalLink)!=null?i:"/"}});var Z={};h(Z,{Navigation_A:()=>F,default:()=>F});function F({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=z.default.useState(!1),m=()=>{b(c=>!c)};return(0,n.jsxs)(U.Section,{className:"bg-background",children:[(0,n.jsxs)(u.Flex,{align:"center",justify:"between",className:"px-6 py-6",gap:4,children:[(0,n.jsx)(ke,{logo:i}),(0,n.jsx)(Re,{links:e}),(0,n.jsx)(We,{primaryButton:a,secondaryButton:l}),(0,n.jsx)(Ce,{showMenu:m})]}),(0,n.jsx)(Fe,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function ke({logo:e}){var a;return e?(0,n.jsx)("div",{className:"w-full lg:w-1/5",children:(0,n.jsx)(Q.Link,{className:"w-20 h-14 flex items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.jsx)(O.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function Me(){return(0,n.jsx)("li",{className:"text-gray-500",children:(0,n.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Re({links:e}){return e?(0,n.jsx)(u.Flex,{children:(0,n.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((a,l)=>(0,n.jsxs)(z.default.Fragment,{children:[(0,n.jsx)(ze,{link:a},a._key),e.length!==l+1?(0,n.jsx)(Me,{}):null]},l))})}):null}function ze({link:e}){return e!=null&&e.label?(0,n.jsx)("li",{children:(0,n.jsx)(f.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function Fe({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,n.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,n.jsxs)(u.Flex,{as:"nav",direction:"col",className:"fixed top-0 bottom-0 left-0 w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,n.jsx)(Se,{showMenu:a}),(0,n.jsx)("div",{className:"w-full",children:l?(0,n.jsx)("ul",{children:l==null?void 0:l.map((b,m)=>(0,n.jsx)("li",{className:"mb-1",children:(0,n.jsx)(f.Button,{as:"link",ariaLabel:b==null?void 0:b.label,className:"block w-full cursor-pointer p-4 text-sm font-semibold text-gray-900 no-underline rounded hover:bg-secondary-foreground hover:text-primary",link:b,children:b==null?void 0:b.label})},m))}):null}),(0,n.jsxs)("div",{className:"w-full mt-auto",children:[(0,n.jsxs)(u.Flex,{direction:"col",className:"pt-6",children:[i!=null&&i.label?(0,n.jsx)(f.Button,{as:"link",link:i,ariaLabel:i==null?void 0:i.label,variant:"outline",className:"block w-full px-4 py-3 mb-3 text-xs cursor-pointer font-semibold leading-loose text-center text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}):null,t!=null&&t.label?(0,n.jsx)(f.Button,{as:"link",link:t,ariaLabel:t==null?void 0:t.label,variant:"solid",className:"block w-full px-4 py-3 mb-2 cursor-pointer leading-loose text-xs text-center font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label}):null]}),(0,n.jsx)(X.Text,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:(0,n.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}function Ce({showMenu:e}){return(0,n.jsx)("div",{className:"lg:hidden",children:(0,n.jsx)(f.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,n.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:"Mobile menu"}),(0,n.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function We({primaryButton:e,secondaryButton:a}){return(0,n.jsxs)(u.Flex,{align:"center",gap:4,children:[e!=null&&e.label?(0,n.jsx)(f.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,variant:"outline",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}):null,a!=null&&a.label?(0,n.jsx)(f.Button,{as:"link",link:a,ariaLabel:a==null?void 0:a.label,variant:"solid",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label}):null]})}function Se({showMenu:e}){return(0,n.jsx)("div",{className:"flex items-center mb-8",children:(0,n.jsx)(f.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"navbar-close",onClick:e,children:(0,n.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})})}var f,u,O,Q,U,X,z,n,C=p(()=>{"use strict";f=require("@stackshift-ui/button"),u=require("@stackshift-ui/flex"),O=require("@stackshift-ui/image"),Q=require("@stackshift-ui/link"),U=require("@stackshift-ui/section"),X=require("@stackshift-ui/text"),z=k(require("react"));w();n=require("react/jsx-runtime")});var te={};h(te,{Navigation_B:()=>W,default:()=>W});function W({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=R.default.useState(!1),m=()=>{b(c=>!c)};return(0,r.jsxs)(U.Section,{className:"bg-background",children:[(0,r.jsx)("nav",{className:"relative py-6",children:(0,r.jsx)(y.Container,{maxWidth:1280,children:(0,r.jsxs)(u.Flex,{align:"center",justify:"between",gap:4,children:[(0,r.jsx)(Pe,{logo:i}),(0,r.jsx)(Ke,{showMenu:m}),(0,r.jsx)($e,{links:e}),(0,r.jsx)(Ie,{primaryButton:a,secondaryButton:l})]})})}),(0,r.jsx)(_e,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function Pe({logo:e}){var a;return e?(0,r.jsx)("div",{className:"w-full lg:w-fit",children:(0,r.jsx)(Q.Link,{className:"w-20 h-14 flex items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,r.jsx)(O.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function $e({links:e}){return e?(0,r.jsx)(u.Flex,{children:(0,r.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((a,l)=>(0,r.jsxs)(R.default.Fragment,{children:[(0,r.jsx)(Te,{link:a},a._key),e.length!==l+1?(0,r.jsx)(je,{}):null]},l))})}):null}function Te({link:e}){return e?(0,r.jsx)("li",{children:(0,r.jsx)(g.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function je(){return(0,r.jsx)("li",{className:"text-gray-500",children:(0,r.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Ie({primaryButton:e,secondaryButton:a}){return(0,r.jsxs)(u.Flex,{align:"center",gap:4,children:[(e==null?void 0:e.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label})]})}function Ke({showMenu:e}){return(0,r.jsx)("div",{className:"lg:hidden",children:(0,r.jsx)(g.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,r.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{children:"Mobile menu"}),(0,r.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function _e({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,r.jsx)(R.default.Fragment,{children:(0,r.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,r.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,r.jsx)("div",{className:"flex items-center mb-8",children:(0,r.jsx)(g.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:(0,r.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),l&&(0,r.jsx)("ul",{children:l==null?void 0:l.map((b,m)=>(0,r.jsx)("li",{className:"mb-1",children:(0,r.jsx)(g.Button,{as:"link",ariaLabel:b==null?void 0:b.label,link:b,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:b==null?void 0:b.label})},m))}),(0,r.jsxs)("div",{className:"mt-auto",children:[(0,r.jsxs)("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(t==null?void 0:t.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]}),(0,r.jsx)(X.Text,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:(0,r.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})})}var g,y,u,O,Q,U,X,R,r,S=p(()=>{"use strict";g=require("@stackshift-ui/button"),y=require("@stackshift-ui/container"),R=k(require("react"));w();r=require("react/jsx-runtime")});var be={};h(be,{Navigation_C:()=>T,default:()=>T});function T({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=$.default.useState(!1),m=()=>{b(c=>!c)};return(0,s.jsxs)(U.Section,{className:"bg-background",children:[(0,s.jsx)("nav",{className:"relative py-6",children:(0,s.jsx)(y.Container,{maxWidth:1280,children:(0,s.jsxs)(u.Flex,{align:"center",justify:"between",gap:4,children:[(0,s.jsx)(He,{links:e}),(0,s.jsx)(Ae,{logo:i}),(0,s.jsx)(De,{primaryButton:a,secondaryButton:l}),(0,s.jsx)(Ye,{showMenu:m})]})})}),(0,s.jsx)(Ee,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function He({links:e}){return e?(0,s.jsx)(u.Flex,{children:(0,s.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5",children:e==null?void 0:e.map((a,l)=>(0,s.jsxs)($.default.Fragment,{children:[(a==null?void 0:a.label)&&(0,s.jsx)(Ve,{link:a}),e.length!==l+1?(0,s.jsx)(Ge,{}):null]},l))})}):null}function Ve({link:e}){return e?(0,s.jsx)("li",{children:(0,s.jsx)(x.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function Ge(){return(0,s.jsx)("li",{className:"text-gray-500",children:(0,s.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Ae({logo:e}){var a;return e?(0,s.jsx)("div",{className:"w-full lg:w-fit items-center justify-center",children:(0,s.jsx)(Q.Link,{className:"w-20 h-14 flex justify-center items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,s.jsx)(O.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function De({primaryButton:e,secondaryButton:a}){return(0,s.jsxs)("div",{className:"hidden lg:text-right lg:block lg:w-1/3",children:[(e==null?void 0:e.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"px-4 py-3 text-gray-900 lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"px-4 py-3 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label})]})}function Ye({showMenu:e}){return(0,s.jsx)("div",{className:"ml-auto lg:hidden",children:(0,s.jsx)(x.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,s.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Mobile menu"}),(0,s.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function Ee({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,s.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,s.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,s.jsx)("div",{className:"flex items-center mb-8",children:(0,s.jsx)(x.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:(0,s.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,s.jsx)("div",{children:(0,s.jsx)("ul",{children:l&&(l==null?void 0:l.map((b,m)=>(0,s.jsx)("li",{className:"mb-1",children:(0,s.jsx)(x.Button,{as:"link",ariaLabel:b==null?void 0:b.label,link:b,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:b==null?void 0:b.label})},m)))})}),(0,s.jsxs)("div",{className:"mt-auto",children:[(0,s.jsxs)("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(t==null?void 0:t.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]}),(0,s.jsx)(X.Text,{fontSize:"xs",className:"my-4 text-center text-gray-700",children:(0,s.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}var x,y,u,O,Q,U,X,$,s,j=p(()=>{"use strict";x=require("@stackshift-ui/button"),$=k(require("react"));w();s=require("react/jsx-runtime")});var ge={};h(ge,{Navigation_D:()=>_,default:()=>_});function _({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=K.default.useState(!1),m=()=>{b(c=>!c)};return(0,o.jsxs)(U.Section,{className:"bg-background",children:[(0,o.jsx)("nav",{className:"relative lg:px-6 py-6",children:(0,o.jsxs)(u.Flex,{align:"center",justify:"between",gap:4,children:[(0,o.jsx)(qe,{links:e}),(0,o.jsx)(Qe,{logo:i}),(0,o.jsx)(Ue,{primaryButton:a,secondaryButton:l}),(0,o.jsx)(Xe,{showMenu:m})]})}),(0,o.jsx)(Ze,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function qe({links:e}){return e?(0,o.jsx)(u.Flex,{children:(0,o.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-3 xl:gap-5",children:e==null?void 0:e.map((a,l)=>(0,o.jsxs)(K.default.Fragment,{children:[(a==null?void 0:a.label)&&(0,o.jsx)(Je,{link:a}),e.length!==l+1?(0,o.jsx)(Oe,{}):null]},l))})}):null}function Je({link:e}){return e?(0,o.jsx)("li",{children:(0,o.jsx)(d.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function Oe(){return(0,o.jsx)("li",{className:"text-gray-500",children:(0,o.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Qe({logo:e}){var a;return e?(0,o.jsx)("div",{className:"w-full lg:w-fit items-center justify-center",children:(0,o.jsx)(Q.Link,{className:"w-20 h-14 flex justify-center items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,o.jsx)(O.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function Ue({primaryButton:e,secondaryButton:a}){return(0,o.jsxs)("div",{className:"hidden lg:flex lg:gap-4",children:[(e==null?void 0:e.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"px-4 py-3 leading-loose text-center text-gray-900 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"px-4 py-3 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label})]})}function Xe({showMenu:e}){return(0,o.jsx)("div",{className:"ml-auto lg:hidden",children:(0,o.jsx)(d.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,o.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:"Mobile menu"}),(0,o.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function Ze({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,o.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,o.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,o.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,o.jsx)("div",{className:"flex items-center mb-8",children:(0,o.jsx)(d.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:(0,o.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,o.jsx)("ul",{children:l&&l.map((b,m)=>(0,o.jsx)("li",{className:"mb-1",children:(0,o.jsx)(d.Button,{as:"link",ariaLabel:b.label,link:b,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:b.label})},m))}),(0,o.jsxs)("div",{className:"mt-auto pt-6",children:[(i==null?void 0:i.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:i.label,link:i,className:"block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i.label}),(t==null?void 0:t.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:t.label,link:t,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t.label})]}),(0,o.jsx)(X.Text,{fontSize:"xs",muted:!0,className:"my-4 text-center",children:(0,o.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})}var d,u,O,Q,U,X,K,o,H=p(()=>{"use strict";d=require("@stackshift-ui/button"),K=k(require("react"));w();o=require("react/jsx-runtime")});var Be={};h(Be,{Navigation:()=>xe,Navigation_A:()=>F,Navigation_B:()=>W,Navigation_C:()=>T,Navigation_D:()=>_});module.exports=Le(Be);var N=require("react"),de=require("react/jsx-runtime"),V={variant_a:(0,N.lazy)(()=>Promise.resolve().then(()=>(C(),Z))),variant_b:(0,N.lazy)(()=>Promise.resolve().then(()=>(S(),te))),variant_c:(0,N.lazy)(()=>Promise.resolve().then(()=>(j(),be))),variant_d:(0,N.lazy)(()=>Promise.resolve().then(()=>(H(),ge)))},ye="Navigation",xe=({data:e})=>{var t,b,m,c,G,A,D,Y,E,q;let a=e==null?void 0:e.variant,l=a&&(V==null?void 0:V[a]),i={logo:(b=(t=e==null?void 0:e.variants)==null?void 0:t.logo)!=null?b:void 0,links:(c=(m=e==null?void 0:e.variants)==null?void 0:m.routes)!=null?c:void 0,primaryButton:(A=(G=e==null?void 0:e.variants)==null?void 0:G.primaryButton)!=null?A:void 0,secondaryButton:(Y=(D=e==null?void 0:e.variants)==null?void 0:D.secondaryButton)!=null?Y:void 0,banner:(q=(E=e==null?void 0:e.variants)==null?void 0:E.banner)!=null?q:void 0};return l?(0,de.jsx)(l,{...i}):null};xe.displayName=ye;C();S();j();H();0&&(module.exports={Navigation,Navigation_A,Navigation_B,Navigation_C,Navigation_D});
|
package/dist/navigation.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var ue=Object.create;var L=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty;var h=(e,a)=>()=>(e&&(a=e(e=0)),a);var p=(e,a)=>{for(var l in a)L(e,l,{get:a[l],enumerable:!0})},H=(e,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of pe(a))!Ne.call(e,t)&&t!==l&&L(e,t,{get:()=>a[t],enumerable:!(i=he(a,t))||i.enumerable});return e};var k=(e,a,l)=>(l=e!=null?ue(we(e)):{},H(a||!e||!e.__esModule?L(l,"default",{value:e,enumerable:!0}):l,e)),Le=e=>H(L({},"__esModule",{value:!0}),e);var v,w=h(()=>{"use strict";v=e=>{var a,l,i;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(l=(a=e==null?void 0:e.internalLink)==null?void 0:a.toLowerCase())!=null&&l.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(i=e==null?void 0:e.externalLink)!=null?i:"/"}});var E={};p(E,{Navigation_A:()=>Y,default:()=>Y});function Y({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=z.default.useState(!1),m=()=>{b(c=>!c)};return(0,n.jsxs)(A.Section,{className:"bg-background",children:[(0,n.jsxs)(u.Flex,{align:"center",justify:"between",className:"px-6 py-6",gap:4,children:[(0,n.jsx)(ke,{logo:i}),(0,n.jsx)(Re,{links:e}),(0,n.jsx)(We,{primaryButton:a,secondaryButton:l}),(0,n.jsx)(Ce,{showMenu:m})]}),(0,n.jsx)(Fe,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function ke({logo:e}){var a;return e?(0,n.jsx)("div",{className:"w-full lg:w-1/5",children:(0,n.jsx)(G.Link,{className:"w-20 h-14 flex items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,n.jsx)(V.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function Me(){return(0,n.jsx)("li",{className:"text-gray-500",children:(0,n.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Re({links:e}){return e?(0,n.jsx)(u.Flex,{children:(0,n.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((a,l)=>(0,n.jsxs)(z.default.Fragment,{children:[(0,n.jsx)(ze,{link:a},a._key),e.length!==l+1?(0,n.jsx)(Me,{}):null]},l))})}):null}function ze({link:e}){return e!=null&&e.label?(0,n.jsx)("li",{children:(0,n.jsx)(f.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function Fe({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,n.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,n.jsxs)(u.Flex,{as:"nav",direction:"col",className:"fixed top-0 bottom-0 left-0 w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,n.jsx)(Se,{showMenu:a}),(0,n.jsx)("div",{className:"w-full",children:l?(0,n.jsx)("ul",{children:l==null?void 0:l.map((b,m)=>(0,n.jsx)("li",{className:"mb-1",children:(0,n.jsx)(f.Button,{as:"link",ariaLabel:b==null?void 0:b.label,className:"block w-full cursor-pointer p-4 text-sm font-semibold text-gray-900 no-underline rounded hover:bg-secondary-foreground hover:text-primary",link:b,children:b==null?void 0:b.label})},m))}):null}),(0,n.jsxs)("div",{className:"w-full mt-auto",children:[(0,n.jsxs)(u.Flex,{direction:"col",className:"pt-6",children:[i!=null&&i.label?(0,n.jsx)(f.Button,{as:"link",link:i,ariaLabel:i==null?void 0:i.label,variant:"outline",className:"block w-full px-4 py-3 mb-3 text-xs cursor-pointer font-semibold leading-loose text-center text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}):null,t!=null&&t.label?(0,n.jsx)(f.Button,{as:"link",link:t,ariaLabel:t==null?void 0:t.label,variant:"solid",className:"block w-full px-4 py-3 mb-2 cursor-pointer leading-loose text-xs text-center font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label}):null]}),(0,n.jsx)(D.Text,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:(0,n.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}function Ce({showMenu:e}){return(0,n.jsx)("div",{className:"lg:hidden",children:(0,n.jsx)(f.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,n.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:"Mobile menu"}),(0,n.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function We({primaryButton:e,secondaryButton:a}){return(0,n.jsxs)(u.Flex,{align:"center",gap:4,children:[e!=null&&e.label?(0,n.jsx)(f.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,variant:"outline",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}):null,a!=null&&a.label?(0,n.jsx)(f.Button,{as:"link",link:a,ariaLabel:a==null?void 0:a.label,variant:"solid",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label}):null]})}function Se({showMenu:e}){return(0,n.jsx)("div",{className:"flex items-center mb-8",children:(0,n.jsx)(f.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"navbar-close",onClick:e,children:(0,n.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})})}var f,u,V,G,A,D,z,n,q=h(()=>{"use strict";f=require("@stackshift-ui/button"),u=require("@stackshift-ui/flex"),V=require("@stackshift-ui/image"),G=require("@stackshift-ui/link"),A=require("@stackshift-ui/section"),D=require("@stackshift-ui/text"),z=k(require("react"));w();n=require("react/jsx-runtime")});var y={};p(y,{Navigation_B:()=>Z,default:()=>Z});function Z({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=R.default.useState(!1),m=()=>{b(c=>!c)};return(0,r.jsxs)(A.Section,{className:"bg-background",children:[(0,r.jsx)("nav",{className:"relative py-6",children:(0,r.jsx)(J.Container,{maxWidth:1280,children:(0,r.jsxs)(u.Flex,{align:"center",justify:"between",gap:4,children:[(0,r.jsx)(Pe,{logo:i}),(0,r.jsx)(Ke,{showMenu:m}),(0,r.jsx)($e,{links:e}),(0,r.jsx)(Ie,{primaryButton:a,secondaryButton:l})]})})}),(0,r.jsx)(_e,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function Pe({logo:e}){var a;return e?(0,r.jsx)("div",{className:"w-full lg:w-fit",children:(0,r.jsx)(G.Link,{className:"w-20 h-14 flex items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,r.jsx)(V.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function $e({links:e}){return e?(0,r.jsx)(u.Flex,{children:(0,r.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((a,l)=>(0,r.jsxs)(R.default.Fragment,{children:[(0,r.jsx)(Te,{link:a},a._key),e.length!==l+1?(0,r.jsx)(je,{}):null]},l))})}):null}function Te({link:e}){return e?(0,r.jsx)("li",{children:(0,r.jsx)(g.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function je(){return(0,r.jsx)("li",{className:"text-gray-500",children:(0,r.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Ie({primaryButton:e,secondaryButton:a}){return(0,r.jsxs)(u.Flex,{align:"center",gap:4,children:[(e==null?void 0:e.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label})]})}function Ke({showMenu:e}){return(0,r.jsx)("div",{className:"lg:hidden",children:(0,r.jsx)(g.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,r.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{children:"Mobile menu"}),(0,r.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function _e({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,r.jsx)(R.default.Fragment,{children:(0,r.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,r.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,r.jsx)("div",{className:"flex items-center mb-8",children:(0,r.jsx)(g.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:(0,r.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),l&&(0,r.jsx)("ul",{children:l==null?void 0:l.map((b,m)=>(0,r.jsx)("li",{className:"mb-1",children:(0,r.jsx)(g.Button,{as:"link",ariaLabel:b==null?void 0:b.label,link:b,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:b==null?void 0:b.label})},m))}),(0,r.jsxs)("div",{className:"mt-auto",children:[(0,r.jsxs)("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(t==null?void 0:t.label)&&(0,r.jsx)(g.Button,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]}),(0,r.jsx)(D.Text,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:(0,r.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})})}var g,J,u,V,G,A,D,R,r,B=h(()=>{"use strict";g=require("@stackshift-ui/button"),J=require("@stackshift-ui/container"),R=k(require("react"));w();r=require("react/jsx-runtime")});var se={};p(se,{Navigation_C:()=>re,default:()=>re});function re({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=C.default.useState(!1),m=()=>{b(c=>!c)};return(0,s.jsxs)(A.Section,{className:"bg-background",children:[(0,s.jsx)("nav",{className:"relative py-6",children:(0,s.jsx)(J.Container,{maxWidth:1280,children:(0,s.jsxs)(u.Flex,{align:"center",justify:"between",gap:4,children:[(0,s.jsx)(He,{links:e}),(0,s.jsx)(Ae,{logo:i}),(0,s.jsx)(De,{primaryButton:a,secondaryButton:l}),(0,s.jsx)(Ye,{showMenu:m})]})})}),(0,s.jsx)(Ee,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function He({links:e}){return e?(0,s.jsx)(u.Flex,{children:(0,s.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5",children:e==null?void 0:e.map((a,l)=>(0,s.jsxs)(C.default.Fragment,{children:[(a==null?void 0:a.label)&&(0,s.jsx)(Ve,{link:a}),e.length!==l+1?(0,s.jsx)(Ge,{}):null]},l))})}):null}function Ve({link:e}){return e?(0,s.jsx)("li",{children:(0,s.jsx)(x.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function Ge(){return(0,s.jsx)("li",{className:"text-gray-500",children:(0,s.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Ae({logo:e}){var a;return e?(0,s.jsx)("div",{className:"w-full lg:w-fit items-center justify-center",children:(0,s.jsx)(G.Link,{className:"w-20 h-14 flex justify-center items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,s.jsx)(V.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function De({primaryButton:e,secondaryButton:a}){return(0,s.jsxs)("div",{className:"hidden lg:text-right lg:block lg:w-1/3",children:[(e==null?void 0:e.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"px-4 py-3 text-gray-900 lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"px-4 py-3 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label})]})}function Ye({showMenu:e}){return(0,s.jsx)("div",{className:"ml-auto lg:hidden",children:(0,s.jsx)(x.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,s.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Mobile menu"}),(0,s.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function Ee({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,s.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,s.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,s.jsx)("div",{className:"flex items-center mb-8",children:(0,s.jsx)(x.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:(0,s.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,s.jsx)("div",{children:(0,s.jsx)("ul",{children:l&&(l==null?void 0:l.map((b,m)=>(0,s.jsx)("li",{className:"mb-1",children:(0,s.jsx)(x.Button,{as:"link",ariaLabel:b==null?void 0:b.label,link:b,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:b==null?void 0:b.label})},m)))})}),(0,s.jsxs)("div",{className:"mt-auto",children:[(0,s.jsxs)("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(t==null?void 0:t.label)&&(0,s.jsx)(x.Button,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]}),(0,s.jsx)(D.Text,{fontSize:"xs",className:"my-4 text-center text-gray-700",children:(0,s.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}var x,J,u,V,G,A,D,C,s,ne=h(()=>{"use strict";x=require("@stackshift-ui/button"),C=k(require("react"));w();s=require("react/jsx-runtime")});var fe={};p(fe,{Navigation_D:()=>ce,default:()=>ce});function ce({links:e,primaryButton:a,secondaryButton:l,logo:i}){let[t,b]=S.default.useState(!1),m=()=>{b(c=>!c)};return(0,o.jsxs)(A.Section,{className:"bg-background",children:[(0,o.jsx)("nav",{className:"relative lg:px-6 py-6",children:(0,o.jsxs)(u.Flex,{align:"center",justify:"between",gap:4,children:[(0,o.jsx)(qe,{links:e}),(0,o.jsx)(Qe,{logo:i}),(0,o.jsx)(Ue,{primaryButton:a,secondaryButton:l}),(0,o.jsx)(Xe,{showMenu:m})]})}),(0,o.jsx)(Ze,{menu:t,showMenu:m,links:e,primaryButton:a,secondaryButton:l})]})}function qe({links:e}){return e?(0,o.jsx)(u.Flex,{children:(0,o.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-3 xl:gap-5",children:e==null?void 0:e.map((a,l)=>(0,o.jsxs)(S.default.Fragment,{children:[(a==null?void 0:a.label)&&(0,o.jsx)(Je,{link:a}),e.length!==l+1?(0,o.jsx)(Oe,{}):null]},l))})}):null}function Je({link:e}){return e?(0,o.jsx)("li",{children:(0,o.jsx)(d.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function Oe(){return(0,o.jsx)("li",{className:"text-gray-500",children:(0,o.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function Qe({logo:e}){var a;return e?(0,o.jsx)("div",{className:"w-full lg:w-fit items-center justify-center",children:(0,o.jsx)(G.Link,{className:"w-20 h-14 flex justify-center items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,o.jsx)(V.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo"})})}):null}function Ue({primaryButton:e,secondaryButton:a}){return(0,o.jsxs)("div",{className:"hidden lg:flex lg:gap-4",children:[(e==null?void 0:e.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"px-4 py-3 leading-loose text-center text-gray-900 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"px-4 py-3 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:a==null?void 0:a.label})]})}function Xe({showMenu:e}){return(0,o.jsx)("div",{className:"ml-auto lg:hidden",children:(0,o.jsx)(d.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,o.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:"Mobile menu"}),(0,o.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function Ze({menu:e,showMenu:a,links:l,primaryButton:i,secondaryButton:t}){return(0,o.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,o.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),(0,o.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,o.jsx)("div",{className:"flex items-center mb-8",children:(0,o.jsx)(d.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:(0,o.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,o.jsx)("ul",{children:l&&l.map((b,m)=>(0,o.jsx)("li",{className:"mb-1",children:(0,o.jsx)(d.Button,{as:"link",ariaLabel:b.label,link:b,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:b.label})},m))}),(0,o.jsxs)("div",{className:"mt-auto pt-6",children:[(i==null?void 0:i.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:i.label,link:i,className:"block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i.label}),(t==null?void 0:t.label)&&(0,o.jsx)(d.Button,{as:"link",ariaLabel:t.label,link:t,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t.label})]}),(0,o.jsx)(D.Text,{fontSize:"xs",muted:!0,className:"my-4 text-center",children:(0,o.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})}var d,u,V,G,A,D,S,o,ge=h(()=>{"use strict";d=require("@stackshift-ui/button"),S=k(require("react"));w();o=require("react/jsx-runtime")});var Be={};p(Be,{Navigation:()=>xe});module.exports=Le(Be);var N=require("react"),de=require("react/jsx-runtime"),P={variant_a:(0,N.lazy)(()=>Promise.resolve().then(()=>(q(),E))),variant_b:(0,N.lazy)(()=>Promise.resolve().then(()=>(B(),y))),variant_c:(0,N.lazy)(()=>Promise.resolve().then(()=>(ne(),se))),variant_d:(0,N.lazy)(()=>Promise.resolve().then(()=>(ge(),fe)))},ye="Navigation",xe=({data:e})=>{var t,b,m,c,$,T,j,I,K,_;let a=e==null?void 0:e.variant,l=a&&(P==null?void 0:P[a]),i={logo:(b=(t=e==null?void 0:e.variants)==null?void 0:t.logo)!=null?b:void 0,links:(c=(m=e==null?void 0:e.variants)==null?void 0:m.routes)!=null?c:void 0,primaryButton:(T=($=e==null?void 0:e.variants)==null?void 0:$.primaryButton)!=null?T:void 0,secondaryButton:(I=(j=e==null?void 0:e.variants)==null?void 0:j.secondaryButton)!=null?I:void 0,banner:(_=(K=e==null?void 0:e.variants)==null?void 0:K.banner)!=null?_:void 0};return l?(0,de.jsx)(l,{...i}):null};xe.displayName=ye;0&&(module.exports={Navigation});
|
package/dist/navigation_a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var L=Object.create;var m=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var R=(e,l)=>{for(var i in l)m(e,i,{get:l[i],enumerable:!0})},x=(e,l,i,t)=>{if(l&&typeof l=="object"||typeof l=="function")for(let r of g(l))!k.call(e,r)&&r!==i&&m(e,r,{get:()=>l[r],enumerable:!(t=o(l,r))||t.enumerable});return e};var z=(e,l,i)=>(i=e!=null?L(M(e)):{},x(l||!e||!e.__esModule?m(i,"default",{value:e,enumerable:!0}):i,e)),F=e=>x(m({},"__esModule",{value:!0}),e);var H={};R(H,{Navigation_A:()=>w,default:()=>w});module.exports=F(H);var s=require("@stackshift-ui/button"),b=require("@stackshift-ui/flex"),u=require("@stackshift-ui/image"),d=require("@stackshift-ui/link"),h=require("@stackshift-ui/section"),p=require("@stackshift-ui/text"),f=z(require("react"));var c=e=>{var l,i,t;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(i=(l=e==null?void 0:e.internalLink)==null?void 0:l.toLowerCase())!=null&&i.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(t=e==null?void 0:e.externalLink)!=null?t:"/"};var a=require("react/jsx-runtime");function w({links:e,primaryButton:l,secondaryButton:i,logo:t}){let[r,n]=f.default.useState(!1),v=()=>{n(N=>!N)};return(0,a.jsxs)(h.Section,{className:"bg-background",children:[(0,a.jsxs)(b.Flex,{align:"center",justify:"between",className:"px-6 py-6",gap:4,children:[(0,a.jsx)(C,{logo:t}),(0,a.jsx)(S,{links:e}),(0,a.jsx)(W,{primaryButton:l,secondaryButton:i}),(0,a.jsx)(T,{showMenu:v})]}),(0,a.jsx)(P,{menu:r,showMenu:v,links:e,primaryButton:l,secondaryButton:i})]})}function C({logo:e}){var l;return e?(0,a.jsx)("div",{className:"w-full lg:w-1/5",children:(0,a.jsx)(d.Link,{className:"w-20 h-14 flex items-center","aria-label":c(e)==="/"?"Go to home page":`Go to ${c(e)}`,href:c(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(u.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo"})})}):null}function I(){return(0,a.jsx)("li",{className:"text-gray-500",children:(0,a.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function S({links:e}){return e?(0,a.jsx)(b.Flex,{children:(0,a.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((l,i)=>(0,a.jsxs)(f.default.Fragment,{children:[(0,a.jsx)($,{link:l},l._key),e.length!==i+1?(0,a.jsx)(I,{}):null]},i))})}):null}function $({link:e}){return e!=null&&e.label?(0,a.jsx)("li",{children:(0,a.jsx)(s.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function P({menu:e,showMenu:l,links:i,primaryButton:t,secondaryButton:r}){return(0,a.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),(0,a.jsxs)(b.Flex,{as:"nav",direction:"col",className:"fixed top-0 bottom-0 left-0 w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,a.jsx)(j,{showMenu:l}),(0,a.jsx)("div",{className:"w-full",children:i?(0,a.jsx)("ul",{children:i==null?void 0:i.map((n,v)=>(0,a.jsx)("li",{className:"mb-1",children:(0,a.jsx)(s.Button,{as:"link",ariaLabel:n==null?void 0:n.label,className:"block w-full cursor-pointer p-4 text-sm font-semibold text-gray-900 no-underline rounded hover:bg-secondary-foreground hover:text-primary",link:n,children:n==null?void 0:n.label})},v))}):null}),(0,a.jsxs)("div",{className:"w-full mt-auto",children:[(0,a.jsxs)(b.Flex,{direction:"col",className:"pt-6",children:[t!=null&&t.label?(0,a.jsx)(s.Button,{as:"link",link:t,ariaLabel:t==null?void 0:t.label,variant:"outline",className:"block w-full px-4 py-3 mb-3 text-xs cursor-pointer font-semibold leading-loose text-center text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:t==null?void 0:t.label}):null,r!=null&&r.label?(0,a.jsx)(s.Button,{as:"link",link:r,ariaLabel:r==null?void 0:r.label,variant:"solid",className:"block w-full px-4 py-3 mb-2 cursor-pointer leading-loose text-xs text-center font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:r==null?void 0:r.label}):null]}),(0,a.jsx)(p.Text,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:(0,a.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}function T({showMenu:e}){return(0,a.jsx)("div",{className:"lg:hidden",children:(0,a.jsx)(s.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,a.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("title",{children:"Mobile menu"}),(0,a.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function W({primaryButton:e,secondaryButton:l}){return(0,a.jsxs)(b.Flex,{align:"center",gap:4,children:[e!=null&&e.label?(0,a.jsx)(s.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,variant:"outline",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}):null,l!=null&&l.label?(0,a.jsx)(s.Button,{as:"link",link:l,ariaLabel:l==null?void 0:l.label,variant:"solid",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-global",children:l==null?void 0:l.label}):null]})}function j({showMenu:e}){return(0,a.jsx)("div",{className:"flex items-center mb-8",children:(0,a.jsx)(s.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"navbar-close",onClick:e,children:(0,a.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})})}0&&(module.exports={Navigation_A});
|
package/dist/navigation_b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.create;var b=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var z=(e,l)=>{for(var t in l)b(e,t,{get:l[t],enumerable:!0})},c=(e,l,t,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(let r of o(l))!R.call(e,r)&&r!==t&&b(e,r,{get:()=>l[r],enumerable:!(i=k(l,r))||i.enumerable});return e};var F=(e,l,t)=>(t=e!=null?u(M(e)):{},c(l||!e||!e.__esModule?b(t,"default",{value:e,enumerable:!0}):t,e)),C=e=>c(b({},"__esModule",{value:!0}),e);var H={};z(H,{Navigation_B:()=>N,default:()=>N});module.exports=C(H);var s=require("@stackshift-ui/button"),d=require("@stackshift-ui/container"),f=require("@stackshift-ui/flex"),h=require("@stackshift-ui/image"),p=require("@stackshift-ui/link"),w=require("@stackshift-ui/section"),L=require("@stackshift-ui/text"),x=F(require("react"));var v=e=>{var l,t,i;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(t=(l=e==null?void 0:e.internalLink)==null?void 0:l.toLowerCase())!=null&&t.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(i=e==null?void 0:e.externalLink)!=null?i:"/"};var a=require("react/jsx-runtime");function N({links:e,primaryButton:l,secondaryButton:t,logo:i}){let[r,n]=x.default.useState(!1),m=()=>{n(g=>!g)};return(0,a.jsxs)(w.Section,{className:"bg-background",children:[(0,a.jsx)("nav",{className:"relative py-6",children:(0,a.jsx)(d.Container,{maxWidth:1280,children:(0,a.jsxs)(f.Flex,{align:"center",justify:"between",gap:4,children:[(0,a.jsx)(W,{logo:i}),(0,a.jsx)(T,{showMenu:m}),(0,a.jsx)(S,{links:e}),(0,a.jsx)(P,{primaryButton:l,secondaryButton:t})]})})}),(0,a.jsx)(j,{menu:r,showMenu:m,links:e,primaryButton:l,secondaryButton:t})]})}function W({logo:e}){var l;return e?(0,a.jsx)("div",{className:"w-full lg:w-fit",children:(0,a.jsx)(p.Link,{className:"w-20 h-14 flex items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(h.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo"})})}):null}function S({links:e}){return e?(0,a.jsx)(f.Flex,{children:(0,a.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((l,t)=>(0,a.jsxs)(x.default.Fragment,{children:[(0,a.jsx)($,{link:l},l._key),e.length!==t+1?(0,a.jsx)(I,{}):null]},t))})}):null}function $({link:e}){return e?(0,a.jsx)("li",{children:(0,a.jsx)(s.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function I(){return(0,a.jsx)("li",{className:"text-gray-500",children:(0,a.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function P({primaryButton:e,secondaryButton:l}){return(0,a.jsxs)(f.Flex,{align:"center",gap:4,children:[(e==null?void 0:e.label)&&(0,a.jsx)(s.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-gray-900 rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,a.jsx)(s.Button,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-global",children:l==null?void 0:l.label})]})}function T({showMenu:e}){return(0,a.jsx)("div",{className:"lg:hidden",children:(0,a.jsx)(s.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,a.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("title",{children:"Mobile menu"}),(0,a.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function j({menu:e,showMenu:l,links:t,primaryButton:i,secondaryButton:r}){return(0,a.jsx)(x.default.Fragment,{children:(0,a.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),(0,a.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,a.jsx)("div",{className:"flex items-center mb-8",children:(0,a.jsx)(s.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:l,children:(0,a.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),t&&(0,a.jsx)("ul",{children:t==null?void 0:t.map((n,m)=>(0,a.jsx)("li",{className:"mb-1",children:(0,a.jsx)(s.Button,{as:"link",ariaLabel:n==null?void 0:n.label,link:n,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:n==null?void 0:n.label})},m))}),(0,a.jsxs)("div",{className:"mt-auto",children:[(0,a.jsxs)("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&(0,a.jsx)(s.Button,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(r==null?void 0:r.label)&&(0,a.jsx)(s.Button,{as:"link",ariaLabel:r==null?void 0:r.label,link:r,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:r==null?void 0:r.label})]}),(0,a.jsx)(L.Text,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:(0,a.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})})}0&&(module.exports={Navigation_B});
|
package/dist/navigation_c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.create;var b=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var z=(e,l)=>{for(var t in l)b(e,t,{get:l[t],enumerable:!0})},x=(e,l,t,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(let r of k(l))!R.call(e,r)&&r!==t&&b(e,r,{get:()=>l[r],enumerable:!(i=o(l,r))||i.enumerable});return e};var C=(e,l,t)=>(t=e!=null?g(M(e)):{},x(l||!e||!e.__esModule?b(t,"default",{value:e,enumerable:!0}):t,e)),F=e=>x(b({},"__esModule",{value:!0}),e);var H={};z(H,{Navigation_C:()=>N,default:()=>N});module.exports=F(H);var n=require("@stackshift-ui/button"),d=require("@stackshift-ui/container"),f=require("@stackshift-ui/flex"),h=require("@stackshift-ui/image"),p=require("@stackshift-ui/link"),u=require("@stackshift-ui/section"),w=require("@stackshift-ui/text"),c=C(require("react"));var v=e=>{var l,t,i;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(t=(l=e==null?void 0:e.internalLink)==null?void 0:l.toLowerCase())!=null&&t.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(i=e==null?void 0:e.externalLink)!=null?i:"/"};var a=require("react/jsx-runtime");function N({links:e,primaryButton:l,secondaryButton:t,logo:i}){let[r,s]=c.default.useState(!1),m=()=>{s(L=>!L)};return(0,a.jsxs)(u.Section,{className:"bg-background",children:[(0,a.jsx)("nav",{className:"relative py-6",children:(0,a.jsx)(d.Container,{maxWidth:1280,children:(0,a.jsxs)(f.Flex,{align:"center",justify:"between",gap:4,children:[(0,a.jsx)(W,{links:e}),(0,a.jsx)($,{logo:i}),(0,a.jsx)(I,{primaryButton:l,secondaryButton:t}),(0,a.jsx)(P,{showMenu:m})]})})}),(0,a.jsx)(T,{menu:r,showMenu:m,links:e,primaryButton:l,secondaryButton:t})]})}function W({links:e}){return e?(0,a.jsx)(f.Flex,{children:(0,a.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-5",children:e==null?void 0:e.map((l,t)=>(0,a.jsxs)(c.default.Fragment,{children:[(l==null?void 0:l.label)&&(0,a.jsx)(j,{link:l}),e.length!==t+1?(0,a.jsx)(S,{}):null]},t))})}):null}function j({link:e}){return e?(0,a.jsx)("li",{children:(0,a.jsx)(n.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function S(){return(0,a.jsx)("li",{className:"text-gray-500",children:(0,a.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function $({logo:e}){var l;return e?(0,a.jsx)("div",{className:"w-full lg:w-fit items-center justify-center",children:(0,a.jsx)(p.Link,{className:"w-20 h-14 flex justify-center items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(h.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo"})})}):null}function I({primaryButton:e,secondaryButton:l}){return(0,a.jsxs)("div",{className:"hidden lg:text-right lg:block lg:w-1/3",children:[(e==null?void 0:e.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"px-4 py-3 text-gray-900 lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"px-4 py-3 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:l==null?void 0:l.label})]})}function P({showMenu:e}){return(0,a.jsx)("div",{className:"ml-auto lg:hidden",children:(0,a.jsx)(n.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,a.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("title",{children:"Mobile menu"}),(0,a.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function T({menu:e,showMenu:l,links:t,primaryButton:i,secondaryButton:r}){return(0,a.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),(0,a.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,a.jsx)("div",{className:"flex items-center mb-8",children:(0,a.jsx)(n.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:l,children:(0,a.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,a.jsx)("div",{children:(0,a.jsx)("ul",{children:t&&(t==null?void 0:t.map((s,m)=>(0,a.jsx)("li",{className:"mb-1",children:(0,a.jsx)(n.Button,{as:"link",ariaLabel:s==null?void 0:s.label,link:s,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:s==null?void 0:s.label})},m)))})}),(0,a.jsxs)("div",{className:"mt-auto",children:[(0,a.jsxs)("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i==null?void 0:i.label}),(r==null?void 0:r.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:r==null?void 0:r.label,link:r,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:r==null?void 0:r.label})]}),(0,a.jsx)(w.Text,{fontSize:"xs",className:"my-4 text-center text-gray-700",children:(0,a.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}0&&(module.exports={Navigation_C});
|
package/dist/navigation_d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var L=Object.create;var b=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var R=(e,t)=>{for(var l in t)b(e,l,{get:t[l],enumerable:!0})},d=(e,t,l,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!M.call(e,r)&&r!==l&&b(e,r,{get:()=>t[r],enumerable:!(i=N(t,r))||i.enumerable});return e};var z=(e,t,l)=>(l=e!=null?L(k(e)):{},d(t||!e||!e.__esModule?b(l,"default",{value:e,enumerable:!0}):l,e)),C=e=>d(b({},"__esModule",{value:!0}),e);var T={};R(T,{Navigation_D:()=>o,default:()=>o});module.exports=C(T);var n=require("@stackshift-ui/button"),c=require("@stackshift-ui/flex"),u=require("@stackshift-ui/image"),x=require("@stackshift-ui/link"),p=require("@stackshift-ui/section"),h=require("@stackshift-ui/text"),f=z(require("react"));var v=e=>{var t,l,i;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(l=(t=e==null?void 0:e.internalLink)==null?void 0:t.toLowerCase())!=null&&l.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(i=e==null?void 0:e.externalLink)!=null?i:"/"};var a=require("react/jsx-runtime");function o({links:e,primaryButton:t,secondaryButton:l,logo:i}){let[r,s]=f.default.useState(!1),m=()=>{s(w=>!w)};return(0,a.jsxs)(p.Section,{className:"bg-background",children:[(0,a.jsx)("nav",{className:"relative lg:px-6 py-6",children:(0,a.jsxs)(c.Flex,{align:"center",justify:"between",gap:4,children:[(0,a.jsx)(F,{links:e}),(0,a.jsx)(W,{logo:i}),(0,a.jsx)($,{primaryButton:t,secondaryButton:l}),(0,a.jsx)(I,{showMenu:m})]})}),(0,a.jsx)(P,{menu:r,showMenu:m,links:e,primaryButton:t,secondaryButton:l})]})}function F({links:e}){return e?(0,a.jsx)(c.Flex,{children:(0,a.jsx)("ul",{className:"hidden lg:flex lg:items-center lg:gap-3 xl:gap-5",children:e==null?void 0:e.map((t,l)=>(0,a.jsxs)(f.default.Fragment,{children:[(t==null?void 0:t.label)&&(0,a.jsx)(j,{link:t}),e.length!==l+1?(0,a.jsx)(S,{}):null]},l))})}):null}function j({link:e}){return e?(0,a.jsx)("li",{children:(0,a.jsx)(n.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})}):null}function S(){return(0,a.jsx)("li",{className:"text-gray-500",children:(0,a.jsx)("svg",{className:"w-4 h-4 current-fill",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})}function W({logo:e}){var t;return e?(0,a.jsx)("div",{className:"w-full lg:w-fit items-center justify-center",children:(0,a.jsx)(x.Link,{className:"w-20 h-14 flex justify-center items-center","aria-label":v(e)==="/"?"Go to home page":`Go to ${v(e)}`,href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(u.Image,{className:"w-fit h-full object-contain",src:`${e==null?void 0:e.image}`,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",alt:(t=e==null?void 0:e.alt)!=null?t:"navigation-logo"})})}):null}function $({primaryButton:e,secondaryButton:t}){return(0,a.jsxs)("div",{className:"hidden lg:flex lg:gap-4",children:[(e==null?void 0:e.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"px-4 py-3 leading-loose text-center text-gray-900 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(t==null?void 0:t.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"px-4 py-3 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:t==null?void 0:t.label})]})}function I({showMenu:e}){return(0,a.jsx)("div",{className:"ml-auto lg:hidden",children:(0,a.jsx)(n.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:(0,a.jsxs)("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("title",{children:"Mobile menu"}),(0,a.jsx)("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function P({menu:e,showMenu:t,links:l,primaryButton:i,secondaryButton:r}){return(0,a.jsxs)("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:t}),(0,a.jsxs)("nav",{className:"fixed top-0 bottom-0 left-0 flex flex-col w-5/6 max-w-sm px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,a.jsx)("div",{className:"flex items-center mb-8",children:(0,a.jsx)(n.Button,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:t,children:(0,a.jsx)("svg",{className:"w-6 h-6 text-gray-500 cursor-pointer hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,a.jsx)("ul",{children:l&&l.map((s,m)=>(0,a.jsx)("li",{className:"mb-1",children:(0,a.jsx)(n.Button,{as:"link",ariaLabel:s.label,link:s,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:s.label})},m))}),(0,a.jsxs)("div",{className:"mt-auto pt-6",children:[(i==null?void 0:i.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:i.label,link:i,className:"block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:i.label}),(r==null?void 0:r.label)&&(0,a.jsx)(n.Button,{as:"link",ariaLabel:r.label,link:r,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global",children:r.label})]}),(0,a.jsx)(h.Text,{fontSize:"xs",muted:!0,className:"my-4 text-center",children:(0,a.jsx)("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})}0&&(module.exports={Navigation_D});
|
package/dist/navigation_e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var w=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var R=(e,r)=>{for(var a in r)w(e,a,{get:r[a],enumerable:!0})},T=(e,r,a,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of F(r))!P.call(e,s)&&s!==a&&w(e,s,{get:()=>r[s],enumerable:!(n=M(r,s))||n.enumerable});return e};var z=e=>T(w({},"__esModule",{value:!0}),e);var Z={};R(Z,{Navigation_E:()=>S,default:()=>S});module.exports=z(Z);var N=require("@portabletext/react"),m=require("@stackshift-ui/button"),p=require("@stackshift-ui/flex"),b=require("@stackshift-ui/image"),g=require("@stackshift-ui/link"),k=require("@stackshift-ui/section"),o=require("react");var u=e=>{var r,a,n;return e!=null&&e.internalLink&&(e==null?void 0:e.type)==="linkInternal"?(a=(r=e==null?void 0:e.internalLink)==null?void 0:r.toLowerCase())!=null&&a.includes("home")?"/":`/${e.internalLink}`:e!=null&&e.externalLink&&(e==null?void 0:e.type)==="linkExternal"&&(n=e==null?void 0:e.externalLink)!=null?n:"/"};var C=require("@stackshift-ui/text"),l=require("react/jsx-runtime"),L={block:{normal:({children:e})=>(0,l.jsx)(C.Text,{fontSize:"xs",weight:"bold",className:"text-white ",children:e})},code:({value:e})=>(0,l.jsx)("pre",{"data-language":e.language,children:(0,l.jsx)("code",{children:e.code})}),marks:{strong:({children:e})=>(0,l.jsx)("strong",{children:e}),em:({children:e})=>(0,l.jsx)("em",{children:e}),code:({children:e})=>(0,l.jsx)("code",{children:e}),link:({children:e,value:r})=>{var a;return(0,l.jsx)("a",{"aria-label":(a=r==null?void 0:r.href)!=null?a:"external link",className:"text-primary-foreground hover:text-secondary-foreground",href:r==null?void 0:r.href,target:"_blank",rel:"noopener noreferrer",children:e})}}};function S({banner:e,logo:r,links:a}){let[n,s]=(0,o.useState)(!1),[h,v]=(0,o.useState)(!1),[c,i]=(0,o.useState)(""),f=(0,o.useRef)("");(0,o.useEffect)(()=>{f.current=c},[c]);let d=()=>s(!n),x=B=>{B.preventDefault();let y=document.getElementById("query");y&&(i(y.value),window.location.href=`/search?q=${c}`)};return(0,l.jsxs)(k.Section,{className:"relative bg-background",children:[(0,l.jsx)(E,{banner:e}),(0,l.jsxs)(p.Flex,{as:"nav",justify:"between",className:"relative",children:[(0,l.jsxs)(p.Flex,{align:"center",className:"w-full px-12 py-8",children:[(0,l.jsx)(H,{logo:r}),(0,l.jsx)(I,{links:a})]}),(0,l.jsxs)("div",{className:"items-center hidden lg:flex lg:gap-10",children:[(0,l.jsx)(Q,{showSearchBar:h,setShowSearchBar:v}),(0,l.jsx)($,{showSearchBar:h,handleSearchRouting:x,productQuery:c,setProductQuery:i}),(0,l.jsx)(A,{}),(0,l.jsx)(W,{})]}),(0,l.jsx)(j,{showMenu:d})]}),(0,l.jsx)(_,{logo:r,links:a,menu:n,showMenu:d,handleSearchRouting:x,productQuery:c,setProductQuery:i})]})}function E({banner:e}){return e?(0,l.jsx)("div",{className:"py-2 bg-primary",children:(0,l.jsxs)(p.Flex,{align:"center",justify:"center",children:[(0,l.jsxs)("svg",{className:"mr-2",width:18,height:11,viewBox:"0 0 18 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("rect",{y:"3.07129",width:4,height:10,rx:2,transform:"rotate(-45 0 3.07129)",fill:"white"}),(0,l.jsx)("rect",{x:8,y:"2.82861",width:4,height:10,rx:2,transform:"rotate(-45 8 2.82861)",fill:"white"})]}),(0,l.jsx)(N.PortableText,{value:e,components:L,onMissingComponent:!1})]})}):null}function H({logo:e}){var r;return e?(0,l.jsx)(g.Link,{"aria-label":`Go to ${u(e)==="/"?"home page":u(e)}`,className:"text-3xl font-bold leading-none",href:u(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,l.jsx)(b.Image,{src:e==null?void 0:e.image,width:48,height:48,alt:(r=e==null?void 0:e.alt)!=null?r:"navigation-logo"})}):null}function I({links:e}){return e?(0,l.jsx)("ul",{className:"hidden transform main-nav top-1/2 lg:flex lg:gap-10 lg:justify-center lg:items-center",children:e.map((r,a)=>(0,l.jsx)(o.Fragment,{children:(0,l.jsx)(q,{link:r})},a))}):null}function q({link:e}){return e?(0,l.jsx)("li",{children:(0,l.jsx)(m.Button,{as:"link",variant:"link",ariaLabel:e==null?void 0:e.label,link:e,className:(e==null?void 0:e.type)==="linkInternal"?"xl:mr-12 lg:mr-8 font-bold font-heading hover:text-gray-600 no-underline text-black":"mr-12 font-bold font-heading hover:text-gray-600 no-underline text-black",children:e==null?void 0:e.label})}):null}function Q({showSearchBar:e,setShowSearchBar:r}){return(0,l.jsx)(m.Button,{as:"button",variant:"unstyled",ariaLabel:"Search button",type:"button",onClick:()=>r(!e),children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M23.809 21.646l-6.205-6.205c1.167-1.605 1.857-3.579 1.857-5.711 0-5.365-4.365-9.73-9.731-9.73-5.365 0-9.73 4.365-9.73 9.73 0 5.366 4.365 9.73 9.73 9.73 2.034 0 3.923-.627 5.487-1.698l6.238 6.238 2.354-2.354zm-20.955-11.916c0-3.792 3.085-6.877 6.877-6.877s6.877 3.085 6.877 6.877-3.085 6.877-6.877 6.877c-3.793 0-6.877-3.085-6.877-6.877z"})})})}function $({showSearchBar:e,handleSearchRouting:r,productQuery:a,setProductQuery:n}){return e?(0,l.jsxs)("form",{id:"form",className:"flex items-center pl-8 mb-10 mr-auto bg-white lg:mb-0",method:"get",role:"search",onSubmit:r,children:[(0,l.jsx)("input",{id:"query",name:"query","aria-label":"Search...",className:"inline-block w-40 h-full p-2 mt-1 text-sm bg-white border shadow-sm border-slate-300 placeholder-slate-400 focus:border-primary-foreground focus:outline-none focus:ring-1 focus:ring-primary-foreground",placeholder:"Search...",onChange:s=>n(s.target.value),type:"search"}),(0,l.jsx)(m.Button,{as:"button",variant:"unstyled",ariaLabel:"Submit product search",className:`mt-1 inline-flex h-[35px] w-10 items-center justify-center bg-primary ${a===""?"cursor-not-allowed opacity-50":"transition duration-200 hover:bg-primary-foreground"}`,disabled:a==="",type:"submit",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M23.809 21.646l-6.205-6.205c1.167-1.605 1.857-3.579 1.857-5.711 0-5.365-4.365-9.73-9.731-9.73-5.365 0-9.73 4.365-9.73 9.73 0 5.366 4.365 9.73 9.73 9.73 2.034 0 3.923-.627 5.487-1.698l6.238 6.238 2.354-2.354zm-20.955-11.916c0-3.792 3.085-6.877 6.877-6.877s6.877 3.085 6.877 6.877-3.085 6.877-6.877 6.877c-3.793 0-6.877-3.085-6.877-6.877z"})})})]}):null}function j({showMenu:e}){return(0,l.jsx)(m.Button,{variant:"unstyled",as:"button",ariaLabel:"Nav Sidebar",className:"self-center mr-12 navbar-burger lg:hidden",onClick:e,children:(0,l.jsx)("svg",{width:20,height:12,viewBox:"0 0 20 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M1 2H19C19.2652 2 19.5196 1.89464 19.7071 1.70711C19.8946 1.51957 20 1.26522 20 1C20 0.734784 19.8946 0.48043 19.7071 0.292893C19.5196 0.105357 19.2652 0 19 0H1C0.734784 0 0.48043 0.105357 0.292893 0.292893C0.105357 0.48043 0 0.734784 0 1C0 1.26522 0.105357 1.51957 0.292893 1.70711C0.48043 1.89464 0.734784 2 1 2ZM19 10H1C0.734784 10 0.48043 10.1054 0.292893 10.2929C0.105357 10.4804 0 10.7348 0 11C0 11.2652 0.105357 11.5196 0.292893 11.7071C0.48043 11.8946 0.734784 12 1 12H19C19.2652 12 19.5196 11.8946 19.7071 11.7071C19.8946 11.5196 20 11.2652 20 11C20 10.7348 19.8946 10.4804 19.7071 10.2929C19.5196 10.1054 19.2652 10 19 10ZM19 5H1C0.734784 5 0.48043 5.10536 0.292893 5.29289C0.105357 5.48043 0 5.73478 0 6C0 6.26522 0.105357 6.51957 0.292893 6.70711C0.48043 6.89464 0.734784 7 1 7H19C19.2652 7 19.5196 6.89464 19.7071 6.70711C19.8946 6.51957 20 6.26522 20 6C20 5.73478 19.8946 5.48043 19.7071 5.29289C19.5196 5.10536 19.2652 5 19 5Z",fill:"currentColor"})})})}function A(){return(0,l.jsxs)("div",{className:"cart-icon cart-link",children:[(0,l.jsx)("svg",{"data-icon":"BAG",className:"ec-minicart__icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M20 7h-4v-3c0-2.209-1.791-4-4-4s-4 1.791-4 4v3h-4l-2 17h20l-2-17zm-11-3c0-1.654 1.346-3 3-3s3 1.346 3 3v3h-6v-3zm-4.751 18l1.529-13h2.222v1.5c0 .276.224.5.5.5s.5-.224.5-.5v-1.5h6v1.5c0 .276.224.5.5.5s.5-.224.5-.5v-1.5h2.222l1.529 13h-15.502z"})}),(0,l.jsx)("a",{className:"cart-link",href:"/cart?store-page=cart","aria-label":"Cart"})]})}function W(){return(0,l.jsx)("a",{"aria-label":"Account",href:"/cart?store-page=account",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M12 2c2.757 0 5 2.243 5 5.001 0 2.756-2.243 5-5 5s-5-2.244-5-5c0-2.758 2.243-5.001 5-5.001zm0-2c-3.866 0-7 3.134-7 7.001 0 3.865 3.134 7 7 7s7-3.135 7-7c0-3.867-3.134-7.001-7-7.001zm6.369 13.353c-.497.498-1.057.931-1.658 1.302 2.872 1.874 4.378 5.083 4.972 7.346h-19.387c.572-2.29 2.058-5.503 4.973-7.358-.603-.374-1.162-.811-1.658-1.312-4.258 3.072-5.611 8.506-5.611 10.669h24c0-2.142-1.44-7.557-5.631-10.647z"})})})}function _({logo:e,links:r,menu:a,showMenu:n,handleSearchRouting:s,productQuery:h,setProductQuery:v}){var c;return(0,l.jsxs)("div",{className:`${a?null:"hidden"} mobile-nav fixed bottom-0 right-0 top-0 w-5/6 max-w-sm`,style:{zIndex:60},children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-gray-800 opacity-25",onClick:n}),(0,l.jsxs)("nav",{className:"relative flex flex-col w-full h-full px-6 py-6 overflow-y-auto bg-white border-r",children:[(0,l.jsxs)("div",{className:"flex items-center mb-8",children:[e&&(0,l.jsx)(g.Link,{"aria-label":`Go to ${u(e)==="/"?"home page":u(e)}`,className:"text-3xl font-bold leading-none",href:u(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:(0,l.jsx)(b.Image,{src:e==null?void 0:e.image,alt:(c=e==null?void 0:e.alt)!=null?c:"navigation-logo",width:48,height:48,className:"text-3xl font-bold leading-none"})}),(0,l.jsx)(m.Button,{variant:"unstyled",as:"button",ariaLabel:"Close navigation menu",className:"ml-auto",onClick:n,children:(0,l.jsx)("svg",{className:"w-2 h-2 text-gray-500 cursor-pointer",width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M9.00002 1L1 9.00002M1.00003 1L9.00005 9.00002",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,l.jsxs)("form",{id:"form",className:"flex mt-3 bg-white",method:"get",role:"search",onSubmit:s,children:[(0,l.jsx)("input",{id:"query",name:"query","aria-label":"Search product",className:"inline-block w-full h-full p-2 text-sm bg-white border shadow-sm border-slate-300 placeholder-slate-400 focus:border-primary-foreground focus:outline-none focus:ring-1 focus:ring-primary-foreground sm:w-60",placeholder:"Search...",onChange:i=>v(i.target.value),type:"search"}),(0,l.jsx)(m.Button,{variant:"unstyled",as:"button",ariaLabel:"Submit product search",className:`inline-flex h-full w-10 items-center justify-center bg-primary ${h===""?"cursor-not-allowed opacity-50":"transition duration-200 hover:bg-primary-foreground"}`,disabled:h==="",type:"submit",children:(0,l.jsx)("svg",{width:7,height:12,viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M4.125 6.00252L0 1.87752L1.17801 0.699219L6.48102 6.00252L1.17801 11.3058L0 10.1275L4.125 6.00252Z",fill:"white"})})})]}),(0,l.jsx)("ul",{className:"mt-10 mb-5",children:r&&r.map((i,f)=>{var d;return(0,l.jsx)(o.Fragment,{children:(0,l.jsx)("li",{className:"mb-8",children:(0,l.jsx)(m.Button,{as:"link",variant:"link",ariaLabel:(d=i==null?void 0:i.label)!=null?d:`navigation link ${f+1}`,link:i,className:"font-bold text-black no-underline font-heading hover:text-gray-600",children:i==null?void 0:i.label})})},f)})}),(0,l.jsx)("hr",{}),(0,l.jsxs)("div",{className:"flex items-center mx-auto mt-3",children:[(0,l.jsxs)("a",{className:"flex mr-10 cart-icon cart-link","aria-label":"Cart",href:"/cart?store-page=cart",children:[(0,l.jsx)("div",{"data-icon":"BAG",className:"ec-cart-widget"}),(0,l.jsx)("span",{className:"my-auto text-sm",children:"Cart"})]}),(0,l.jsxs)("a",{className:"flex","aria-label":"Account",href:"/cart?store-page=account",children:[(0,l.jsxs)("svg",{width:32,height:31,viewBox:"0 0 32 31",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M16.0006 16.3154C19.1303 16.3154 21.6673 13.799 21.6673 10.6948C21.6673 7.59064 19.1303 5.07422 16.0006 5.07422C12.871 5.07422 10.334 7.59064 10.334 10.6948C10.334 13.799 12.871 16.3154 16.0006 16.3154Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M24.4225 23.8963C23.6678 22.3507 22.4756 21.0445 20.9845 20.1298C19.4934 19.2151 17.7647 18.7295 15.9998 18.7295C14.2349 18.7295 12.5063 19.2151 11.0152 20.1298C9.52406 21.0445 8.33179 22.3507 7.57715 23.8963",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,l.jsx)("span",{className:"my-auto text-sm",children:"Account"})]})]})]})]})}0&&(module.exports={Navigation_E});
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var g=(n,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of a(t))!o.call(n,e)&&e!==r&&l(n,e,{get:()=>t[e],enumerable:!(i=s(t,e))||i.enumerable});return n};var u=n=>g(l({},"__esModule",{value:!0}),n);var c={};module.exports=u(c);
|
package/src/helper/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Logo } from "../types";
|
|
2
|
-
|
|
3
|
-
export const logoLink = (logo: Logo) => {
|
|
4
|
-
if (logo?.internalLink && logo?.type === "linkInternal") {
|
|
5
|
-
if (logo?.internalLink?.toLowerCase()?.includes("home")) {
|
|
6
|
-
return "/";
|
|
7
|
-
}
|
|
8
|
-
return `/${logo.internalLink}`;
|
|
9
|
-
} else if (logo?.externalLink && logo?.type === "linkExternal") {
|
|
10
|
-
return logo?.externalLink ?? "/";
|
|
11
|
-
} else {
|
|
12
|
-
return "/";
|
|
13
|
-
}
|
|
14
|
-
};
|