@stackshift-ui/navigation 7.0.0-beta.1 → 7.0.0-beta.11
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-3IPFZ24A.mjs +1 -0
- package/dist/chunk-4QKIS7MI.mjs +1 -0
- package/dist/chunk-75U64ABO.mjs +1 -0
- package/dist/chunk-BZOQMRPS.mjs +1 -0
- package/dist/chunk-KKLBGZ33.mjs +1 -0
- package/dist/chunk-LHY7HMPK.mjs +1 -0
- package/dist/chunk-NAXN36LA.mjs +1 -0
- package/dist/{chunk-2KK4WBIF.mjs → chunk-UZSKH6KM.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/navigation.d.ts +1 -0
- 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_f.mjs +1 -1
- package/dist/navigation_g.mjs +1 -1
- package/dist/navigation_h.mjs +1 -1
- package/package.json +16 -16
- package/src/navigation.tsx +22 -15
- package/src/navigation_a.tsx +25 -40
- package/src/navigation_b.tsx +19 -34
- package/src/navigation_c.tsx +19 -37
- package/src/navigation_d.tsx +19 -36
- package/src/navigation_f.tsx +21 -20
- package/src/navigation_g.tsx +2 -4
- package/src/navigation_h.tsx +36 -47
- package/dist/chunk-5TVYK3JB.mjs +0 -1
- package/dist/chunk-7JNLKLGB.mjs +0 -1
- package/dist/chunk-7PZN5XLN.mjs +0 -1
- package/dist/chunk-AYUL7QX6.mjs +0 -1
- package/dist/chunk-FJRVUW5P.mjs +0 -1
- package/dist/chunk-SMYVBKA6.mjs +0 -1
- package/dist/chunk-ZCDQD6XN.mjs +0 -1
package/src/navigation_c.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { Section } from "@stackshift-ui/section";
|
|
|
7
7
|
import { Text } from "@stackshift-ui/text";
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { NavigationProps, ResponsiveNavLinksProps } from ".";
|
|
10
|
-
import {
|
|
10
|
+
import { logoLink } from "./helper";
|
|
11
11
|
import { LabeledRoute, LabeledRouteWithKey, Logo } from "./types";
|
|
12
12
|
|
|
13
13
|
export default function Navigation_C({
|
|
@@ -67,16 +67,12 @@ function NavItem({ link }: { link?: LabeledRouteWithKey }) {
|
|
|
67
67
|
return (
|
|
68
68
|
<li>
|
|
69
69
|
<Button
|
|
70
|
+
as="link"
|
|
71
|
+
link={link}
|
|
70
72
|
variant="unstyled"
|
|
71
|
-
asChild
|
|
72
73
|
aria-label={link?.label}
|
|
73
74
|
className="text-sm text-gray-500 no-underline hover:text-gray-900">
|
|
74
|
-
|
|
75
|
-
link={link}
|
|
76
|
-
ariaLabel={link?.label || "Navigation link"}
|
|
77
|
-
className="text-sm text-gray-500 no-underline hover:text-gray-900">
|
|
78
|
-
{link?.label}
|
|
79
|
-
</ConditionalLink>
|
|
75
|
+
{link?.label}
|
|
80
76
|
</Button>
|
|
81
77
|
</li>
|
|
82
78
|
);
|
|
@@ -134,22 +130,20 @@ function Buttons({
|
|
|
134
130
|
<div className="hidden lg:text-right lg:block lg:w-1/3">
|
|
135
131
|
{primaryButton?.label && (
|
|
136
132
|
<Button
|
|
137
|
-
|
|
133
|
+
as="link"
|
|
134
|
+
link={primaryButton}
|
|
138
135
|
aria-label={primaryButton?.label}
|
|
139
136
|
className="px-4 py-3 text-secondary-foreground lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50">
|
|
140
|
-
|
|
141
|
-
{primaryButton?.label}
|
|
142
|
-
</ConditionalLink>
|
|
137
|
+
{primaryButton?.label}
|
|
143
138
|
</Button>
|
|
144
139
|
)}
|
|
145
140
|
{secondaryButton?.label && (
|
|
146
141
|
<Button
|
|
147
|
-
|
|
142
|
+
as="link"
|
|
143
|
+
link={secondaryButton}
|
|
148
144
|
aria-label={secondaryButton?.label}
|
|
149
145
|
className="px-4 py-3 leading-loose text-center text-primary-foreground font-semibold bg-primary hover:bg-primary/50 rounded-global">
|
|
150
|
-
|
|
151
|
-
{secondaryButton?.label}
|
|
152
|
-
</ConditionalLink>
|
|
146
|
+
{secondaryButton?.label}
|
|
153
147
|
</Button>
|
|
154
148
|
)}
|
|
155
149
|
</div>
|
|
@@ -210,15 +204,11 @@ function ResponsiveNavLinks({
|
|
|
210
204
|
links?.map((link, index) => (
|
|
211
205
|
<li className="mb-1" key={index}>
|
|
212
206
|
<Button
|
|
213
|
-
|
|
207
|
+
as="link"
|
|
208
|
+
link={link}
|
|
214
209
|
aria-label={link?.label}
|
|
215
210
|
className="block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
|
|
216
|
-
|
|
217
|
-
link={link}
|
|
218
|
-
ariaLabel={link?.label || "Navigation link"}
|
|
219
|
-
className="block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
|
|
220
|
-
{link?.label}
|
|
221
|
-
</ConditionalLink>
|
|
211
|
+
{link?.label}
|
|
222
212
|
</Button>
|
|
223
213
|
</li>
|
|
224
214
|
))}
|
|
@@ -228,28 +218,20 @@ function ResponsiveNavLinks({
|
|
|
228
218
|
<div className="pt-6">
|
|
229
219
|
{primaryButton?.label && (
|
|
230
220
|
<Button
|
|
231
|
-
|
|
221
|
+
as="link"
|
|
222
|
+
link={primaryButton}
|
|
232
223
|
aria-label={primaryButton?.label}
|
|
233
224
|
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">
|
|
234
|
-
|
|
235
|
-
link={primaryButton}
|
|
236
|
-
ariaLabel={primaryButton?.label}
|
|
237
|
-
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">
|
|
238
|
-
{primaryButton?.label}
|
|
239
|
-
</ConditionalLink>
|
|
225
|
+
{primaryButton?.label}
|
|
240
226
|
</Button>
|
|
241
227
|
)}
|
|
242
228
|
{secondaryButton?.label && (
|
|
243
229
|
<Button
|
|
244
|
-
|
|
230
|
+
as="link"
|
|
231
|
+
link={secondaryButton}
|
|
245
232
|
aria-label={secondaryButton?.label}
|
|
246
233
|
className="block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global">
|
|
247
|
-
|
|
248
|
-
link={secondaryButton}
|
|
249
|
-
ariaLabel={secondaryButton?.label}
|
|
250
|
-
className="block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global">
|
|
251
|
-
{secondaryButton?.label}
|
|
252
|
-
</ConditionalLink>
|
|
234
|
+
{secondaryButton?.label}
|
|
253
235
|
</Button>
|
|
254
236
|
)}
|
|
255
237
|
</div>
|
package/src/navigation_d.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { Section } from "@stackshift-ui/section";
|
|
|
7
7
|
import { Text } from "@stackshift-ui/text";
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { NavigationProps, ResponsiveNavLinksProps } from ".";
|
|
10
|
-
import {
|
|
10
|
+
import { logoLink } from "./helper";
|
|
11
11
|
import { LabeledRoute, LabeledRouteWithKey, Logo } from "./types";
|
|
12
12
|
|
|
13
13
|
export default function Navigation_D({
|
|
@@ -65,16 +65,13 @@ function NavItem({ link }: { link?: LabeledRouteWithKey }) {
|
|
|
65
65
|
return (
|
|
66
66
|
<li>
|
|
67
67
|
<Button
|
|
68
|
+
as="link"
|
|
69
|
+
link={link}
|
|
68
70
|
variant="unstyled"
|
|
69
71
|
asChild
|
|
70
72
|
aria-label={link?.label}
|
|
71
73
|
className="text-sm text-gray-500 no-underline hover:text-gray-900">
|
|
72
|
-
|
|
73
|
-
link={link}
|
|
74
|
-
ariaLabel={link?.label || "Navigation link"}
|
|
75
|
-
className="text-sm text-gray-500 no-underline hover:text-gray-900">
|
|
76
|
-
{link?.label}
|
|
77
|
-
</ConditionalLink>
|
|
74
|
+
{link?.label}
|
|
78
75
|
</Button>
|
|
79
76
|
</li>
|
|
80
77
|
);
|
|
@@ -132,24 +129,22 @@ function Buttons({
|
|
|
132
129
|
<div className="hidden lg:flex lg:gap-4">
|
|
133
130
|
{primaryButton?.label && (
|
|
134
131
|
<Button
|
|
135
|
-
|
|
132
|
+
as="link"
|
|
133
|
+
link={primaryButton}
|
|
136
134
|
variant="unstyled"
|
|
137
135
|
aria-label={primaryButton?.label}
|
|
138
136
|
className="px-4 py-3 leading-loose text-center text-secondary-foreground font-semibold rounded-global bg-secondary hover:bg-secondary/50">
|
|
139
|
-
|
|
140
|
-
{primaryButton?.label}
|
|
141
|
-
</ConditionalLink>
|
|
137
|
+
{primaryButton?.label}
|
|
142
138
|
</Button>
|
|
143
139
|
)}
|
|
144
140
|
{secondaryButton?.label && (
|
|
145
141
|
<Button
|
|
146
|
-
|
|
142
|
+
as="link"
|
|
143
|
+
link={secondaryButton}
|
|
147
144
|
variant="unstyled"
|
|
148
145
|
aria-label={secondaryButton?.label}
|
|
149
146
|
className="px-4 py-3 leading-loose text-center text-primary-foreground font-semibold bg-primary hover:bg-primary/50 rounded-global">
|
|
150
|
-
|
|
151
|
-
{secondaryButton?.label}
|
|
152
|
-
</ConditionalLink>
|
|
147
|
+
{secondaryButton?.label}
|
|
153
148
|
</Button>
|
|
154
149
|
)}
|
|
155
150
|
</div>
|
|
@@ -209,15 +204,11 @@ function ResponsiveNavLinks({
|
|
|
209
204
|
links.map((link, index) => (
|
|
210
205
|
<li className="mb-1" key={index}>
|
|
211
206
|
<Button
|
|
212
|
-
|
|
207
|
+
as="link"
|
|
208
|
+
link={link}
|
|
213
209
|
aria-label={link.label}
|
|
214
210
|
className="block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
|
|
215
|
-
|
|
216
|
-
link={link}
|
|
217
|
-
ariaLabel={link.label || "Navigation link"}
|
|
218
|
-
className="block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary">
|
|
219
|
-
{link.label}
|
|
220
|
-
</ConditionalLink>
|
|
211
|
+
{link.label}
|
|
221
212
|
</Button>
|
|
222
213
|
</li>
|
|
223
214
|
))}
|
|
@@ -225,28 +216,20 @@ function ResponsiveNavLinks({
|
|
|
225
216
|
<div className="mt-auto pt-6">
|
|
226
217
|
{primaryButton?.label && (
|
|
227
218
|
<Button
|
|
228
|
-
|
|
219
|
+
as="link"
|
|
220
|
+
link={primaryButton}
|
|
229
221
|
aria-label={primaryButton.label}
|
|
230
222
|
className="block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50">
|
|
231
|
-
|
|
232
|
-
link={primaryButton}
|
|
233
|
-
ariaLabel={primaryButton.label}
|
|
234
|
-
className="block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50">
|
|
235
|
-
{primaryButton.label}
|
|
236
|
-
</ConditionalLink>
|
|
223
|
+
{primaryButton.label}
|
|
237
224
|
</Button>
|
|
238
225
|
)}
|
|
239
226
|
{secondaryButton?.label && (
|
|
240
227
|
<Button
|
|
241
|
-
|
|
228
|
+
as="link"
|
|
229
|
+
link={secondaryButton}
|
|
242
230
|
aria-label={secondaryButton.label}
|
|
243
231
|
className="block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global">
|
|
244
|
-
|
|
245
|
-
link={secondaryButton}
|
|
246
|
-
ariaLabel={secondaryButton.label}
|
|
247
|
-
className="block px-4 py-3 mb-2 leading-loose text-center text-white font-semibold bg-primary hover:bg-primary-foreground rounded-global">
|
|
248
|
-
{secondaryButton.label}
|
|
249
|
-
</ConditionalLink>
|
|
232
|
+
{secondaryButton.label}
|
|
250
233
|
</Button>
|
|
251
234
|
)}
|
|
252
235
|
</div>
|
package/src/navigation_f.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Button } from "@stackshift-ui/button";
|
|
1
2
|
import { Container } from "@stackshift-ui/container";
|
|
2
3
|
import { Flex } from "@stackshift-ui/flex";
|
|
3
4
|
import { Image } from "@stackshift-ui/image";
|
|
@@ -47,10 +48,10 @@ const NavigationButton = ({ button, hasScrolled }: { button: any; hasScrolled: b
|
|
|
47
48
|
if (!button?.label) return null;
|
|
48
49
|
|
|
49
50
|
return (
|
|
50
|
-
<
|
|
51
|
-
|
|
51
|
+
<Button
|
|
52
|
+
as="link"
|
|
52
53
|
link={button}
|
|
53
|
-
|
|
54
|
+
variant="unstyled"
|
|
54
55
|
className={`font-body ml-auto p-2.5 md:p-3 transition duration-200 font-medium flex items-center space-x-2 text-left ${
|
|
55
56
|
hasScrolled
|
|
56
57
|
? "text-white border border-white bg-transparent hover:bg-white hover:text-black"
|
|
@@ -66,7 +67,7 @@ const NavigationButton = ({ button, hasScrolled }: { button: any; hasScrolled: b
|
|
|
66
67
|
<span className="text-sm md:text-base sm:block hidden whitespace-nowrap">
|
|
67
68
|
{button?.label}
|
|
68
69
|
</span>
|
|
69
|
-
</
|
|
70
|
+
</Button>
|
|
70
71
|
);
|
|
71
72
|
};
|
|
72
73
|
|
|
@@ -201,15 +202,15 @@ const NavigationLink = ({
|
|
|
201
202
|
}) => {
|
|
202
203
|
if (!link?.multipleRoutes) {
|
|
203
204
|
return (
|
|
204
|
-
<
|
|
205
|
-
|
|
205
|
+
<Button
|
|
206
|
+
as="link"
|
|
206
207
|
link={link}
|
|
207
|
-
|
|
208
|
+
variant="unstyled"
|
|
208
209
|
className={`hover:text-secondary font-body text-lg whitespace-nowrap ${
|
|
209
210
|
hasScrolled ? "text-white" : "text-black"
|
|
210
211
|
}`}>
|
|
211
212
|
{link?.label}
|
|
212
|
-
</
|
|
213
|
+
</Button>
|
|
213
214
|
);
|
|
214
215
|
}
|
|
215
216
|
|
|
@@ -225,15 +226,15 @@ const NavigationLink = ({
|
|
|
225
226
|
e.stopPropagation();
|
|
226
227
|
handleDropdownChange(dropdown === index ? null : index);
|
|
227
228
|
}}>
|
|
228
|
-
<
|
|
229
|
-
|
|
229
|
+
<Button
|
|
230
|
+
as="link"
|
|
230
231
|
link={link}
|
|
231
|
-
|
|
232
|
+
variant="unstyled"
|
|
232
233
|
className={`hover:text-secondary font-body text-lg cursor-pointer ${
|
|
233
234
|
hasScrolled ? "text-white" : "text-black"
|
|
234
235
|
}`}>
|
|
235
236
|
{link?.label}
|
|
236
|
-
</
|
|
237
|
+
</Button>
|
|
237
238
|
|
|
238
239
|
<BiChevronDown
|
|
239
240
|
size={24}
|
|
@@ -315,13 +316,13 @@ const DropdownMenuItem = ({
|
|
|
315
316
|
<div className="relative group">
|
|
316
317
|
{mLink?.internalLink || mLink?.externalLink ? (
|
|
317
318
|
<Flex align="center">
|
|
318
|
-
<
|
|
319
|
-
|
|
319
|
+
<Button
|
|
320
|
+
as="link"
|
|
320
321
|
link={mLink}
|
|
321
|
-
|
|
322
|
+
variant="unstyled"
|
|
322
323
|
className="font-body hover:text-secondary text-lg cursor-pointer py-2 pl-4 text-white">
|
|
323
324
|
{mLink?.label}
|
|
324
|
-
</
|
|
325
|
+
</Button>
|
|
325
326
|
<BiChevronDown
|
|
326
327
|
size={24}
|
|
327
328
|
className="font-bold mt-0.5 cursor-pointer group-hover:translate-y-0.5 transition group-hover:text-secondary text-white"
|
|
@@ -432,17 +433,17 @@ const Drawer = ({
|
|
|
432
433
|
{link?.label}
|
|
433
434
|
</p>
|
|
434
435
|
) : (
|
|
435
|
-
<
|
|
436
|
-
|
|
436
|
+
<Button
|
|
437
|
+
as="link"
|
|
437
438
|
link={link}
|
|
438
|
-
|
|
439
|
+
variant="unstyled"
|
|
439
440
|
className={`text-xl font-body ${
|
|
440
441
|
hasScrolled ? "text-white" : "text-black"
|
|
441
442
|
} hover:text-secondary`}>
|
|
442
443
|
<p className="w-full h-full" onClick={showMenu}>
|
|
443
444
|
{link?.label}
|
|
444
445
|
</p>
|
|
445
|
-
</
|
|
446
|
+
</Button>
|
|
446
447
|
)
|
|
447
448
|
) : (
|
|
448
449
|
<p
|
package/src/navigation_g.tsx
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
import { animated, useSpring } from "@react-spring/web";
|
|
1
2
|
import { Image } from "@stackshift-ui/image";
|
|
2
3
|
import { Link } from "@stackshift-ui/link";
|
|
3
4
|
import { Section } from "@stackshift-ui/section";
|
|
4
5
|
import { SocialIcons } from "@stackshift-ui/social-icons";
|
|
6
|
+
import { useWindowScroll } from "@uidotdev/usehooks";
|
|
5
7
|
import React, { Fragment, useState } from "react";
|
|
6
8
|
import { BsChevronDown } from "react-icons/bs";
|
|
7
|
-
|
|
8
|
-
import { animated, useSpring } from "@react-spring/web";
|
|
9
|
-
import { useWindowScroll } from "@uidotdev/usehooks";
|
|
10
|
-
|
|
11
9
|
import { NavigationProps } from "./";
|
|
12
10
|
import { logoLink } from "./helper";
|
|
13
11
|
import { Socials } from "./types";
|
package/src/navigation_h.tsx
CHANGED
|
@@ -177,7 +177,9 @@ const MobileMenuContent = ({ data, showMobileMenu, setShowMobileMenu }: MobileMe
|
|
|
177
177
|
ref={ref}
|
|
178
178
|
className="fixed w-[75%] h-screen top-0 right-0 bg-white md:hidden z-50 py-10 px-5 overflow-y-auto">
|
|
179
179
|
<Accordion>
|
|
180
|
-
{data?.map(item =>
|
|
180
|
+
{data?.map(item => (
|
|
181
|
+
<MobileMenuContentItem key={item._key} megaMenu={item} />
|
|
182
|
+
))}
|
|
181
183
|
</Accordion>
|
|
182
184
|
</div>
|
|
183
185
|
);
|
|
@@ -222,14 +224,11 @@ const MobileMenuContentItem = React.memo(({ megaMenu }: MobileMenuContentItemPro
|
|
|
222
224
|
{groupedLinksItem.links?.map(link => (
|
|
223
225
|
<Button
|
|
224
226
|
key={`MobileMenuContent-Item-Group-Link-${link._key}`}
|
|
225
|
-
|
|
227
|
+
as="link"
|
|
226
228
|
variant="ghost"
|
|
229
|
+
link={link}
|
|
227
230
|
className="text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline block ml-4">
|
|
228
|
-
|
|
229
|
-
<ConditionalLink link={link} ariaLabel={link.label ?? "Navigation link"}>
|
|
230
|
-
{link.label}
|
|
231
|
-
</ConditionalLink>
|
|
232
|
-
</ConditionalLink>
|
|
231
|
+
{link.label}
|
|
233
232
|
</Button>
|
|
234
233
|
))}
|
|
235
234
|
</div>
|
|
@@ -241,24 +240,21 @@ const MobileMenuContentItem = React.memo(({ megaMenu }: MobileMenuContentItemPro
|
|
|
241
240
|
{megaMenu.showcaseLink?.map((link, i) => (
|
|
242
241
|
<div key={`MobileMenuContent-Item-Images-${link._key}-${i}`} className="mt-4 pl-4">
|
|
243
242
|
<Button
|
|
244
|
-
|
|
243
|
+
as="link"
|
|
245
244
|
variant="ghost"
|
|
245
|
+
link={link.primaryButton}
|
|
246
246
|
className="text-black text-sm font-normal font-heading-kb leading-[30px]">
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
/>
|
|
259
|
-
{link.primaryButton?.label}
|
|
260
|
-
</Flex>
|
|
261
|
-
</ConditionalLink>
|
|
247
|
+
<Flex direction="col" gap={3}>
|
|
248
|
+
<Image
|
|
249
|
+
key={i}
|
|
250
|
+
src={link.mainImage?.image}
|
|
251
|
+
alt={link.mainImage?.alt ?? ""}
|
|
252
|
+
width={200}
|
|
253
|
+
height={150}
|
|
254
|
+
className="w-[188px] h-[147px] object-cover object-center"
|
|
255
|
+
/>
|
|
256
|
+
{link.primaryButton?.label}
|
|
257
|
+
</Flex>
|
|
262
258
|
</Button>
|
|
263
259
|
</div>
|
|
264
260
|
))}
|
|
@@ -418,10 +414,8 @@ const NavItem = ({ link, isIcon }: NavItemProps) => {
|
|
|
418
414
|
|
|
419
415
|
return (
|
|
420
416
|
<li>
|
|
421
|
-
<Button variant="unstyled"
|
|
422
|
-
|
|
423
|
-
{!isIcon ? link?.label : icon}
|
|
424
|
-
</ConditionalLink>
|
|
417
|
+
<Button as="link" link={link} variant="unstyled" className="text-sm font-label tracking-wide">
|
|
418
|
+
{!isIcon ? link?.label : icon}
|
|
425
419
|
</Button>
|
|
426
420
|
</li>
|
|
427
421
|
);
|
|
@@ -499,7 +493,6 @@ interface MegaMenuNavLinkProps {
|
|
|
499
493
|
const MegaMenuNavLink = ({ link, className }: MegaMenuNavLinkProps) => {
|
|
500
494
|
return (
|
|
501
495
|
<Button
|
|
502
|
-
asChild
|
|
503
496
|
variant="unstyled"
|
|
504
497
|
className={cn(
|
|
505
498
|
"relative text-black text-sm font-normal font-label uppercase tracking-widest group",
|
|
@@ -676,16 +669,14 @@ function MegaDropdownGroupedLinks({ groupedLinks }: { groupedLinks: LabeledRoute
|
|
|
676
669
|
{link.links?.map((link: any, i: number) => {
|
|
677
670
|
return (
|
|
678
671
|
<Button
|
|
672
|
+
as="link"
|
|
673
|
+
link={link}
|
|
679
674
|
key={`MegaDropdownContent-Item-Link-${link._key}-${i}`}
|
|
680
675
|
aria-label={link.label ?? ""}
|
|
681
676
|
variant="unstyled"
|
|
682
677
|
asChild
|
|
683
678
|
className="text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline">
|
|
684
|
-
|
|
685
|
-
link={link}
|
|
686
|
-
ariaLabel={link.label ?? "Navigation link"}>
|
|
687
|
-
{link?.label}
|
|
688
|
-
</ConditionalLink>
|
|
679
|
+
{link?.label}
|
|
689
680
|
</Button>
|
|
690
681
|
);
|
|
691
682
|
})}
|
|
@@ -717,25 +708,23 @@ function MegaDropdownShowcaseLinks({
|
|
|
717
708
|
|
|
718
709
|
return (
|
|
719
710
|
<Button
|
|
711
|
+
as="link"
|
|
712
|
+
link={link.primaryButton}
|
|
720
713
|
key={`MegaDropdownContent-Item-Images-${link._key}-${i}`}
|
|
721
714
|
aria-label={link.primaryButton?.label ?? ""}
|
|
722
715
|
variant="unstyled"
|
|
723
716
|
asChild
|
|
724
717
|
className="text-center text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline">
|
|
725
|
-
<
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
className="w-[188px] h-[147px] object-cover object-center"></Image>
|
|
736
|
-
{link.primaryButton?.label}
|
|
737
|
-
</Flex>
|
|
738
|
-
</ConditionalLink>
|
|
718
|
+
<Flex direction="col" align="center" justify="center" gap={3}>
|
|
719
|
+
<Image
|
|
720
|
+
key={i}
|
|
721
|
+
src={imageUrl}
|
|
722
|
+
alt={link.mainImage?.alt ?? ""}
|
|
723
|
+
width={500}
|
|
724
|
+
height={500}
|
|
725
|
+
className="w-[188px] h-[147px] object-cover object-center"></Image>
|
|
726
|
+
{link.primaryButton?.label}
|
|
727
|
+
</Flex>
|
|
739
728
|
</Button>
|
|
740
729
|
);
|
|
741
730
|
})}
|
package/dist/chunk-5TVYK3JB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as g,b as m}from"./chunk-S35O64PB.mjs";import{Button as o}from"@stackshift-ui/button";import{Container as f}from"@stackshift-ui/container";import{Flex as d}from"@stackshift-ui/flex";import{Image as h}from"@stackshift-ui/image";import{Link as c}from"@stackshift-ui/link";import{Section as N}from"@stackshift-ui/section";import{Text as w}from"@stackshift-ui/text";import n from"react";import{jsx as a,jsxs as b}from"react/jsx-runtime";function p({links:e,primaryButton:l,secondaryButton:t,logo:i}){let[s,r]=n.useState(!1),v=()=>{r(x=>!x)};return b(N,{className:"bg-background",children:[a("nav",{className:"relative py-6",children:a(f,{maxWidth:1280,children:b(d,{align:"center",justify:"between",gap:4,children:[a(L,{links:e}),a(M,{logo:i}),a(R,{primaryButton:l,secondaryButton:t}),a(z,{showMenu:v})]})})}),a(F,{menu:s,showMenu:v,links:e,primaryButton:l,secondaryButton:t})]})}function L({links:e}){return e?a(d,{children:a("ul",{className:"hidden lg:flex lg:items-center lg:gap-5",children:e==null?void 0:e.map((l,t)=>b(n.Fragment,{children:[(l==null?void 0:l.label)&&a(C,{link:l}),e.length!==t+1?a(u,{}):null]},t))})}):null}function C({link:e}){return e?a("li",{children:a(o,{variant:"unstyled",asChild:!0,"aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:a(m,{link:e,ariaLabel:(e==null?void 0:e.label)||"Navigation link",className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:e==null?void 0:e.label})})}):null}function u(){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 M({logo:e}){var l;return e?a("div",{className:"w-full lg:w-fit items-center justify-center",children:a(c,{className:"w-20 h-14 flex justify-center items-center","aria-label":g(e)==="/"?"Go to home page":`Go to ${g(e)}`,href:g(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(h,{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 R({primaryButton:e,secondaryButton:l}){return b("div",{className:"hidden lg:text-right lg:block lg:w-1/3",children:[(e==null?void 0:e.label)&&a(o,{asChild:!0,"aria-label":e==null?void 0:e.label,className:"px-4 py-3 text-secondary-foreground lg:ml-auto lg:mr-3 font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:a(m,{link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}),(l==null?void 0:l.label)&&a(o,{asChild:!0,"aria-label":l==null?void 0:l.label,className:"px-4 py-3 leading-loose text-center text-primary-foreground font-semibold bg-primary hover:bg-primary/50 rounded-global",children:a(m,{link:l,ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})})]})}function z({showMenu:e}){return a("div",{className:"ml-auto lg:hidden",children:a(o,{"aria-label":"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:b("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:t,primaryButton:i,secondaryButton:s}){return b("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}),b("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(o,{"aria-label":"Close 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:t&&(t==null?void 0:t.map((r,v)=>a("li",{className:"mb-1",children:a(o,{asChild:!0,"aria-label":r==null?void 0:r.label,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:a(m,{link:r,ariaLabel:(r==null?void 0:r.label)||"Navigation link",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})})},v)))})}),b("div",{className:"mt-auto",children:[b("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&a(o,{asChild:!0,"aria-label":i==null?void 0:i.label,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:a(m,{link:i,ariaLabel:i==null?void 0:i.label,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})}),(s==null?void 0:s.label)&&a(o,{asChild:!0,"aria-label":s==null?void 0:s.label,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:a(m,{link:s,ariaLabel:s==null?void 0:s.label,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:s==null?void 0:s.label})})]}),a(w,{fontSize:"xs",className:"my-4 text-center text-gray-700",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})}export{p as a};
|
package/dist/chunk-7JNLKLGB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lazy as e}from"react";import{jsx as V}from"react/jsx-runtime";var i={variant_a:e(()=>import("./navigation_a.mjs")),variant_b:e(()=>import("./navigation_b.mjs")),variant_c:e(()=>import("./navigation_c.mjs")),variant_d:e(()=>import("./navigation_d.mjs")),variant_f:e(()=>import("./navigation_f.mjs")),variant_g:e(()=>import("./navigation_g.mjs")),variant_h:e(()=>import("./navigation_h.mjs"))},C="Navigation",F=({data:n})=>{var s,u,l,p,v,c,L,m,t,y,f,g,b,k,M,R,B,h,_,N,K,W,w,P,S,x;let o=n==null?void 0:n.variant,r=o&&(i==null?void 0:i[o]),z={logo:(u=(s=n==null?void 0:n.variants)==null?void 0:s.logo)!=null?u:void 0,links:(p=(l=n==null?void 0:n.variants)==null?void 0:l.routes)!=null?p:void 0,primaryButton:(c=(v=n==null?void 0:n.variants)==null?void 0:v.primaryButton)!=null?c:void 0,secondaryButton:(m=(L=n==null?void 0:n.variants)==null?void 0:L.secondaryButton)!=null?m:void 0,banner:(y=(t=n==null?void 0:n.variants)==null?void 0:t.banner)!=null?y:void 0,multipleLinks:(g=(f=n==null?void 0:n.variants)==null?void 0:f.multipleLinks)!=null?g:void 0,title:(k=(b=n==null?void 0:n.variants)==null?void 0:b.title)!=null?k:void 0,dropdownMenu:(R=(M=n==null?void 0:n.variants)==null?void 0:M.dropdownMenu)!=null?R:void 0,logos:(h=(B=n==null?void 0:n.variants)==null?void 0:B.logos)!=null?h:void 0,socialMedia:(N=(_=n==null?void 0:n.variants)==null?void 0:_.socialMedia)!=null?N:void 0,socialLinks:(W=(K=n==null?void 0:n.variants)==null?void 0:K.socialLinks)!=null?W:void 0,iconLinks:(P=(w=n==null?void 0:n.variants)==null?void 0:w.iconLinks)!=null?P:void 0,megaMenu:(x=(S=n==null?void 0:n.variants)==null?void 0:S.megaMenu)!=null?x:void 0};return r?V(r,{...z}):null};F.displayName=C;export{F as a};
|
package/dist/chunk-7PZN5XLN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E,b as h}from"./chunk-S35O64PB.mjs";import{Container as K}from"@stackshift-ui/container";import{Flex as N}from"@stackshift-ui/flex";import{Image as W}from"@stackshift-ui/image";import{Link as z}from"@stackshift-ui/link";import{Section as I}from"@stackshift-ui/section";import{useEffect as D,useRef as T,useState as y}from"react";import{BiArrowBack as P,BiChevronDown as R,BiMenu as H}from"react-icons/bi";import{BsFillTelephoneFill as B,BsTelephone as O}from"react-icons/bs";import{MdClose as _}from"react-icons/md";import{Fragment as F,jsx as o,jsxs as c}from"react/jsx-runtime";var j=({logo:e,hasScrolled:a})=>{var s;return e!=null&&e.image?o(z,{"aria-label":`Go to ${E(e)==="/"?"home page":E(e)}`,className:"text-3xl",href:E(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:o(W,{src:a?e==null?void 0:e.image:"https://cdn.sanity.io/images/9itgab5x/staging/7f9353c628ae4dd0bdd479d3b1407a3c242755e8-1963x833.png?fm=webp&w=96&q=75",width:500,height:500,alt:(s=e==null?void 0:e.alt)!=null?s:"navigation-logo",className:`transition-all duration-500 w-28 ${a?"md:w-40":"md:w-44"}`})}):null},Y=({button:e,hasScrolled:a})=>e!=null&&e.label?c(h,{ariaLabel:e==null?void 0:e.label,link:e,target:e==null?void 0:e.linkTarget,className:`font-body ml-auto p-2.5 md:p-3 transition duration-200 font-medium flex items-center space-x-2 text-left ${a?"text-white border border-white bg-transparent hover:bg-white hover:text-black":"text-white bg-secondary hover:text-secondary hover:border hover:border-black/40 hover:bg-white"}`,children:[o("span",{className:"flex-none text-3xl sm:text-xl",children:a?o(O,{className:"text-lg md:text-xl"}):o(B,{className:"text-lg md:text-xl"})}),o("span",{className:"text-sm md:text-base sm:block hidden whitespace-nowrap",children:e==null?void 0:e.label})]}):null,q=({hasScrolled:e,menu:a,showMenu:s})=>c("div",{children:[o(H,{color:e?"white":"black",size:40,onClick:s,className:`cursor-pointer hover:scale-105 transition lg:hidden block ${a?"hidden":"block"}`}),o(_,{color:e?"white":"black",size:40,onClick:s,className:`cursor-pointer hover:scale-105 transition lg:hidden block ${a?"block":"hidden"}`})]});function A({primaryButton:e,secondaryButton:a,logo:s,multipleLinks:r,title:u}){let[p,l]=y(null),n=T(null),[f,S]=y(!1),[i,C]=y(!1),M=d=>{n.current&&!n.current.contains(d.target)&&l(null)};D(()=>{let d=x=>{M(x)};return document.addEventListener("click",d),()=>{document.removeEventListener("click",d)}},[]);let w=d=>{d&&d.stopPropagation(),S(x=>!x)};return D(()=>{let d=()=>{C(window.scrollY>0)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]),o(F,{children:c(I,{className:`fixed !z-[999999] w-full left-0 transition-all top-0 ${i?"bg-black/80":"bg-background"}`,children:[o(K,{children:c("div",{className:"flex justify-between space-x-5 py-2 items-center",children:[o(j,{logo:s,hasScrolled:i}),o(N,{direction:"row",align:"center",className:"hidden lg:flex gap-x-8",children:r==null?void 0:r.map((d,x)=>o(G,{link:d,index:x,dropdown:p,setDropdown:l,hasScrolled:i,dropdownRef:n},x))}),c(N,{direction:"row",align:"center",gap:2,children:[((e==null?void 0:e.label)||(a==null?void 0:a.label))&&o("div",{className:"flex space-x-4 sm:space-x-6 items-center",children:o(Y,{button:e,hasScrolled:i})}),o(q,{hasScrolled:i,menu:f,showMenu:w})]})]})}),o(U,{links:r,open:f,showMenu:w})]})})}var G=({link:e,index:a,dropdown:s,setDropdown:r,hasScrolled:u,dropdownRef:p})=>{if(!(e!=null&&e.multipleRoutes))return o(h,{ariaLabel:(e==null?void 0:e.label)||"",link:e,target:e==null?void 0:e.linkTarget,className:`hover:text-secondary font-body text-lg whitespace-nowrap ${u?"text-white":"text-black"}`,children:e==null?void 0:e.label});let l=n=>{r(n)};return c("div",{className:"relative",children:[e!=null&&e.internalLink||e!=null&&e.externalLink?c(N,{onMouseEnter:n=>{n.stopPropagation(),l(s===a?null:a)},children:[o(h,{ariaLabel:(e==null?void 0:e.label)||"",link:e,target:e==null?void 0:e.linkTarget,className:`hover:text-secondary font-body text-lg cursor-pointer ${u?"text-white":"text-black"}`,children:e==null?void 0:e.label}),o(R,{size:24,className:`font-bold mt-0.5 font-body cursor-pointer hover:text-secondary hover:translate-y-0.5 transition ${u?"text-white":"text-black"} ${s===a&&"translate-y-0.5 !text-secondary"}`,onClick:n=>{n.stopPropagation(),l(a)}})]}):c("p",{className:`hover:text-secondary font-body text-lg cursor-pointer flex items-center group ${u?"text-white":"text-black"}`,onClick:n=>{n.stopPropagation(),l(s===a?null:a)},onMouseEnter:n=>{n.stopPropagation(),l(s===a?null:a)},children:[e==null?void 0:e.label,o(R,{size:24,className:`font-bold mt-0.5 group-hover:translate-y-0.5 transition ${s===a&&"translate-y-0.5 text-secondary"}`})]}),s===a&&o(J,{link:e,dropdownRef:p,setDropdown:r,hasScrolled:u})]})},J=({link:e,dropdownRef:a,setDropdown:s,hasScrolled:r})=>{var u;return c("div",{ref:a,className:"absolute flex flex-col top-8 bg-primary rounded rounded-tl-none",onMouseLeave:()=>s(null),children:[o("span",{className:"absolute top-0 w-0 h-0 border-x-transparent border-t-transparent border-b-primary border-[6px] transform -translate-y-3"}),(u=e==null?void 0:e.multipleRoutes)==null?void 0:u.map((p,l)=>o(Q,{mLink:p,hasScrolled:r},l))]})},Q=({mLink:e,hasScrolled:a})=>{var s;return e!=null&&e.multipleInnerRoutes?c("div",{className:"relative group",children:[e!=null&&e.internalLink||e!=null&&e.externalLink?c(N,{align:"center",children:[o(h,{ariaLabel:(e==null?void 0:e.label)||"",link:e,target:e==null?void 0:e.linkTarget,className:"font-body hover:text-secondary text-lg cursor-pointer py-2 pl-4 text-white",children:e==null?void 0:e.label}),o(R,{size:24,className:"font-bold mt-0.5 cursor-pointer group-hover:translate-y-0.5 transition group-hover:text-secondary text-white"})]}):c("p",{className:"hover:text-secondary text-lg cursor-pointer flex items-center group py-2 px-4 text-white",children:[e==null?void 0:e.label,o(R,{size:24,className:"font-bold mt-0.5 group-hover:translate-y-0.5 transition"})]}),o("div",{className:"absolute hidden flex-col top-0 left-full bg-primary rounded-r rounded-r-b group-hover:flex hover:flex",children:(s=e==null?void 0:e.multipleInnerRoutes)==null?void 0:s.map((r,u)=>o(h,{ariaLabel:(r==null?void 0:r.label)||"",link:r,target:r==null?void 0:r.linkTarget,className:"hover:text-secondary font-body text-lg py-2 px-4 whitespace-nowrap text-white",children:r==null?void 0:r.label},u))})]}):o(h,{ariaLabel:(e==null?void 0:e.label)||"",link:e,target:e==null?void 0:e.linkTarget,className:"hover:text-secondary font-body text-lg py-2 px-4 whitespace-nowrap text-white",children:e==null?void 0:e.label})},U=({links:e,open:a,showMenu:s})=>{var M,w,d,x;let[r,u]=y(!1),p=T(null);D(()=>{let t=()=>u(window.scrollY>0);return window.addEventListener("scroll",t),()=>window.removeEventListener("scroll",t)},[]),D(()=>{let t=b=>{p.current&&!p.current.contains(b.target)&&!b.target.closest(".BiMenu")&&a&&s(b)};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[a,s]);let[l,n]=y({previous:null,index:null}),f=(t,b)=>{n({previous:t,index:b})},S=(t,b,v=!1,m)=>{let g=(t==null?void 0:t.label)==="New Construction",$=(t==null?void 0:t.label)==="Renovations"||(t==null?void 0:t.label)==="Renovation";return c("div",{className:"flex items-center py-2 px-4",children:[t!=null&&t.internalLink||t!=null&&t.externalLink?g||$?o("p",{className:`text-xl font-body ${r?"text-white":"text-black"} hover:text-secondary cursor-pointer`,onClick:()=>window.location.href=`/projects/residential?filter=${g?"new_construction":"renovations"}`,children:t==null?void 0:t.label}):o(h,{ariaLabel:(t==null?void 0:t.label)||"",link:t,target:t==null?void 0:t.linkTarget,className:`text-xl font-body ${r?"text-white":"text-black"} hover:text-secondary`,children:o("p",{className:"w-full h-full",onClick:s,children:t==null?void 0:t.label})}):o("p",{className:`text-xl font-body peer cursor-pointer ${r?"text-white":"text-black"} hover:text-secondary`,onClick:m,children:t==null?void 0:t.label}),v&&o(R,{fontSize:24,className:`hover:-rotate-90 hover:text-secondary peer-hover:-rotate-90 peer-hover:text-secondary transition duration-200 cursor-pointer ${r?"text-white":"text-black"}`,onClick:m})]},b)},i=(t,b=!1)=>t.map((v,m)=>{let g=!!(v!=null&&v.multipleRoutes||v!=null&&v.multipleInnerRoutes);return S(v,m,g,g?()=>f(b?l.index:null,m):void 0)}),C=t=>c("p",{className:`hover:text-secondary text-xl font-body py-2 px-4 flex items-center gap-2 cursor-pointer group ${r?"text-white":"text-black"}`,onClick:t,children:[o(P,{}),"Back"]});return o(N,{className:`flex sm:block text-white overflow-hidden transition lg:hidden columns-2 ${a?"animate-curtain-down mt-5":"animate-curtain-up h-0"}`,children:o("div",{ref:p,onClick:t=>t.stopPropagation(),children:a&&c(F,{children:[e&&l.index===null&&i(e),l.previous===null&&l.index!==null&&c("div",{className:"flex flex-col",children:[C(()=>f(null,null)),i(((M=e[l.index])==null?void 0:M.multipleRoutes)||[],!0)]}),l.previous!==null&&l.index!==null&&c("div",{className:"flex flex-col",children:[C(()=>n({previous:null,index:l.previous})),i(((x=(d=(w=e[l.previous])==null?void 0:w.multipleRoutes)==null?void 0:d[l.index])==null?void 0:x.multipleInnerRoutes)||[])]})]})})})};export{A as a};
|
package/dist/chunk-AYUL7QX6.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,b}from"./chunk-S35O64PB.mjs";import{Button as w}from"@stackshift-ui/button";import{Flex as f}from"@stackshift-ui/flex";import{Grid as S}from"@stackshift-ui/grid";import{Heading as $}from"@stackshift-ui/heading";import{Image as N}from"@stackshift-ui/image";import{Link as T}from"@stackshift-ui/link";import{Section as I}from"@stackshift-ui/section";import{Text as y}from"@stackshift-ui/text";import{useClickAway as R,useWindowScroll as k}from"@uidotdev/usehooks";import h from"classnames";import g,{createContext as B,forwardRef as E,Fragment as x,useCallback as j,useEffect as F,useMemo as G,useRef as H,useState as M}from"react";import{GoPerson as z}from"react-icons/go";import{LiaSearchSolid as O}from"react-icons/lia";import{SlLocationPin as W}from"react-icons/sl";import{Fragment as A,jsx as t,jsxs as m}from"react/jsx-runtime";var D=B(void 0),K=()=>{let e=g.useContext(D);if(!e)throw new Error("useAccordion must be used within an Accordion");return e},V=({className:e,children:a,defaultValue:n=[],onValueChange:o})=>{let[s,l]=M(n),r=g.useCallback(c=>{l(d=>{let u=d.includes(c)?d.filter(p=>p!==c):[...d,c];return o==null||o(u),u})},[o]),i=g.useMemo(()=>({openItems:s,toggleItem:r}),[s,r]);return t(D.Provider,{value:i,children:t("div",{className:h("w-full",e),children:a})})},J=({value:e,className:a,children:n})=>{let{openItems:o,toggleItem:s}=K(),l=o.includes(e);return t("div",{className:h("border-b border-gray-200",a),children:g.Children.map(n,r=>g.isValidElement(r)?g.cloneElement(r,{isOpen:l,onClick:()=>s(e)}):r)})},U=g.forwardRef(({className:e,children:a,isOpen:n,onClick:o,...s},l)=>m("button",{ref:l,type:"button",onClick:o,className:h("flex w-full items-center justify-between py-4 text-left",e),...s,children:[a,t("svg",{className:h("h-5 w-5 transform transition-transform duration-200",n?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})),q=g.forwardRef(({className:e,children:a,isOpen:n},o)=>t("div",{ref:o,className:h("overflow-hidden transition-all duration-200 ease-in-out",n?"max-h-[1000px] opacity-100":"max-h-0 opacity-0",e),children:t("div",{className:"pb-4",children:a})})),Q=({data:e,showMobileMenu:a,setShowMobileMenu:n})=>{let o=R(()=>{a&&n(!1)});return a?t("div",{ref:o,className:"fixed w-[75%] h-screen top-0 right-0 bg-white md:hidden z-50 py-10 px-5 overflow-y-auto",children:t(V,{children:e==null?void 0:e.map(s=>t(_,{megaMenu:s},s._key))})}):null},_=g.memo(({megaMenu:e})=>{var a,n;return e._type==="isLinkOnly"?t(T,{href:e.linkExternal||"#",target:e.linkTarget,className:"block py-4 text-base font-medium text-gray-900 hover:text-gray-700 uppercase",children:e.label}):m(J,{value:e._key,children:[t(U,{className:"text-base font-medium text-gray-900 uppercase w-full py-4",children:e.title}),m(q,{children:[(a=e.groupOfLinks)==null?void 0:a.map(o=>{var s;return m("div",{className:"mt-4 pl-4",children:[t(y,{className:"text-black font-medium leading-[30px]",children:o.title}),t(f,{direction:"col",align:"start",justify:"start",gap:1,className:"relative w-full pl-4",children:(s=o.links)==null?void 0:s.map(l=>{var r;return m("div",{className:"mb-4",children:[t(y,{className:"text-black font-medium leading-[30px] text-sm",children:l.title}),(r=l.links)==null?void 0:r.map(i=>{var c,d;return t(w,{asChild:!0,variant:"ghost",className:"text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline block ml-4",children:t(b,{link:i,ariaLabel:(c=i.label)!=null?c:"Navigation link",children:t(b,{link:i,ariaLabel:(d=i.label)!=null?d:"Navigation link",children:i.label})})},`MobileMenuContent-Item-Group-Link-${i._key}`)})]},l._key)})})]},o._key)}),(n=e.showcaseLink)==null?void 0:n.map((o,s)=>{var l,r,i,c,d,u;return t("div",{className:"mt-4 pl-4",children:t(w,{asChild:!0,variant:"ghost",className:"text-black text-sm font-normal font-heading-kb leading-[30px]",children:t(b,{link:o.primaryButton,ariaLabel:(r=(l=o.primaryButton)==null?void 0:l.label)!=null?r:"Navigation link",children:m(f,{direction:"col",gap:3,children:[t(N,{src:(i=o.mainImage)==null?void 0:i.image,alt:(d=(c=o.mainImage)==null?void 0:c.alt)!=null?d:"",width:200,height:150,className:"w-[188px] h-[147px] object-cover object-center"},s),(u=o.primaryButton)==null?void 0:u.label]})})})},`MobileMenuContent-Item-Images-${o._key}-${s}`)})]})]})});_.displayName="MobileMenuContentItem";function X({logo:e,iconLinks:a,megaMenu:n}){let[{y:o}]=k(),[s,l]=M(!1),[r,i]=M(""),c=H(null),d=o&&o>80?"fixed w-full transition-all duration-300 ease-in-out":"sticky transition-all duration-300 ease-in-out",u=j(p=>{c.current&&clearTimeout(c.current),p===""?c.current=setTimeout(()=>{i("")},200):i(p)},[]);return F(()=>()=>{c.current&&clearTimeout(c.current)},[]),m(A,{children:[t("header",{className:h("relative top-0 left-0 border-t md:pb-3 z-50 bg-white transition-all ease-in-out duration-300",d),children:t(Y,{logo:e,iconLinks:a,megaMenu:n,setShowMobileMenu:l,currentDropdown:r,setCurrentDropdown:u})}),t(Q,{data:n,showMobileMenu:s,setShowMobileMenu:l})]})}var Y=({logo:e,iconLinks:a,megaMenu:n,setShowMobileMenu:o,currentDropdown:s,setCurrentDropdown:l})=>{var d;let[{x:r,y:i}]=k(),c=i&&i>80?"md:hidden":"";return m("div",{className:"px-0 w-full h-full transition-all duration-300 ease-in-out overflow-y-auto",children:[m(S,{columns:2,align:"center",justify:"between",gap:5,className:h("lg:pt-4 py-2 grid-cols-2 md:grid-cols-3 w-full h-full transition-all ease-in-out duration-300 px-4",c),children:[(e==null?void 0:e.image)&&t("div",{className:"relative w-20 flex items-center h-20 md:w-fit md:h-full place-self-start md:place-self-center col-start-1 md:col-start-2",children:t(T,{"aria-label":`Go to ${v(e)==="/"?"home page":v(e)}`,className:"text-3xl font-bold leading-none",href:v(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:t(N,{src:e==null?void 0:e.image,width:135,height:135,className:"object-cover transition-all ease-in-out duration-300",alt:(d=e==null?void 0:e.alt)!=null?d:"navigation-logo"})})}),t("button",{onClick:()=>o(!0),className:"md:hidden h-fit self-center place-self-end",children:t(ie,{className:"w-8 h-8"})}),a&&a.length>0&&t(f,{align:"center",gap:5,className:"hidden md:flex place-self-center max-w-[144px] h-32 w-full",children:t("ul",{className:"flex gap-5",children:a==null?void 0:a.map(u=>u&&u.label?t(Z,{link:u,isIcon:!0},u._key):null)})})]}),t(te,{data:n!=null?n:[],currentDropdown:s,setCurrentDropdown:l}),t(ne,{data:n!=null?n:[],currentDropdown:s,setCurrentDropdown:l})]})},Z=({link:e,isIcon:a})=>{var o;let n=ee[e==null?void 0:e.label]||null;return t("li",{children:t(w,{variant:"unstyled",asChild:!0,className:"text-sm font-label tracking-wide",children:t(b,{link:e,ariaLabel:(o=e==null?void 0:e.label)!=null?o:"Navigation link",children:a?n:e==null?void 0:e.label})})})},ee={search:t(O,{className:"w-4 h-4"}),location:t(W,{className:"w-4 h-4"}),person:t(z,{className:"w-4 h-4"})},te=({data:e,currentDropdown:a,setCurrentDropdown:n})=>{let[{x:o,y:s}]=k(),l=s&&s<80||s===0?"hidden":"";return m(f,{align:"center",justify:"between",gap:5,className:"relative w-full h-full max-w-7xl mx-auto hidden md:flex pt-4 px-4 transition-all duration-300 ease-in-out",children:[e&&e.length>0?e==null?void 0:e.slice(0,3).map(r=>t(x,{children:r._type==="dropdown"?t(P,{dropdown:r,"aria-expanded":a===r.title,onMouseEnter:()=>{var i;return n((i=r.title)!=null?i:"")},onMouseLeave:()=>n("")},`MegaMenuDropdownTrigger-${r._key}`):t(L,{link:r},`MegaMenuLink-${r._key}`)},`MegaMenuNavLink-${r._key}`)):null,e&&e.length>0?e==null?void 0:e.slice(3,6).map(r=>t(x,{children:r._type==="dropdown"?t(P,{dropdown:r,"aria-expanded":a===r.title,onMouseEnter:()=>{var i;return n((i=r.title)!=null?i:"")},onMouseLeave:()=>n("")},`MegaMenuDropdownTrigger-${r._key}`):t(L,{link:r},`MegaMenuLink-${r._key}`)},`MegaMenuNavLink-${r._key}`)):null]})},L=({link:e,className:a})=>t(w,{asChild:!0,variant:"unstyled",className:h("relative text-black text-sm font-normal font-label uppercase tracking-widest group",a),children:e.label}),P=E((e,a)=>{let{dropdown:n,onClick:o,onMouseEnter:s,onMouseLeave:l,className:r,...i}=e;return t("button",{ref:a,onClick:o,onMouseEnter:s,onMouseLeave:l,"aria-label":`Open the ${n.title} menu`,className:h("relative text-black text-sm font-normal font-label uppercase tracking-widest group",r),...i,children:n.title})}),ne=({data:e,currentDropdown:a,setCurrentDropdown:n})=>t(A,{children:e&&e.length>0?e==null?void 0:e.map(o=>{var l,r,i;let s=a===o.title&&o.title!=="";return t(oe,{label:(l=o.title)!=null?l:"",showcaseLink:(r=o.showcaseLink)!=null?r:[],groupedLinks:(i=o.groupOfLinks)!=null?i:[],currentDropdown:a,setCurrentDropdown:n},`MegaMenuDropdown-${o._key}`)}):null});function oe({label:e,showcaseLink:a,groupedLinks:n,currentDropdown:o,setCurrentDropdown:s}){let l=o===e&&e!=="",r=n.length>0,i=a.length>0,c=G(()=>n.length>0?n.map(u=>{var p;return((p=u.links)==null?void 0:p.length)>2?"3fr":"1fr"}).join(" "):"1fr",[n]),d=r?`${c} ${i?"2fr":""}`:i?"2fr":"1fr";return t(I,{"data-show":l,onMouseEnter:()=>s(e),onMouseLeave:()=>s(""),className:`relative top-6 left-0 w-full overflow-hidden z-50 bg-primary/5 !transition-[max-height] !duration-300 !ease-in-out ${l?"max-h-[500px]":"max-h-0"}`,children:m("div",{style:{display:"grid",gridTemplateColumns:d,gridTemplateRows:"1fr"},className:"relative w-full h-auto max-w-[90rem] mx-auto",children:[t(re,{groupedLinks:n}),t(ae,{hasShowcaseLinks:i,showcaseLink:a})]})})}function re({groupedLinks:e}){return t(x,{children:e&&e.length>0&&(e==null?void 0:e.map((a,n)=>{var o;return m("div",{className:"relative py-10 pl-5 flex flex-col items-end justify-start h-full w-full border-r border-black last:border-r-0",children:[t($,{fontSize:"sm",className:"text-black font-normal uppercase tracking-widest font-label self-start pb-4",children:a.title}),t(f,{direction:"row",align:"start",justify:"start",gap:4,className:"relative w-full h-full grid-flow-row",children:(o=a.links)==null?void 0:o.map((s,l)=>{var r;return m(f,{direction:"col",className:"h-fit w-fit",children:[t(y,{fontSize:"base",className:"text-black font-medium leading-[30px]",children:s.title}),t(f,{direction:"col",align:"start",justify:"start",gap:2,className:"w-fit h-full",children:(r=s.links)==null?void 0:r.map((i,c)=>{var d,u;return t(w,{"aria-label":(d=i.label)!=null?d:"",variant:"unstyled",asChild:!0,className:"text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline",children:t(b,{link:i,ariaLabel:(u=i.label)!=null?u:"Navigation link",children:i==null?void 0:i.label})},`MegaDropdownContent-Item-Link-${i._key}-${c}`)})})]},`MegaDropdownContent-Item-Link-${s._key}-${l}`)})})]},`MegaDropdownContent-Item-${a._key}-${n}`)}))})}function ae({hasShowcaseLinks:e,showcaseLink:a}){return e?t(f,{direction:"row",align:"start",justify:"start",className:"w-full h-full gap-6 pl-5 py-10",children:a==null?void 0:a.map((n,o)=>{var l,r,i,c,d,u,p,C;let s=(l=n.mainImage)==null?void 0:l.image;return t(w,{"aria-label":(i=(r=n.primaryButton)==null?void 0:r.label)!=null?i:"",variant:"unstyled",asChild:!0,className:"text-center text-black text-sm font-normal font-heading-kb leading-[30px] hover:underline",children:t(b,{link:n.primaryButton,ariaLabel:(d=(c=n.primaryButton)==null?void 0:c.label)!=null?d:"Navigation link",children:m(f,{direction:"col",align:"center",justify:"center",gap:3,children:[t(N,{src:s,alt:(p=(u=n.mainImage)==null?void 0:u.alt)!=null?p:"",width:500,height:500,className:"w-[188px] h-[147px] object-cover object-center"},o),(C=n.primaryButton)==null?void 0:C.label]})})},`MegaDropdownContent-Item-Images-${n._key}-${o}`)})}):null}function ie(e){return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:t("path",{fill:"currentColor",d:"M3 8V7h17v1zm17 4v1H3v-1zM3 17h17v1H3z"})})}export{X as a};
|
package/dist/chunk-FJRVUW5P.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d,b as o}from"./chunk-S35O64PB.mjs";import{Button as s}from"@stackshift-ui/button";import{Flex as v}from"@stackshift-ui/flex";import{Image as f}from"@stackshift-ui/image";import{Link as x}from"@stackshift-ui/link";import{Section as h}from"@stackshift-ui/section";import{Text as p}from"@stackshift-ui/text";import g from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";function u({links:e,primaryButton:l,secondaryButton:r,logo:i}){let[t,b]=g.useState(!1),m=()=>{b(c=>!c)};return n(h,{className:"bg-background",children:[a("nav",{className:"relative lg:px-6 py-6",children:n(v,{align:"center",justify:"between",gap:4,children:[a(N,{links:e}),a(k,{logo:i}),a(C,{primaryButton:l,secondaryButton:r}),a(M,{showMenu:m})]})}),a(R,{menu:t,showMenu:m,links:e,primaryButton:l,secondaryButton:r})]})}function N({links:e}){return e?a(v,{children:a("ul",{className:"hidden lg:flex lg:items-center lg:gap-3 xl:gap-5",children:e==null?void 0:e.map((l,r)=>n(g.Fragment,{children:[(l==null?void 0:l.label)&&a(w,{link:l}),e.length!==r+1?a(L,{}):null]},r))})}):null}function w({link:e}){return e?a("li",{children:a(s,{variant:"unstyled",asChild:!0,"aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:a(o,{link:e,ariaLabel:(e==null?void 0:e.label)||"Navigation link",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:"w-full lg:w-fit items-center justify-center",children:a(x,{className:"w-20 h-14 flex justify-center items-center","aria-label":d(e)==="/"?"Go to home page":`Go to ${d(e)}`,href:d(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:a(f,{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 C({primaryButton:e,secondaryButton:l}){return n("div",{className:"hidden lg:flex lg:gap-4",children:[(e==null?void 0:e.label)&&a(s,{asChild:!0,variant:"unstyled","aria-label":e==null?void 0:e.label,className:"px-4 py-3 leading-loose text-center text-secondary-foreground font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:a(o,{link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}),(l==null?void 0:l.label)&&a(s,{asChild:!0,variant:"unstyled","aria-label":l==null?void 0:l.label,className:"px-4 py-3 leading-loose text-center text-primary-foreground font-semibold bg-primary hover:bg-primary/50 rounded-global",children:a(o,{link:l,ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})})]})}function M({showMenu:e}){return a("div",{className:"ml-auto lg:hidden",children:a(s,{"aria-label":"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 R({menu:e,showMenu:l,links:r,primaryButton:i,secondaryButton:t}){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(s,{"aria-label":"Close 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("ul",{children:r&&r.map((b,m)=>a("li",{className:"mb-1",children:a(s,{asChild:!0,"aria-label":b.label,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:a(o,{link:b,ariaLabel:b.label||"Navigation link",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))}),n("div",{className:"mt-auto pt-6",children:[(i==null?void 0:i.label)&&a(s,{asChild:!0,"aria-label":i.label,className:"block px-4 py-3 mb-2 text-center font-semibold rounded-global bg-secondary hover:bg-secondary/50",children:a(o,{link:i,ariaLabel:i.label,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)&&a(s,{asChild:!0,"aria-label":t.label,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:a(o,{link:t,ariaLabel:t.label,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})})]}),a(p,{fontSize:"xs",muted:!0,className:"my-4 text-center",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})}export{u as a};
|
package/dist/chunk-SMYVBKA6.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x,b as n}from"./chunk-S35O64PB.mjs";import{Button as o}from"@stackshift-ui/button";import{Flex as v}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 w}from"@stackshift-ui/text";import d from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function N({links:e,primaryButton:a,secondaryButton:b,logo:i}){let[s,r]=d.useState(!1),g=()=>{r(m=>!m)};return t(h,{className:"bg-background",children:[t(v,{align:"center",justify:"between",className:"px-6 py-6",gap:4,children:[l(p,{logo:i}),l(L,{links:e}),l(z,{primaryButton:a,secondaryButton:b}),l(R,{showMenu:g})]}),l(M,{menu:s,showMenu:g,links:e,primaryButton:a,secondaryButton:b})]})}function p({logo:e}){var a;return e?l("div",{className:"w-full lg:w-1/5",children:l(c,{className:"w-20 h-14 flex items-center","aria-label":x(e)==="/"?"Go to home page":`Go to ${x(e)}`,href:x(e),target:e==null?void 0:e.linkTarget,rel:(e==null?void 0:e.linkTarget)==="_blank"?"noopener noreferrer":"",children:l(f,{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 u(){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 L({links:e}){return e?l(v,{children:l("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((a,b)=>t(d.Fragment,{children:[l(C,{link:a},a._key),e.length!==b+1?l(u,{}):null]},b))})}):null}function C({link:e}){return e!=null&&e.label?l("li",{children:l(o,{asChild:!0,variant:"link","aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:l(n,{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:b,primaryButton:i,secondaryButton:s}){return t("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}),t(v,{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:b?l("ul",{children:b==null?void 0:b.map((r,g)=>l("li",{className:"mb-1",children:l(o,{asChild:!0,variant:"link","aria-label":r==null?void 0:r.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",children:l(n,{link:r,ariaLabel:r==null?void 0:r.label,children:r==null?void 0:r.label})})},g))}):null}),t("div",{className:"w-full mt-auto",children:[t(v,{direction:"col",className:"pt-6",children:[i!=null&&i.label?l(o,{asChild:!0,"aria-label":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:l(n,{link:i,ariaLabel:i==null?void 0:i.label,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,s!=null&&s.label?l(o,{asChild:!0,"aria-label":s==null?void 0:s.label,variant:"link",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:l(n,{link:s,ariaLabel:s==null?void 0:s.label,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:s==null?void 0:s.label})}):null]}),l(w,{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,{"aria-label":"Navigation Menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:t("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({primaryButton:e,secondaryButton:a}){return t(v,{align:"center",gap:4,children:[e!=null&&e.label?l(o,{asChild:!0,"aria-label":e==null?void 0:e.label,variant:"outline",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-secondary-foreground rounded-global bg-secondary hover:bg-secondary/50",children:l(n,{link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}):null,a!=null&&a.label?l(o,{asChild:!0,"aria-label":a==null?void 0:a.label,variant:"default",className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-primary-foreground bg-primary hover:bg-primary/50 rounded-global",children:l(n,{link:a,ariaLabel:a==null?void 0:a.label,children:a==null?void 0:a.label})}):null]})}function F({showMenu:e}){return l("div",{className:"flex items-center mb-8",children:l(o,{"aria-label":"Close 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{N as a};
|
package/dist/chunk-ZCDQD6XN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,b as g}from"./chunk-S35O64PB.mjs";import{Button as o}from"@stackshift-ui/button";import{Container as f}from"@stackshift-ui/container";import{Flex as n}from"@stackshift-ui/flex";import{Image as h}from"@stackshift-ui/image";import{Link as c}from"@stackshift-ui/link";import{Section as N}from"@stackshift-ui/section";import{Text as w}from"@stackshift-ui/text";import d from"react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function p({links:e,primaryButton:l,secondaryButton:b,logo:i}){let[s,r]=d.useState(!1),m=()=>{r(x=>!x)};return t(N,{className:"bg-background",children:[a("nav",{className:"relative py-6",children:a(f,{maxWidth:1280,children:t(n,{align:"center",justify:"between",gap:4,children:[a(L,{logo:i}),a(k,{showMenu:m}),a(C,{links:e}),a(R,{primaryButton:l,secondaryButton:b})]})})}),a(z,{menu:s,showMenu:m,links:e,primaryButton:l,secondaryButton:b})]})}function L({logo:e}){var l;return e?a("div",{className:"w-full lg:w-fit",children:a(c,{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:a(h,{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 C({links:e}){return e?a(n,{children:a("ul",{className:"hidden lg:flex lg:items-center lg:gap-5 xl:gap-10",children:e==null?void 0:e.map((l,b)=>t(d.Fragment,{children:[a(u,{link:l},l._key),e.length!==b+1?a(M,{}):null]},b))})}):null}function u({link:e}){return e?a("li",{children:a(o,{variant:"unstyled",asChild:!0,"aria-label":e==null?void 0:e.label,className:"text-sm text-gray-500 no-underline hover:text-gray-900",children:a(g,{link:e,ariaLabel:(e==null?void 0:e.label)||"Navigation link",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 t(n,{align:"center",gap:4,children:[(e==null?void 0:e.label)&&a(o,{asChild:!0,"aria-label":e==null?void 0:e.label,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-secondary-foreground rounded-global bg-secondary hover:bg-secondary/50",children:a(g,{link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}),(l==null?void 0:l.label)&&a(o,{asChild:!0,"aria-label":l==null?void 0:l.label,className:"hidden lg:flex px-4 py-3 leading-loose text-center font-semibold text-primary-foreground bg-primary hover:bg-primary/50 rounded-global",children:a(g,{link:l,ariaLabel:l==null?void 0:l.label,children:l==null?void 0:l.label})})]})}function k({showMenu:e}){return a("div",{className:"lg:hidden",children:a(o,{"aria-label":"Navigation menu",className:"flex items-center p-3 navbar-burger text-primary",onClick:e,children:t("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:b,primaryButton:i,secondaryButton:s}){return a(d.Fragment,{children:t("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}),t("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(o,{"aria-label":"Close 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"})})})}),b&&a("ul",{children:b==null?void 0:b.map((r,m)=>a("li",{className:"mb-1",children:a(o,{asChild:!0,"aria-label":r==null?void 0:r.label,className:"block p-4 text-sm font-semibold text-gray-700 no-underline rounded hover:bg-secondary-foreground hover:text-primary",children:a(g,{link:r,ariaLabel:(r==null?void 0:r.label)||"Navigation link",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))}),t("div",{className:"mt-auto",children:[t("div",{className:"pt-6",children:[(i==null?void 0:i.label)&&a(o,{asChild:!0,"aria-label":i==null?void 0:i.label,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:a(g,{link:i,ariaLabel:i==null?void 0:i.label,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})}),(s==null?void 0:s.label)&&a(o,{asChild:!0,"aria-label":s==null?void 0:s.label,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:a(g,{link:s,ariaLabel:s==null?void 0:s.label,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:s==null?void 0:s.label})})]}),a(w,{fontSize:"xs",className:"my-4 text-center text-gray-900",children:a("span",{children:`\xA9 ${new Date().getFullYear()} All rights reserved.`})})]})]})]})})}export{p as a};
|