@stackshift-ui/navigation 6.0.2 → 6.0.4

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/src/types.ts ADDED
@@ -0,0 +1,418 @@
1
+ import { PortableTextComponents } from "@portabletext/react";
2
+
3
+ export type StyleVariants<T extends string> = Record<T, string>;
4
+
5
+ export type Socials = "facebook" | "instagram" | "youtube" | "linkedin" | "twitter";
6
+ export interface MainImage {
7
+ image: string;
8
+ alt?: string;
9
+ }
10
+
11
+ export interface LabeledRoute extends ConditionalLink {
12
+ ariaLabel?: string;
13
+ label?: string;
14
+ linkTarget?: string;
15
+ linkType?: string;
16
+ _type?: string;
17
+ linkInternal?: any;
18
+ }
19
+ export interface ConditionalLink {
20
+ type?: string;
21
+ internalLink?: string | null;
22
+ externalLink?: string | null;
23
+ }
24
+
25
+ export interface StatItems {
26
+ label?: string;
27
+ mainImage?: MainImage;
28
+ value?: string;
29
+ _key?: string;
30
+ _type?: string;
31
+ }
32
+
33
+ export interface Logo extends ConditionalLink {
34
+ alt?: string;
35
+ linkTarget?: string;
36
+ image?: string;
37
+ }
38
+
39
+ export interface Images {
40
+ image?: string;
41
+ _key?: string;
42
+ _type?: string;
43
+ alt?: string;
44
+ }
45
+
46
+ export interface ContactDetails {
47
+ addressInfo?: string;
48
+ contactInfo?: string;
49
+ emailInfo?: string;
50
+ _key?: string;
51
+ }
52
+
53
+ export interface SocialLink {
54
+ socialMedia?: string | null;
55
+ socialMediaLink?: string | null;
56
+ _key?: string | null;
57
+ _type?: string | null;
58
+ socialMediaIcon?: {
59
+ alt?: string;
60
+ image?: string;
61
+ } | null;
62
+ socialMediaPlatform?: string | null;
63
+ }
64
+
65
+ export interface LabeledRouteWithKey extends LabeledRoute {
66
+ _key?: string;
67
+ }
68
+
69
+ export interface ArrayOfImageTitleAndText {
70
+ mainImage?: {
71
+ alt?: string;
72
+ image?: string;
73
+ };
74
+ plainText?: string;
75
+ title?: string;
76
+ _key?: string;
77
+ _type?: string;
78
+ }
79
+
80
+ export interface FeaturedItem {
81
+ description?: string;
82
+ mainImage?: MainImage;
83
+ title?: string;
84
+ subtitle?: string;
85
+ _key?: string;
86
+ _type?: string;
87
+ }
88
+
89
+ export interface ArrayOfTitleAndText {
90
+ _key?: string;
91
+ plainText?: string;
92
+ title?: string;
93
+ }
94
+
95
+ export interface BlogPost extends SanityBody {
96
+ authors?: Author[] | null;
97
+ body?: any;
98
+ categories?: Category[] | null;
99
+ excerpt?: string | null;
100
+ link?: string | null;
101
+ mainImage?: string | null;
102
+ publishedAt?: string;
103
+ seo?: Seo | null;
104
+ slug?: SanitySlug | null;
105
+ title?: string;
106
+ }
107
+
108
+ export interface Seo {
109
+ _type?: string;
110
+ seoTitle?: string;
111
+ seoDescription?: string;
112
+ seoImage?: string;
113
+ seoKeywords?: string;
114
+ seoSynonyms?: string;
115
+ }
116
+
117
+ export interface SanitySlug {
118
+ current?: string;
119
+ _type?: "slug";
120
+ }
121
+
122
+ export interface SanityBody {
123
+ _createdAt?: string;
124
+ _id?: string;
125
+ _rev?: string;
126
+ _type?: string;
127
+ _updatedAt?: string;
128
+ }
129
+
130
+ export interface Author extends SanityBody {
131
+ link?: string | null;
132
+ bio?: string | null;
133
+ name?: string | null;
134
+ slug?: SanitySlug | null;
135
+ image?: string | null;
136
+ profile?: {
137
+ alt: string;
138
+ image: string;
139
+ } | null;
140
+ }
141
+
142
+ export interface Category extends SanityBody {
143
+ title?: string;
144
+ }
145
+
146
+ export interface Form {
147
+ id?: string | null;
148
+ buttonLabel?: string | null;
149
+ name?: string | null;
150
+ subtitle?: string | null;
151
+ fields?: FormFields[] | null;
152
+ thankYouPage?: ThankYouPage | null;
153
+ }
154
+
155
+ export interface FormFields {
156
+ name?: string;
157
+ placeholder?: string;
158
+ pricingType?: string;
159
+ type?: FormTypes;
160
+ _key?: string;
161
+ _type?: string;
162
+ isRequired?: boolean;
163
+ label?: string;
164
+ items?: string[];
165
+ }
166
+
167
+ export type FormTypes =
168
+ | "inputText"
169
+ | "inputEmail"
170
+ | "inputPassword"
171
+ | "inputNumber"
172
+ | "textarea"
173
+ | "inputFile"
174
+ | "inputRadio"
175
+ | "inputCheckbox"
176
+ | "inputSelect";
177
+
178
+ export interface ThankYouPage {
179
+ externalLink?: string | null;
180
+ internalLink?: string | null;
181
+ linkInternal?: any;
182
+ linkTarget?: string;
183
+ linkType?: string;
184
+ type?: string;
185
+ }
186
+
187
+ //Used on different sections
188
+ export interface SectionsProps {
189
+ template?: Template;
190
+ data?: Sections;
191
+ variant?: string | null | undefined;
192
+ schema?: Variants;
193
+ }
194
+
195
+ export interface Sections extends SanityBody {
196
+ label?: string;
197
+ variant?: string;
198
+ variants?: Variants;
199
+ _key?: string;
200
+ }
201
+
202
+ //*EDIT THIS SECTION WHEN CREATING/UPDATING SCHEMAS ON STUDIO */
203
+ export interface Variants {
204
+ template?: Template;
205
+ multipleMenus?: any;
206
+ arrayOfTitleAndText?: ArrayOfTitleAndText[] | null;
207
+ logo?: Logo | null;
208
+ primaryButton?: LabeledRoute | null;
209
+ secondaryButton?: LabeledRoute | null;
210
+ routes?: LabeledRouteWithKey[] | null;
211
+ menu?: LabeledRouteWithKey[] | null;
212
+ plans?: Plans[] | null;
213
+ formLinks?: LabeledRouteWithKey[] | null;
214
+ portfolios?: Portfolios[] | null;
215
+ portfoliosWithCategories?: PortfoliosWithCategories[] | null;
216
+ length?: number;
217
+ signInLink?: LabeledRoute | null;
218
+ signinLink?: LabeledRoute | null;
219
+ tags?: string[] | null;
220
+ posts?: BlogPost[] | null;
221
+ blogsPerPage?: number | null;
222
+ form?: Form | null;
223
+ collections?: Collection | null;
224
+ products?: CollectionProduct | null;
225
+ allProducts?: Collection[];
226
+ subtitle?: string | null;
227
+ caption?: string | null;
228
+ title?: string | null;
229
+ plainText?: string | null;
230
+ contactDescription?: string | null;
231
+ officeInformation?: string | null;
232
+ contactEmail?: string | null;
233
+ contactNumber?: string | null;
234
+ socialLinks?: SocialLink[] | null;
235
+ block?: any;
236
+ heading?: string | null;
237
+ acceptButtonLabel?: string | null;
238
+ declineButtonLabel?: string | null;
239
+ faqsWithCategories?: FaqsWithCategory[] | null;
240
+ faqs?: AskedQuestion[] | null;
241
+ arrayOfImageTitleAndText?: ArrayOfImageTitleAndText[] | null;
242
+ description?: string | null;
243
+ featuredItems?: FeaturedItem[] | null;
244
+ images?: Images[] | null;
245
+ contactDetails?: ContactDetails[] | null;
246
+ copyright?: string | null;
247
+ mainImage?: MainImage | null;
248
+ youtubeLink?: string | null;
249
+ banner?: any;
250
+ stats?: StatItems[] | null;
251
+ teams?: Team[] | null;
252
+ testimonials?: Testimonial[] | null;
253
+ selectStripeAccount?: string;
254
+ annualBilling?: string;
255
+ monthlyBilling?: string;
256
+ productDetails?: ProductDetail[];
257
+ btnLabel?: string;
258
+ selectAccount?: string;
259
+ hashtags?: string[];
260
+ numberOfPosts?: number;
261
+ text?: string;
262
+ button?: LabeledRoute;
263
+ features?: string[];
264
+ config?: {
265
+ enableAnalytics: boolean;
266
+ cookiePolicy?: {
267
+ siteName: string;
268
+ cookiePolicyPage: Reference;
269
+ };
270
+ consentModalPosition?: string;
271
+ };
272
+ contactLink?: LabeledRoute;
273
+ }
274
+
275
+ export interface Template {
276
+ bg?: string;
277
+ color?: string;
278
+ }
279
+
280
+ export type Plans = {
281
+ _key?: string | null;
282
+ _type?: "planItems" | null;
283
+ checkoutButtonName?: string | null;
284
+ description?: string | null;
285
+ monthlyPrice?: string | null;
286
+ planType?: string | null;
287
+ yearlyPrice?: string | null;
288
+ planIncludes?: string[] | null;
289
+ primaryButton?: LabeledRoute | null;
290
+ } & Record<string, string>;
291
+
292
+ export interface Portfolios {
293
+ dateAdded?: string | null;
294
+ mainImage?: {
295
+ image?: string | null;
296
+ alt?: string | null;
297
+ } | null;
298
+ primaryButton?: LabeledRoute | null;
299
+ title?: string | null;
300
+ _key?: string | null;
301
+ _type?: string | null;
302
+ }
303
+
304
+ export interface PortfoliosWithCategories {
305
+ category?: string | null;
306
+ content?: Content[] | null;
307
+ primaryButton?: LabeledRoute | null;
308
+ _key?: string | null;
309
+ _type?: string | null;
310
+ }
311
+
312
+ export interface Content extends Portfolios {
313
+ description?: string | null;
314
+ subtitle?: string | null;
315
+ }
316
+
317
+ export interface Collection extends SanityBody {
318
+ collectionInfoVariant?: {
319
+ variant?: string;
320
+ } | null;
321
+ name?: string | null;
322
+ products?: CollectionProduct[] | null;
323
+ sections?: any; //todo
324
+ seo?: Seo | null;
325
+ slug?: SanitySlug | null;
326
+ }
327
+
328
+ export interface CollectionProduct extends SanityBody {
329
+ compareToPrice?: number | null;
330
+ description?: string | null;
331
+ ecwidProductId?: number | null;
332
+ name?: string | null;
333
+ price?: number | null;
334
+ productInfo?: ProductInfo | null;
335
+ productInfoVariant?: {
336
+ variant?: string;
337
+ } | null;
338
+ sections?: any; //todo
339
+ seo?: Seo | null;
340
+ slug?: SanitySlug | null;
341
+ }
342
+
343
+ //TODO, RECHECK PRODUCT INFO DATA FROM SANITY
344
+ interface ProductInfo {
345
+ btnLabel?: string | null;
346
+ images?: ProductInfoImage[] | null;
347
+ productDetails?: ProductDetail[] | null;
348
+ socialLinks?: SocialLink[] | null;
349
+ subtitle?: string | null;
350
+ }
351
+
352
+ //TODO, RECHECK PRODUCT INFO DATA FROM SANITY
353
+ export interface ProductDetail {
354
+ blockContent?: any;
355
+ contentType?: string;
356
+ tabName?: string;
357
+ _key?: string;
358
+ [key: string]: any;
359
+ }
360
+ interface ProductInfoImage {
361
+ alt?: string | null;
362
+ _key: string;
363
+ _type: string;
364
+ image?: string | null;
365
+ }
366
+
367
+ export interface FaqsWithCategory {
368
+ askedQuestions?: AskedQuestion[] | null;
369
+ category?: string | null;
370
+ _key?: string;
371
+ _type?: string;
372
+ }
373
+
374
+ export interface AskedQuestion {
375
+ answer?: string | null;
376
+ question?: string | null;
377
+ hidden?: boolean;
378
+ _key?: string;
379
+ _type?: string;
380
+ }
381
+
382
+ export interface Team {
383
+ jobTitle?: string;
384
+ mainImage?: MainImage;
385
+ name?: string;
386
+ plainText?: string;
387
+ _key?: string;
388
+ _type?: string;
389
+ }
390
+
391
+ export interface Testimonial {
392
+ jobTitle?: string;
393
+ mainImage?: MainImage;
394
+ name?: string;
395
+ rating?: string;
396
+ testimony?: string;
397
+ _key?: string;
398
+ _type?: string;
399
+ }
400
+
401
+ export declare interface Reference {
402
+ _type: string;
403
+ _ref: string;
404
+ _key?: string;
405
+ _weak?: boolean;
406
+ _strengthenOnPublish?: {
407
+ type: string;
408
+ weak?: boolean;
409
+ template?: {
410
+ id: string;
411
+ params: Record<string, string | number | boolean>;
412
+ };
413
+ };
414
+ }
415
+
416
+ export type MyPortableTextComponents = PortableTextComponents & {
417
+ code?: ({ value }: { value: { language?: string; code?: string } }) => JSX.Element;
418
+ };
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-KQFO7OZP.mjs";import{Button as b}from"@stackshift-ui/button";import{Container as g}from"@stackshift-ui/container";import{Flex as x}from"@stackshift-ui/flex";import{Image as f}from"@stackshift-ui/image";import{Link as c}from"@stackshift-ui/link";import{Section as h}from"@stackshift-ui/section";import{Text as N}from"@stackshift-ui/text";import v from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";function p({links:e,primaryButton:l,secondaryButton:s,logo:t}){let[i,r]=v.useState(!1),m=()=>{r(d=>!d)};return n(h,{className:"bg-background",children:[a("nav",{className:"relative px-6 py-6",children:a(g,{maxWidth:1e3,children:n(x,{align:"center",children:[a(u,{links:e}),a(k,{logo:t}),a(M,{primaryButton:l,secondaryButton:s}),a(R,{showMenu:m})]})})}),a(z,{menu:i,showMenu:m,links:e,primaryButton:l,secondaryButton:s})]})}function u({links:e}){return e?a("ul",{className:"hidden lg:flex lg:w-auto lg:items-center lg:space-x-5",children:e.map((l,s)=>n(v.Fragment,{children:[(l==null?void 0:l.label)&&a(w,{link:l}),e.length!==s+1&&a(L,{})]},s))}):null}function w({link:e}){return e?a("li",{children:a(b,{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 L(){return a("li",{className:"text-gray-500",children:a("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:a("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 k({logo:e}){var l;return e?a("div",{className:"lg:absolute lg:left-1/2 lg:top-1/2 lg:-translate-x-1/2 lg:-translate-y-1/2 lg:transform",children:a(c,{"aria-label":`Go to ${o(e)==="/"?"home page":o(e)}`,className:"text-3xl font-bold leading-none",href:o(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(f,{src:e==null?void 0:e.image,alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo",width:100,height:100,className:"text-3xl font-bold leading-none"})})}):null}function M({primaryButton:e,secondaryButton:l}){return n(v.Fragment,{children:[(e==null?void 0:e.label)&&a(b,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"hidden lg:inline-block px-4 py-3 mb-2 text-gray-900 lg:ml-auto lg:mr-3 font-semibold rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&a(b,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"hidden lg:inline-block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-l-xl rounded-t-xl",children:l==null?void 0:l.label})]})}function R({showMenu:e}){return a("div",{className:"ml-auto lg:hidden",children:a(b,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[a("title",{children:"Mobile menu"}),a("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function z({menu:e,showMenu:l,links:s,primaryButton:t,secondaryButton:i}){return n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[a("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),n("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:[a("div",{className:"flex items-center mb-8",children:a(b,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:l,children:a("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:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),a("div",{children:a("ul",{children:s&&(s==null?void 0:s.map((r,m)=>a("li",{className:"mb-1",children:a(b,{as:"link",ariaLabel:r==null?void 0:r.label,link:r,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:r==null?void 0:r.label})},m)))})}),n("div",{className:"mt-auto",children:[n("div",{className:"pt-6",children:[(t==null?void 0:t.label)&&a(b,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:t==null?void 0:t.label}),(i==null?void 0:i.label)&&a(b,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-l-xl rounded-t-xl",children:i==null?void 0:i.label})]}),a(N,{fontSize:"xs",muted:!0,className:"my-4 text-center ",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}export{p as a};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-KQFO7OZP.mjs";import{Button as o}from"@stackshift-ui/button";import{Flex as b}from"@stackshift-ui/flex";import{Image as c}from"@stackshift-ui/image";import{Link as f}from"@stackshift-ui/link";import{Section as g}from"@stackshift-ui/section";import{Text as u}from"@stackshift-ui/text";import x from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";function h({links:e,primaryButton:a,secondaryButton:s,logo:t}){let[r,i]=x.useState(!1),v=()=>{i(d=>!d)};return n(g,{className:"bg-background",children:[n(b,{align:"center",justify:"between",className:"px-6 py-6",children:[l(p,{logo:t}),l(w,{links:e}),l(k,{primaryButton:a,secondaryButton:s}),l(R,{showMenu:v})]}),l(M,{menu:r,showMenu:v,links:e,primaryButton:a,secondaryButton:s})]})}function p({logo:e}){var a;return e?l(f,{"aria-label":`Go to ${m(e)==="/"?"home page":m(e)}`,className:"text-3xl font-bold leading-none",href:m(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:l(c,{src:e==null?void 0:e.image,alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo",width:50,height:50,className:"text-3xl font-bold leading-none"})}):null}function N(){return l("li",{className:"text-gray-500",children:l("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:l("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({links:e}){return e?l(b,{children:l("ul",{className:"hidden lg:flex lg:items-center lg:space-x-6",children:e==null?void 0:e.map((a,s)=>n(x.Fragment,{children:[l(L,{link:a},a._key),e.length!==s+1?l(N,{}):null]},s))})}):null}function L({link:e}){return e!=null&&e.label?l("li",{children:l(o,{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 M({menu:e,showMenu:a,links:s,primaryButton:t,secondaryButton:r}){return n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[l("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),n(b,{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:[l(F,{showMenu:a}),l("div",{className:"w-full",children:s?l("ul",{children:s==null?void 0:s.map((i,v)=>l("li",{className:"mb-1",children:l(o,{as:"link",ariaLabel:i==null?void 0:i.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:i,children:i==null?void 0:i.label})},v))}):null}),n("div",{className:"w-full mt-auto",children:[n(b,{direction:"col",className:"pt-6 space-x-2",children:[t!=null&&t.label?l(o,{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-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:t==null?void 0:t.label}):null,r!=null&&r.label?l(o,{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-l-xl rounded-t-xl",children:r==null?void 0:r.label}):null]}),l(u,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:l("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}function R({showMenu:e}){return l("div",{className:"lg:hidden",children:l(o,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[l("title",{children:"Mobile menu"}),l("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function k({primaryButton:e,secondaryButton:a}){return n(b,{gap:4,children:[e!=null&&e.label?l(o,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,variant:"outline",className:"hidden lg:flex px-4 py-3 mb-2 leading-loose text-center font-semibold text-gray-900 rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}):null,a!=null&&a.label?l(o,{as:"link",link:a,ariaLabel:a==null?void 0:a.label,variant:"solid",className:"hidden lg:flex px-4 py-3 mb-2 leading-loose text-center font-semibold text-white bg-primary hover:bg-primary-foreground rounded-l-xl rounded-t-xl",children:a==null?void 0:a.label}):null]})}function F({showMenu:e}){return l("div",{className:"flex items-center mb-8",children:l(o,{variant:"unstyled",as:"button",ariaLabel:"Navigation Menu",className:"navbar-close",onClick:e,children:l("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:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})})}export{h as a};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-KQFO7OZP.mjs";import{Button as b}from"@stackshift-ui/button";import{Container as x}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Image as f}from"@stackshift-ui/image";import{Link as c}from"@stackshift-ui/link";import{Section as h}from"@stackshift-ui/section";import{Text as u}from"@stackshift-ui/text";import v from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";function N({links:e,primaryButton:l,secondaryButton:i,logo:t}){let[r,s]=v.useState(!1),m=()=>{s(g=>!g)};return n(h,{className:"bg-background",children:[a("nav",{className:"relative py-6",children:a(x,{maxWidth:1e3,children:n(d,{align:"center",justify:"between",children:[a(p,{logo:t}),a(k,{showMenu:m}),a(w,{links:e}),a(R,{primaryButton:l,secondaryButton:i})]})})}),a(F,{menu:r,showMenu:m,links:e,primaryButton:l,secondaryButton:i})]})}function p({logo:e}){var l;return e?a(c,{"aria-label":`Go to ${o(e)==="/"?"home page":o(e)}`,className:"text-3xl font-bold leading-none",href:o(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(f,{src:e==null?void 0:e.image,alt:(l=e==null?void 0:e.alt)!=null?l:"navigation-logo",width:48,height:48,className:"text-3xl font-bold leading-none"})}):null}function w({links:e}){return e?a("ul",{className:"absolute hidden transform -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 lg:mx-auto lg:flex lg:w-auto lg:items-center lg:space-x-6",children:e==null?void 0:e.map((l,i)=>n(v.Fragment,{children:[(l==null?void 0:l.label)&&a(L,{link:l},i),e.length!==i+1?a(M,{}):null]},i))}):null}function L({link:e}){return e?a("li",{children:a(b,{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 M(){return a("li",{className:"text-gray-500",children:a("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:a("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 R({primaryButton:e,secondaryButton:l}){return n(v.Fragment,{children:[(e==null?void 0:e.label)&&a(b,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"hidden lg:inline-block px-4 py-3 mb-2 text-gray-900 lg:ml-auto lg:mr-3 font-semibold rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(l==null?void 0:l.label)&&a(b,{as:"link",ariaLabel:l==null?void 0:l.label,link:l,className:"hidden lg:inline-block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-l-xl rounded-t-xl",children:l==null?void 0:l.label})]})}function k({showMenu:e}){return a("div",{className:"lg:hidden",children:a(b,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[a("title",{children:"Mobile menu"}),a("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function F({menu:e,showMenu:l,links:i,primaryButton:t,secondaryButton:r}){return a(v.Fragment,{children:n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[a("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:l}),n("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:[a("div",{className:"flex items-center mb-8",children:a(b,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:l,children:a("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:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),i&&a("ul",{children:i==null?void 0:i.map((s,m)=>a("li",{className:"mb-1",children:a(b,{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))}),n("div",{className:"mt-auto",children:[n("div",{className:"pt-6",children:[(t==null?void 0:t.label)&&a(b,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:t==null?void 0:t.label}),(r==null?void 0:r.label)&&a(b,{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-l-xl rounded-t-xl",children:r==null?void 0:r.label})]}),a(u,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})})}export{N as a};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-KQFO7OZP.mjs";import{Button as b}from"@stackshift-ui/button";import{Container as g}from"@stackshift-ui/container";import{Flex as x}from"@stackshift-ui/flex";import{Image as c}from"@stackshift-ui/image";import{Link as f}from"@stackshift-ui/link";import{Section as h}from"@stackshift-ui/section";import{Text as N}from"@stackshift-ui/text";import v from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";function u({links:e,primaryButton:a,secondaryButton:s,logo:t}){let[i,r]=v.useState(!1),o=()=>{r(d=>!d)};return n(h,{className:"bg-background",children:[l("nav",{className:"relative py-6",children:l(g,{maxWidth:1280,children:n(x,{align:"center",children:[l(p,{links:e}),l(M,{logo:t}),l(k,{primaryButton:a,secondaryButton:s}),l(R,{showMenu:o})]})})}),l(z,{menu:i,showMenu:o,links:e,primaryButton:a,secondaryButton:s})]})}function p({links:e}){return e?l("ul",{className:"hidden lg:flex lg:w-auto lg:items-center lg:space-x-6",children:e==null?void 0:e.map((a,s)=>n(v.Fragment,{children:[(a==null?void 0:a.label)&&l(w,{link:a}),e.length!==s+1?l(L,{}):null]},s))}):null}function w({link:e}){return e?l("li",{children:l(b,{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 L(){return l("li",{className:"text-gray-500",children:l("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:l("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 M({logo:e}){var a;return e?l("div",{className:"lg:absolute lg:left-1/2 lg:top-1/2 lg:-translate-x-1/2 lg:-translate-y-1/2 lg:transform",children:l(f,{"aria-label":`Go to ${m(e)==="/"?"home page":m(e)}`,className:"text-3xl font-bold leading-none",href:m(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:l(c,{src:e==null?void 0:e.image,alt:(a=e==null?void 0:e.alt)!=null?a:"navigation-logo",width:60,height:60,className:"text-3xl font-bold leading-none"})})}):null}function k({primaryButton:e,secondaryButton:a}){return n("div",{className:"hidden text-right lg:ml-auto lg:block lg:w-1/3",children:[(e==null?void 0:e.label)&&l(b,{as:"link",ariaLabel:e==null?void 0:e.label,link:e,className:"hidden lg:inline-block px-4 py-3 mb-2 text-gray-900 lg:ml-auto lg:mr-3 font-semibold rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:e==null?void 0:e.label}),(a==null?void 0:a.label)&&l(b,{as:"link",ariaLabel:a==null?void 0:a.label,link:a,className:"hidden lg:inline-block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-l-xl rounded-t-xl",children:a==null?void 0:a.label})]})}function R({showMenu:e}){return l("div",{className:"ml-auto lg:hidden",children:l(b,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:n("svg",{className:"block w-4 h-4 fill-current",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[l("title",{children:"Mobile menu"}),l("path",{d:"M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"})]})})})}function z({menu:e,showMenu:a,links:s,primaryButton:t,secondaryButton:i}){return n("div",{className:`${e?null:"hidden"} mobile-nav relative z-50`,children:[l("div",{className:"fixed inset-0 bg-gray-800 opacity-25 navbar-backdrop",onClick:a}),n("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:[l("div",{className:"flex items-center mb-8",children:l(b,{variant:"unstyled",as:"button",ariaLabel:"Navigation menu",className:"navbar-close",onClick:a,children:l("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:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),l("div",{children:l("ul",{children:s&&(s==null?void 0:s.map((r,o)=>l("li",{className:"mb-1",children:l(b,{as:"link",ariaLabel:r==null?void 0:r.label,link:r,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:r==null?void 0:r.label})},o)))})}),n("div",{className:"mt-auto",children:[n("div",{className:"pt-6",children:[(t==null?void 0:t.label)&&l(b,{as:"link",ariaLabel:t==null?void 0:t.label,link:t,className:"block px-4 py-3 mb-2 text-gray-900 text-center lg:ml-auto lg:mr-3 font-semibold rounded-l-xl rounded-t-xl bg-secondary hover:bg-secondary/50",children:t==null?void 0:t.label}),(i==null?void 0:i.label)&&l(b,{as:"link",ariaLabel:i==null?void 0:i.label,link:i,className:"block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-l-xl rounded-t-xl",children:i==null?void 0:i.label})]}),l(N,{fontSize:"xs",className:"my-4 text-center text-gray-700",children:l("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}export{u as a};
File without changes