quirk-ui 0.1.79 → 0.1.81
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/{HeroSubComponents-DgaUarpC.js → HeroSubComponents-BMWxsDNV.js} +20 -20
- package/dist/{HeroSubComponents-DeLtujvq.cjs → HeroSubComponents-Cy6yt0rA.cjs} +2 -2
- package/dist/HeroSubComponents.css +1 -1
- package/dist/core/components/NavBar/index.cjs +3 -3
- package/dist/core/components/NavBar/index.mjs +310 -284
- package/dist/next/blocks/HeroBlock/HeroSubComponents.cjs +1 -1
- package/dist/next/blocks/HeroBlock/HeroSubComponents.mjs +1 -1
- package/dist/next/blocks/HeroBlock/index.cjs +1 -1
- package/dist/next/blocks/HeroBlock/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { memo as u, forwardRef as
|
|
3
|
-
import { buildEmbedSrc as
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { memo as u, forwardRef as x, useRef as v, useImperativeHandle as y, useEffect as b } from "react";
|
|
3
|
+
import { buildEmbedSrc as g, resolveImageUrl as w, resolveAltText as N } from "./next/utils/mediaUtils.mjs";
|
|
4
4
|
import { c as C } from "./createLucideIcon-C8GTh_Qx.js";
|
|
5
5
|
import { P as k } from "./play-DYgKiSaf.js";
|
|
6
6
|
import './HeroSubComponents.css';/**
|
|
@@ -12,7 +12,7 @@ import './HeroSubComponents.css';/**
|
|
|
12
12
|
const B = [
|
|
13
13
|
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
14
14
|
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
15
|
-
], V = C("pause", B), I = "
|
|
15
|
+
], V = C("pause", B), I = "_hero_1131x_1", E = "_container_1131x_7", z = "_heading_1131x_15", T = "_text_1131x_22", j = "_eyebrow_1131x_37", H = "_disclaimer_1131x_41", P = "_articleDetails_1131x_53", D = "_articleType_1131x_66", F = "_articleCategories_1131x_80", R = "_category_1131x_86", A = "_number_1131x_102", S = "_blog_1131x_129", L = "_overlay_1131x_155", U = "_tile_1131x_225", Y = "_fullBleed_1131x_326", q = "_media_1131x_353", G = "_splitAlt_1131x_440", J = "_split_1131x_440", K = "_videoControl_1131x_514", M = "_videoBackground_1131x_557", O = "_iframe_1131x_558", l = {
|
|
16
16
|
hero: I,
|
|
17
17
|
container: E,
|
|
18
18
|
heading: z,
|
|
@@ -24,7 +24,7 @@ const B = [
|
|
|
24
24
|
articleCategories: F,
|
|
25
25
|
category: R,
|
|
26
26
|
number: A,
|
|
27
|
-
default: "
|
|
27
|
+
default: "_default_1131x_125",
|
|
28
28
|
blog: S,
|
|
29
29
|
overlay: L,
|
|
30
30
|
tile: U,
|
|
@@ -50,13 +50,13 @@ const B = [
|
|
|
50
50
|
children: e ? /* @__PURE__ */ t(V, { size: 18, "aria-hidden": !0 }) : /* @__PURE__ */ t(k, { size: 18, "aria-hidden": !0 })
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
}),
|
|
53
|
+
}), f = u(function({
|
|
54
54
|
url: e,
|
|
55
55
|
provider: i,
|
|
56
56
|
wrapperClassName: s,
|
|
57
57
|
iframeClassName: a
|
|
58
58
|
}) {
|
|
59
|
-
const r =
|
|
59
|
+
const r = g(e, i);
|
|
60
60
|
return /* @__PURE__ */ t("div", { className: s, children: /* @__PURE__ */ t(
|
|
61
61
|
"iframe",
|
|
62
62
|
{
|
|
@@ -68,8 +68,8 @@ const B = [
|
|
|
68
68
|
"aria-label": "Background video"
|
|
69
69
|
}
|
|
70
70
|
) });
|
|
71
|
-
}),
|
|
72
|
-
|
|
71
|
+
}), h = u(
|
|
72
|
+
x(function({
|
|
73
73
|
src: e,
|
|
74
74
|
autoPlay: i,
|
|
75
75
|
posterUrl: s,
|
|
@@ -78,8 +78,8 @@ const B = [
|
|
|
78
78
|
isPlaying: c,
|
|
79
79
|
onToggle: d
|
|
80
80
|
}, m) {
|
|
81
|
-
const n =
|
|
82
|
-
return
|
|
81
|
+
const n = v(null);
|
|
82
|
+
return y(m, () => ({
|
|
83
83
|
play() {
|
|
84
84
|
var o;
|
|
85
85
|
(o = n.current) == null || o.play().catch(() => {
|
|
@@ -89,11 +89,11 @@ const B = [
|
|
|
89
89
|
var o;
|
|
90
90
|
(o = n.current) == null || o.pause();
|
|
91
91
|
}
|
|
92
|
-
})),
|
|
92
|
+
})), b(() => {
|
|
93
93
|
const o = n.current;
|
|
94
94
|
o && (c ? o.play().catch(() => {
|
|
95
95
|
}) : o.pause());
|
|
96
|
-
}, [c]), /* @__PURE__ */
|
|
96
|
+
}, [c]), /* @__PURE__ */ p("div", { className: a, style: { position: "relative" }, children: [
|
|
97
97
|
/* @__PURE__ */ t(Q, { isPlaying: c, onToggle: d }),
|
|
98
98
|
/* @__PURE__ */ t(
|
|
99
99
|
"video",
|
|
@@ -122,14 +122,14 @@ const B = [
|
|
|
122
122
|
}) {
|
|
123
123
|
const d = e.includes("vimeo.com"), m = e.includes("youtube.com") || e.includes("youtu.be"), n = d || m, o = d ? "vimeo" : "youtube";
|
|
124
124
|
return c === "inline" ? n ? /* @__PURE__ */ t(
|
|
125
|
-
|
|
125
|
+
f,
|
|
126
126
|
{
|
|
127
127
|
url: e,
|
|
128
128
|
provider: o,
|
|
129
129
|
wrapperClassName: l.media
|
|
130
130
|
}
|
|
131
131
|
) : /* @__PURE__ */ t(
|
|
132
|
-
|
|
132
|
+
h,
|
|
133
133
|
{
|
|
134
134
|
src: e,
|
|
135
135
|
autoPlay: i,
|
|
@@ -139,7 +139,7 @@ const B = [
|
|
|
139
139
|
onToggle: r
|
|
140
140
|
}
|
|
141
141
|
) : n ? /* @__PURE__ */ t(
|
|
142
|
-
|
|
142
|
+
f,
|
|
143
143
|
{
|
|
144
144
|
url: e,
|
|
145
145
|
provider: o,
|
|
@@ -147,7 +147,7 @@ const B = [
|
|
|
147
147
|
iframeClassName: l.iframe
|
|
148
148
|
}
|
|
149
149
|
) : /* @__PURE__ */ t(
|
|
150
|
-
|
|
150
|
+
h,
|
|
151
151
|
{
|
|
152
152
|
src: e,
|
|
153
153
|
autoPlay: i,
|
|
@@ -163,7 +163,7 @@ const B = [
|
|
|
163
163
|
variant: s,
|
|
164
164
|
imageAdapter: a
|
|
165
165
|
}) {
|
|
166
|
-
const r =
|
|
166
|
+
const r = w(e, i, "medium");
|
|
167
167
|
if (!r) return null;
|
|
168
168
|
const c = N(e, i), d = /* @__PURE__ */ t(
|
|
169
169
|
"img",
|
|
@@ -195,9 +195,9 @@ const B = [
|
|
|
195
195
|
});
|
|
196
196
|
export {
|
|
197
197
|
oe as H,
|
|
198
|
-
|
|
198
|
+
h as N,
|
|
199
199
|
te as V,
|
|
200
200
|
Q as a,
|
|
201
|
-
|
|
201
|
+
f as b,
|
|
202
202
|
l as s
|
|
203
203
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";require('./HeroSubComponents.css');const t=require("react/jsx-runtime"),l=require("react"),
|
|
1
|
+
"use strict";require('./HeroSubComponents.css');const t=require("react/jsx-runtime"),l=require("react"),x=require("./next/utils/mediaUtils.cjs"),p=require("./createLucideIcon-DpotSgUx.cjs"),y=require("./play-CQBnZgNa.cjs");/**
|
|
2
2
|
* @license lucide-react v0.488.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const b=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],g=p.createLucideIcon("pause",b),j="_hero_1131x_1",w="_container_1131x_7",C="_heading_1131x_15",N="_text_1131x_22",k="_eyebrow_1131x_37",B="_disclaimer_1131x_41",V="_articleDetails_1131x_53",I="_articleType_1131x_66",E="_articleCategories_1131x_80",q="_category_1131x_86",z="_number_1131x_102",T="_blog_1131x_129",H="_overlay_1131x_155",R="_tile_1131x_225",D="_fullBleed_1131x_326",F="_media_1131x_353",P="_splitAlt_1131x_440",A="_split_1131x_440",L="_videoControl_1131x_514",S="_videoBackground_1131x_557",U="_iframe_1131x_558",n={hero:j,container:w,heading:C,text:N,eyebrow:k,disclaimer:B,articleDetails:V,articleType:I,articleCategories:E,category:q,number:z,default:"_default_1131x_125",blog:T,overlay:H,tile:R,fullBleed:D,media:F,splitAlt:P,split:A,videoControl:L,videoBackground:S,iframe:U},v=l.memo(function({isPlaying:e,onToggle:i}){return t.jsx("button",{type:"button",title:e?"Pause the video":"Play the video","aria-label":e?"Pause video":"Play video",className:n.videoControl,onClick:i,children:e?t.jsx(g,{size:18,"aria-hidden":!0}):t.jsx(y.Play,{size:18,"aria-hidden":!0})})}),h=l.memo(function({url:e,provider:i,wrapperClassName:a,iframeClassName:s}){const r=x.buildEmbedSrc(e,i);return t.jsx("div",{className:a,children:t.jsx("iframe",{src:r,className:s,allow:"autoplay; fullscreen",allowFullScreen:!0,title:"Embedded video","aria-label":"Background video"})})}),f=l.memo(l.forwardRef(function({src:e,autoPlay:i,posterUrl:a,wrapperClassName:s,videoClassName:r,isPlaying:c,onToggle:u},m){const d=l.useRef(null);return l.useImperativeHandle(m,()=>({play(){var o;(o=d.current)==null||o.play().catch(()=>{})},pause(){var o;(o=d.current)==null||o.pause()}})),l.useEffect(()=>{const o=d.current;o&&(c?o.play().catch(()=>{}):o.pause())},[c]),t.jsxs("div",{className:s,style:{position:"relative"},children:[t.jsx(v,{isPlaying:c,onToggle:u}),t.jsx("video",{ref:d,src:e,autoPlay:i,loop:!0,muted:!0,playsInline:!0,poster:a,preload:"metadata",className:r,"aria-label":"Background video"})]})})),$=l.memo(function({url:e,autoPlay:i,posterUrl:a,isPlaying:s,onToggle:r,variant:c}){const u=e.includes("vimeo.com"),m=e.includes("youtube.com")||e.includes("youtu.be"),d=u||m,o=u?"vimeo":"youtube";return c==="inline"?d?t.jsx(h,{url:e,provider:o,wrapperClassName:n.media}):t.jsx(f,{src:e,autoPlay:i,posterUrl:a,wrapperClassName:n.media,isPlaying:s,onToggle:r}):d?t.jsx(h,{url:e,provider:o,wrapperClassName:n.videoBackground,iframeClassName:n.iframe}):t.jsx(f,{src:e,autoPlay:i,posterUrl:a,videoClassName:n.videoBackground,isPlaying:s,onToggle:r})}),Y=l.memo(function({image:e,mode:i,variant:a,imageAdapter:s}){const r=x.resolveImageUrl(e,i,"medium");if(!r)return null;const c=x.resolveAltText(e,i),u=t.jsx("img",{fetchPriority:"high",src:r,alt:c,draggable:!1,style:a==="fill"?{objectFit:"cover",width:"100%",height:"100%"}:{width:"100%",height:"100%"}});return s?t.jsx("div",{className:n.media,children:a==="fill"?s.render({src:r,alt:c,fill:!0,priority:!0,fetchPriority:"high",style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):s.render({src:r,alt:c,width:650,height:750,priority:!0,fetchPriority:"high"})}):t.jsx("div",{className:n.media,children:u})});exports.HeroImage=Y;exports.NativeVideo=f;exports.VideoBlock=$;exports.VideoControl=v;exports.VideoEmbed=h;exports.styles=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._hero_1131x_1{width:100%;padding-top:var(--spacing-xl);padding-bottom:var(--spacing-xl)}._container_1131x_7{width:100%;max-width:var(--layout-width, 1300px);margin:0 auto;padding-left:var(--spacing-md);padding-right:var(--spacing-md)}._heading_1131x_15{display:flex;flex-direction:column;width:100%;flex:1;gap:var(--spacing-md)}._heading_1131x_15:not(:has(._text_1131x_22 .portableTextContainer)){gap:var(--spacing-lg)}._heading_1131x_15 h1,._heading_1131x_15 h2,._heading_1131x_15 h3,._heading_1131x_15 h4,._heading_1131x_15 h5,._heading_1131x_15 h6{width:100%;margin-block:0}._eyebrow_1131x_37{font-weight:var(--font-weight-bold)}._disclaimer_1131x_41{color:var(--color-text-primary);font-size:var(--font-size-sm)}._text_1131x_22{flex:1;display:flex;flex-direction:column;gap:var(--spacing-lg)}._articleDetails_1131x_53{color:var(--color-secondary-75);display:flex;align-items:center;margin-bottom:var(--spacing-md);gap:var(--spacing-md)}@media (max-width: 767px){._articleDetails_1131x_53{flex-wrap:wrap;gap:var(--spacing-md)}}._articleType_1131x_66{display:flex;align-items:center;justify-content:center;background-color:var(--color-secondary-75);padding:0 var(--spacing-md);color:#fff;width:auto;height:36px;border-radius:var(--radius-full);text-transform:capitalize;text-decoration:none}._articleCategories_1131x_80{display:flex;flex-wrap:wrap;gap:var(--spacing-sm)}._category_1131x_86{border:1px solid var(--color-secondary-75);display:flex;align-items:center;justify-content:center;background-color:transparent;padding:0 var(--spacing-md);color:var(--color-secondary-75);width:auto;height:36px;border-radius:var(--radius-full);text-transform:capitalize;text-decoration:none}._number_1131x_102{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-secondary-75);color:#fff;width:25px;height:25px;border-radius:var(--radius-full);text-transform:capitalize;margin-right:var(--spacing-xs)}._pipe_1131x_115{margin:0 var(--spacing-sm)}@media (max-width: 767px){._pipe_1131x_115._hide_1131x_118{display:none}}._default_1131x_125{position:relative}._blog_1131x_129{position:relative;padding:0 var(--spacing-md)}._blog_1131x_129 ._container_1131x_7{max-width:var(--layout-width, 1300px);position:relative;display:flex;align-items:flex-end;width:100%;min-height:450px;height:100%;overflow:hidden;flex-grow:1;padding:var(--nav-height) 0 0;border-radius:var(--radius-md)}._blog_1131x_129 ._container_1131x_7 img{z-index:1;transition:width .3s ease-in-out,height .3s ease-in-out}@media (max-width: 767px){._blog_1131x_129 ._overlay_1131x_155{width:100%;padding:4rem var(--spacing-md) var(--spacing-xl)}}._blog_1131x_129 ._text_1131x_22{z-index:3;position:relative;max-width:650px;background-color:var(--color-background);padding:var(--spacing-xl);border-radius:var(--radius-md)}@media (min-width: 768px){._blog_1131x_129 ._text_1131x_22{border-radius:var(--radius-md) var(--radius-md) 0 0}._blog_1131x_129 ._text_1131x_22:before{content:"";position:absolute;top:-25px;left:0;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:-20px 20px 0 20px var(--color-background)}._blog_1131x_129 ._text_1131x_22:after{content:"";position:absolute;bottom:0;right:-20px;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:0 10px 0 0 var(--color-background)}}._tile_1131x_225{position:relative;padding:var(--spacing-md)}._tile_1131x_225 ._container_1131x_7{max-width:var(--layout-width, 1300px);position:relative;display:flex;align-items:flex-end;width:100%;min-height:650px;height:100%;overflow:hidden;flex-grow:1;padding:var(--nav-height) 0 0;border-radius:var(--radius-md)}._tile_1131x_225 ._container_1131x_7 img{z-index:1;transition:width .3s ease-in-out,height .3s ease-in-out}@media (max-width: 767px){._tile_1131x_225 ._overlay_1131x_155{width:100%;padding:4rem var(--spacing-md)}}._tile_1131x_225 ._text_1131x_22{z-index:3;position:relative;max-width:650px;background-color:var(--color-background);padding:var(--spacing-xl);border-radius:var(--radius-md)}@media (min-width: 768px){._tile_1131x_225 ._text_1131x_22{border-radius:var(--radius-md) var(--radius-md) 0 0}._tile_1131x_225 ._text_1131x_22:before{content:"";position:absolute;top:-25px;left:0;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:-20px 20px 0 20px var(--color-background)}._tile_1131x_225 ._text_1131x_22:after{content:"";position:absolute;bottom:0;right:-20px;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:0 10px 0 0 var(--color-background)}}._fullBleed_1131x_326{position:relative;padding-top:0;padding-bottom:0}._fullBleed_1131x_326 ._container_1131x_7{max-width:var(--layout-width, 1300px);position:relative;display:flex;align-items:flex-end;width:100%;min-height:650px;height:100%;overflow:hidden;flex-grow:1;border-radius:0}._fullBleed_1131x_326 ._container_1131x_7 img{z-index:1;transition:width .3s ease-in-out,height .3s ease-in-out}._fullBleed_1131x_326 ._media_1131x_353{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1;border-radius:0}._fullBleed_1131x_326 ._media_1131x_353 img,._fullBleed_1131x_326 ._media_1131x_353 video,._fullBleed_1131x_326 ._media_1131x_353 iframe{width:100%;height:100%;object-fit:cover;display:block}._fullBleed_1131x_326 ._overlay_1131x_155{position:relative;z-index:1;min-height:80vh;display:flex;align-items:flex-end;padding-bottom:var(--spacing-xl);padding-top:var(--nav-height, 0px);background:linear-gradient(to top,#000000a6,#0000004d,#0000)}@media (max-width: 767px){._fullBleed_1131x_326 ._overlay_1131x_155{min-height:60vh;padding-bottom:var(--spacing-lg)}}._fullBleed_1131x_326 ._text_1131x_22{max-width:700px;color:#fff;background-color:transparent;padding:0;border-radius:0;z-index:3;position:relative;max-width:650px;background-color:var(--color-background);padding:var(--spacing-xl);margin-bottom:var(--spacing-md);border-radius:var(--radius-md)}@media (max-width: 767px){._fullBleed_1131x_326 ._text_1131x_22{margin-bottom:var(--spacing-xl);bottom:2rem}}._fullBleed_1131x_326 ._text_1131x_22:before,._fullBleed_1131x_326 ._text_1131x_22:after{display:none}._default_1131x_125 ._media_1131x_353{position:relative;width:100%;height:480px;margin-bottom:var(--spacing-md);border-radius:var(--radius-md);overflow:hidden}@media (max-width: 767px){._default_1131x_125 ._media_1131x_353{height:280px}}._default_1131x_125 ._media_1131x_353 img{width:100%;height:100%;object-fit:cover;object-position:center;display:block}._splitAlt_1131x_440 ._media_1131x_353,._split_1131x_440 ._media_1131x_353{height:100%;padding-bottom:0;margin-bottom:0}._splitAlt_1131x_440 ._media_1131x_353 video,._splitAlt_1131x_440 ._media_1131x_353 iframe,._split_1131x_440 ._media_1131x_353 video,._split_1131x_440 ._media_1131x_353 iframe{position:relative;border-radius:var(--radius-md)}._splitAlt_1131x_440 ._media_1131x_353 img,._split_1131x_440 ._media_1131x_353 img{border-radius:var(--radius-md);width:100%;height:auto;max-height:500px;object-fit:contain}._splitAlt_1131x_440 ._container_1131x_7{display:flex;align-items:center;gap:3rem}@media (max-width: 767px){._splitAlt_1131x_440 ._container_1131x_7{flex-direction:column-reverse;gap:var(--spacing-xl)}._splitAlt_1131x_440 ._container_1131x_7 ._media_1131x_353{width:100%;max-width:500px}}._splitAlt_1131x_440 ._container_1131x_7 ._media_1131x_353{flex:.65}._splitAlt_1131x_440 ._container_1131x_7 ._heading_1131x_15{flex:.35}._split_1131x_440 ._container_1131x_7{display:flex;align-items:center;gap:3rem}._split_1131x_440 ._container_1131x_7 ._media_1131x_353{flex:1}._split_1131x_440 ._container_1131x_7 ._media_1131x_353 img{width:100%;height:auto;max-height:500px;object-fit:contain}@media (max-width: 767px){._split_1131x_440 ._container_1131x_7{flex-direction:column-reverse;gap:var(--spacing-xl)}._split_1131x_440 ._container_1131x_7 ._media_1131x_353{width:100%;max-width:500px}}._videoControl_1131x_514{position:absolute;bottom:1rem;right:1rem;z-index:5;background:#00000080;border:none;border-radius:50%;padding:var(--spacing-sm);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;transition:color .3s ease-in-out}._videoControl_1131x_514:hover{color:var(--color-primary-25)}._media_1131x_353{position:relative;width:100%;height:0;overflow:hidden;border-radius:var(--radius-md);flex:1;margin-bottom:var(--spacing-md);line-height:0}._media_1131x_353 iframe,._media_1131x_353 video{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}._videoBackground_1131x_557,._iframe_1131x_558{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:0;pointer-events:none}._iframe_1131x_558{border:none}.splitAlt ._text_1131x_22{flex:.65}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),le=require("../Modal/index.cjs"),A=require("../../../index-hPJqlEOh.cjs"),te=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-BaEzx3t5.cjs"),V=require("../../utils/NoScroll/noScroll.cjs"),Ce=require("../../../chevron-right-motlyADs.cjs"),H=require("../../../external-link-DDShu-48.cjs"),_e=require("../../../x-Dft9NVe_.cjs"),ae=require("../../../createLucideIcon-DpotSgUx.cjs"),Se=require("../../../chevron-down-DfK1XBl3.cjs");/**
|
|
2
2
|
* @license lucide-react v0.488.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const Ee=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Le=ae.createLucideIcon("earth",Ee);/**
|
|
7
7
|
* @license lucide-react v0.488.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Le=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ne.createLucideIcon("search",Le),Ee={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},Re=({spotlight:i,renderText:h})=>{var y,_,p,v,k,S;const r=i.callToAction;if(!r)return null;const j=((y=r.linkOptions)==null?void 0:y.linkType)==="external";let u="#";return j&&((_=r.linkOptions)!=null&&_.externalUrl)?u=r.linkOptions.externalUrl:((p=r.linkOptions)==null?void 0:p.linkType)==="internal"&&((k=(v=r.linkOptions)==null?void 0:v.internalUrl)!=null&&k.slug.current)&&(u=`/${r.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((S=i.image.imageUrls)==null?void 0:S.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:h==null?void 0:h(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:h==null?void 0:h(i.description,e.styles.description)})]}),r.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(z.Button,{as:"a",variant:r.variant??"primary",href:u,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":r.ariaLabel||r.label,children:r.label})})]})};function ze({renderText:i,title:h,logo:r,items:j,groups:u,utilityItems:y,isSticky:_=!1,showSearch:p=!0,showLocaleSelect:v=!0,showThemeToggle:k=!0,themeToggleComponent:S,alignment:q="right",variant:ae="standard",navigationType:I="default",searchComponent:te,localeSelectComponent:ie,className:re,style:ce,...oe}){const[m,V]=a.useState(!1),[H,f]=a.useState(null),[de,ue]=a.useState(0),[ye,he]=a.useState(!1),[me,be]=a.useState(null),[c,$]=a.useState([]),[L,O]=a.useState(0),[xe,X]=a.useState(null),[w,pe]=a.useState(!1),[M,E]=a.useState("forward"),A=a.useRef(null),C=a.useRef(null),W=a.useRef(new Map),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:S})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{size:"lg",className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:te})})}),K=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Ie,{size:16,"aria-hidden":"true"})}),content:ie})})}),B=a.useCallback(()=>{C.current&&ue(C.current.getBoundingClientRect().width)},[]),fe=()=>{V(l=>{const n=!l;return n||($([]),E("forward"),f(null)),n})},Q=a.useCallback(l=>{const n=W.current.get(l);if(n&&C.current){const d=n.getBoundingClientRect(),b=C.current.getBoundingClientRect();be(d.left-b.left+d.width/2)}},[]),je=a.useCallback(l=>{f(n=>n===l?null:l)},[]),G=a.useCallback(l=>{A.current&&!A.current.contains(l.target)&&f(null)},[]),D=a.useCallback(()=>{B(),typeof window<"u"&&window.innerWidth>768&&(V(!1),f(null))},[B]),ve=()=>$([]),ke=l=>{E("forward"),$([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},Y=l=>{E("forward"),$(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},ge=()=>{E("backward"),$(l=>l.slice(0,-1))};a.useEffect(()=>{if(typeof window>"u")return;const l=()=>pe(window.innerWidth<768);return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),a.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",D),n&&document.addEventListener("click",G),B(),he(!0),()=>{l&&window.removeEventListener("resize",D),n&&document.removeEventListener("click",G)}},[D,G,B]),a.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>U.lockScroll(),0):U.unlockScroll(),()=>U.unlockScroll()},[m]);const R=(l,n="")=>l.map((d,b)=>{const g=`${n}/${d._key??d.label}-${b}`;return s.jsx(e.NavLink,{link:d,path:g,parentPath:n,openPath:H,togglePath:je,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:W},g)}),Ne=l=>l.map((n,d)=>{var Z,T;const b=`group-${d}`,g=xe===d,x=(Z=n.primaryItems)==null?void 0:Z[L??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{X(d),f(b),Q(b)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:t=>{W.current.set(b,t)},"aria-haspopup":!0,"aria-expanded":g,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${g?e.styles.open:""}`,children:[n.title,s.jsx(_e.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${g?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,onMouseLeave:()=>{X(null),O(0),f(null)},children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${n.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(T=n.primaryItems)==null?void 0:T.map((t,N)=>t.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:t.href,className:`${e.styles.link} ${L===N?e.styles.open:""}`,target:t.isExternal?"_blank":"_self",rel:t.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ee;f(null),(ee=t.onClick)==null||ee.call(t)},onMouseEnter:()=>O(N),children:[s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]}),t.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},t._key??N):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${L===N?e.styles.open:""}`,onMouseEnter:()=>O(N),children:s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]})})},t._key??N))]}),(x==null?void 0:x.sublinks)&&x.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[x.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(x.description)}),R(x.sublinks,`${b}-${L}`)]},`${x.label}-${x.sublinks.length}`),n.secondaryItems&&n.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:R(n.secondaryItems,`${b}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Re,{spotlight:n.spotlight,renderText:i})})]})})})]},n._key??`group-${d}`)}),$e=[e.styles.navbar,Be[q],Ee[ae],_?e.styles.sticky:"",u!=null&&u.length?e.styles.advanced:e.styles.default,re??""].filter(Boolean).join(" "),o=y&&y.length>0?y[Math.min(1,y.length-1)]:null;return s.jsx("header",{ref:A,className:$e,style:ce,"aria-label":"Site header",...oe,children:s.jsxs("div",{className:`${e.styles.container} ${(!y||y.length===0)&&q!=="center"?e.styles.twoColumn:""}`,children:[r?s.jsx("div",{className:e.styles.logo,children:r}):h?s.jsx("div",{className:e.styles.title,children:h}):null,s.jsx("nav",{ref:C,style:{left:q==="center"?`calc(50% - ${de/2}px)`:"0"},className:`${e.styles.nav} ${m?e.styles.open:""} ${ye?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${me}px`},className:`${e.styles.triangle} ${H?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&R(j),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&!w&&s.jsx(F,{}),v&&s.jsx(K,{})]}),!w&&I==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&Ne(u),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&s.jsx(F,{}),v&&s.jsx(K,{})]}),w&&I==="advanced"&&m&&c.length===0&&u&&s.jsx("div",{className:e.styles.mobileMenu,children:u.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ke(l),children:l.title})},l._key??n))}),w&&I==="advanced"&&m&&c.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:c.length===1?ve:ge,children:s.jsx(we.ChevronLeft,{size:18,"aria-hidden":"true"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(c[c.length-1].description)}),c[c.length-1].primary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(l),children:s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]})}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,children:[s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]}),l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`primary-${n}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(l),children:l.label}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,children:[l.label,l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`secondary-${n}`))]},`stack-${c.length}`)]})}),y&&y.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(le.ButtonGroup,{children:y.map((l,n)=>s.jsx(z.Button,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel,icon:l.icon,iconAlignment:l.iconAlignment,children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel}):l.label},l._key??n))})}),o&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(le.ButtonGroup,{alignment:"center",children:s.jsx(z.Button,{as:"a",href:o.href??"/",variant:o.variant??"primary",displayType:o.displayType??"text",imageSrc:o.imageSrc,imageAlt:o.imageAlt,"aria-label":o.ariaLabel,icon:o.icon,iconAlignment:o.iconAlignment,children:o.imageSrc?s.jsx("img",{src:o.imageSrc,alt:o.imageAlt??o.ariaLabel}):o.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[w&&p&&s.jsx(F,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:fe,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(Ce.X,{size:24,"aria-hidden":"true"}):s.jsx(z.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=ze;
|
|
11
|
+
*/const Ie=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ae.createLucideIcon("search",Ie),Re={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},qe=({spotlight:i,renderText:x})=>{var h,E,p,g,N,L;const c=i.callToAction;if(!c)return null;const j=((h=c.linkOptions)==null?void 0:h.linkType)==="external";let y="#";return j&&((E=c.linkOptions)!=null&&E.externalUrl)?y=c.linkOptions.externalUrl:((p=c.linkOptions)==null?void 0:p.linkType)==="internal"&&((N=(g=c.linkOptions)==null?void 0:g.internalUrl)!=null&&N.slug.current)&&(y=`/${c.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((L=i.image.imageUrls)==null?void 0:L.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:x==null?void 0:x(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:x==null?void 0:x(i.description,e.styles.description)})]}),c.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(A.Button,{as:"a",variant:c.variant??"primary",href:y,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":c.ariaLabel||c.label,children:c.label})})]})};function ze({renderText:i,title:x,logo:c,items:j,groups:y,utilityItems:h,isSticky:E=!1,showSearch:p=!0,showLocaleSelect:g=!0,showThemeToggle:N=!0,themeToggleComponent:L,alignment:O="right",variant:ie="standard",navigationType:I="default",searchComponent:re,localeSelectComponent:ce,className:oe,style:de,...ue}){const[m,X]=t.useState(!1),[K,v]=t.useState(null),[ye,he]=t.useState(0),[me,fe]=t.useState(!1),[be,xe]=t.useState(null),[d,w]=t.useState([]),[M,W]=t.useState(0),[pe,J]=t.useState(null),[C,ve]=t.useState(!1),[R,B]=t.useState("forward"),D=t.useRef(null),k=t.useRef(null),Q=t.useRef(null),G=t.useRef(new Map),T=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:L})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(le.Modal,{size:"lg",className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:re})})}),Y=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(le.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Le,{size:16,"aria-hidden":"true"})}),content:ce})})}),q=t.useCallback(()=>{k.current&&he(k.current.getBoundingClientRect().width)},[]),Z=()=>{X(n=>{const l=!n;return l||(w([]),B("forward"),v(null)),l})},ee=t.useCallback(n=>{const l=G.current.get(n);if(l&&k.current){const r=l.getBoundingClientRect(),o=k.current.getBoundingClientRect();xe(r.left-o.left+r.width/2)}},[]),ke=t.useCallback(n=>{v(l=>l===n?null:n)},[]),U=t.useCallback(n=>{D.current&&!D.current.contains(n.target)&&v(null)},[]),P=t.useCallback(()=>{q(),typeof window<"u"&&window.innerWidth>768&&(X(!1),v(null))},[q]),je=()=>w([]),ge=n=>{B("forward"),w([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},se=n=>{B("forward"),w(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},Ne=()=>{B("backward"),w(n=>n.slice(0,-1))};t.useEffect(()=>{if(typeof window>"u")return;const n=()=>ve(window.innerWidth<768);return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",P),l&&document.addEventListener("click",U),q(),fe(!0),()=>{n&&window.removeEventListener("resize",P),l&&document.removeEventListener("click",U)}},[P,U,q]),t.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>V.lockScroll(),0):V.unlockScroll(),()=>V.unlockScroll()},[m]),t.useEffect(()=>{var r;if(!m)return;const n=(r=k.current)==null?void 0:r.querySelector('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus();const l=o=>{var S;if(o.key==="Escape"){Z(),(S=Q.current)==null||S.focus();return}if(o.key!=="Tab"||!k.current)return;const b=Array.from(k.current.querySelectorAll('a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(a=>!a.closest("[aria-hidden=true]"));if(b.length===0)return;const f=b[0],_=b[b.length-1];o.shiftKey?document.activeElement===f&&(o.preventDefault(),_.focus()):document.activeElement===_&&(o.preventDefault(),f.focus())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[m]);const z=(n,l="")=>n.map((r,o)=>{const b=`${l}/${r._key??r.label}-${o}`;return s.jsx(e.NavLink,{link:r,path:b,parentPath:l,openPath:K,togglePath:ke,updateTriangleIndicator:ee,setOpenPath:v,renderLinks:z,buttonRefs:G},b)}),$e=n=>n.map((l,r)=>{var _,S;const o=`group-${r}`,b=pe===r,f=(_=l.primaryItems)==null?void 0:_[M??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{J(r),v(o),ee(o)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:a=>{G.current.set(o,a)},"aria-haspopup":!0,"aria-expanded":b,"aria-controls":`submenu-${r}`,className:`${e.styles.sublinkToggle} ${b?e.styles.open:""}`,children:[l.title,s.jsx(Se.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${r}`,className:`${e.styles.sublinks} ${b?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,onMouseLeave:()=>{J(null),W(0),v(null)},children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${l.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(S=l.primaryItems)==null?void 0:S.map((a,$)=>a.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:a.href,className:`${e.styles.link} ${M===$?e.styles.open:""}`,target:a.isExternal?"_blank":"_self",rel:a.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ne;v(null),(ne=a.onClick)==null||ne.call(a)},onMouseEnter:()=>W($),children:[s.jsxs("span",{className:e.styles.linkContent,children:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]}),a.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},a._key??$):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${M===$?e.styles.open:""}`,onMouseEnter:()=>W($),children:s.jsxs("span",{className:e.styles.linkContent,children:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]})})},a._key??$))]}),(f==null?void 0:f.sublinks)&&f.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[f.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(f.description)}),z(f.sublinks,`${o}-${M}`)]},`${f.label}-${f.sublinks.length}`),l.secondaryItems&&l.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:z(l.secondaryItems,`${o}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(qe,{spotlight:l.spotlight,renderText:i})})]})})})]},l._key??`group-${r}`)}),we=[e.styles.navbar,Be[O],Re[ie],E?e.styles.sticky:"",y!=null&&y.length?e.styles.advanced:e.styles.default,oe??""].filter(Boolean).join(" "),u=h&&h.length>0?h[Math.min(1,h.length-1)]:null;return s.jsx("header",{ref:D,className:we,style:de,"aria-label":"Site header",...ue,children:s.jsxs("div",{className:`${e.styles.container} ${(!h||h.length===0)&&O!=="center"?e.styles.twoColumn:""}`,children:[c?s.jsx("div",{className:e.styles.logo,children:c}):x?s.jsx("div",{className:e.styles.title,children:x}):null,s.jsx("nav",{ref:k,style:{left:O==="center"?`calc(50% - ${ye/2}px)`:"0"},"aria-modal":m?"true":void 0,className:`${e.styles.nav} ${m?e.styles.open:""} ${me?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${be}px`},className:`${e.styles.triangle} ${K?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&z(j),(p||g||N)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),N&&s.jsx(T,{}),p&&!C&&s.jsx(F,{}),g&&s.jsx(Y,{})]}),!C&&I==="advanced"&&y&&s.jsxs("div",{className:e.styles.grid,children:[y.length>0&&$e(y),(p||g||N)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),N&&s.jsx(T,{}),p&&s.jsx(F,{}),g&&s.jsx(Y,{})]}),C&&I==="advanced"&&m&&d.length===0&&y&&s.jsx("div",{className:e.styles.mobileMenu,children:y.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ge(n),children:n.title})},n._key??l))}),C&&I==="advanced"&&m&&d.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:d.length===1?je:Ne,children:s.jsx(Ce.ChevronLeft,{size:18,"aria-hidden":"true"})}),d[d.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(d[d.length-1].description)}),d[d.length-1].primary.map((n,l)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>se(n),children:s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]})}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,children:[s.jsxs("span",{className:e.styles.linkContent,children:[n.label,n.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:n.subtitle})]}),n.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},n._key??`primary-${l}`)),d[d.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),d[d.length-1].secondary.map((n,l)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${R==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>se(n),children:n.label}):s.jsxs("a",{href:n.href,className:e.styles.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,children:[n.label,n.isExternal&&s.jsx(H.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},n._key??`secondary-${l}`))]},`stack-${d.length}`)]})}),h&&h.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(te.ButtonGroup,{children:h.map((n,l)=>s.jsx(A.Button,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel}):n.label},n._key??l))})}),u&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(te.ButtonGroup,{alignment:"center",children:s.jsx(A.Button,{as:"a",href:u.href??"/",variant:u.variant??"primary",displayType:u.displayType??"text",imageSrc:u.imageSrc,imageAlt:u.imageAlt,"aria-label":u.ariaLabel,icon:u.icon,iconAlignment:u.iconAlignment,children:u.imageSrc?s.jsx("img",{src:u.imageSrc,alt:u.imageAlt??u.ariaLabel}):u.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[C&&p&&s.jsx(F,{}),s.jsx("button",{ref:Q,className:e.styles.menuToggle,onClick:Z,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(_e.X,{size:24,"aria-hidden":"true"}):s.jsx(A.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=ze;
|