quirk-ui 0.0.433 → 0.0.435
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/NavLink-CchZ0Ady.cjs +1 -0
- package/dist/{NavLink-DOlT1Tr2.js → NavLink-Dk1p55ah.js} +26 -25
- package/dist/core/components/NavBar/NavLink.cjs +1 -1
- package/dist/core/components/NavBar/NavLink.mjs +1 -1
- package/dist/core/components/NavBar/index.cjs +2 -2
- package/dist/core/components/NavBar/index.mjs +3 -3
- package/dist/core.d.ts +1 -1
- package/dist/main.d.ts +1 -1
- package/package.json +1 -1
- package/dist/NavLink-BehIEV1p.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/NavLink.css');const o=require("react/jsx-runtime"),b=require("react"),p=require("./external-link-DDShu-48.cjs"),h=require("./chevron-down-DfK1XBl3.cjs"),k="_navbar_f1e8g_5",v="_sticky_f1e8g_19",I="_left_f1e8g_34",C="_container_f1e8g_35",M="_logo_f1e8g_39",w="_nav_f1e8g_5",y="_center_f1e8g_54",x="_hidden_f1e8g_60",N="_visible_f1e8g_67",T="_right_f1e8g_82",j="_title_f1e8g_89",S="_linkWrapper_f1e8g_99",W="_parent_f1e8g_99",$="_linkItem_f1e8g_107",D="_link_f1e8g_99",L="_search_f1e8g_109",E="_locale_f1e8g_110",F="_sublinkToggle_f1e8g_111",R="_standard_f1e8g_159",q="_triangle_f1e8g_167",B="_transparent_f1e8g_172",z="_utility_f1e8g_226",A="_menuToggle_f1e8g_246",G="_twoColumn_f1e8g_276",H="_mobileButtons_f1e8g_285",J="_utilityMobile_f1e8g_370",K="_navInner_f1e8g_398",Q="_grid_f1e8g_409",U="_searchModal_f1e8g_428",V="_localeModal_f1e8g_429",X="_separator_f1e8g_444",Y="_newTabIcon_f1e8g_474",Z="_sublinksDescription_f1e8g_486",O="_linkContent_f1e8g_489",P="_open_f1e8g_500",ee="_back_f1e8g_524",ne="_sublinks_f1e8g_486",oe="_show_f1e8g_571",te="_primaryColumn_f1e8g_612",se="_secondaryColumn_f1e8g_621",_e="_spotlightColumn_f1e8g_625",ie="_sublinksInner_f1e8g_629",le="_sublinksColumn_f1e8g_647",re="_chevron_f1e8g_657",ce="_advanced_f1e8g_839",ae="_subtitle_f1e8g_848",ge="_withSpotlight_f1e8g_890",ue="_withoutSpotlight_f1e8g_894",fe="_groupDivider_f1e8g_932",de="_searchWrapper_f1e8g_940",me="_mobileMenu_f1e8g_947",be="_mobileMenuSlide_f1e8g_948",pe="_mobileMenuItem_f1e8g_958",he="_fadeInFromLeft_f1e8g_962",ke="_fadeInFromRight_f1e8g_966",ve="_spotlight_f1e8g_625",Ie="_imageWrapper_f1e8g_976",Ce="_content_f1e8g_998",Me="_description_f1e8g_1013",we="_actions_f1e8g_1017",n={navbar:k,sticky:v,left:I,container:C,logo:M,nav:w,center:y,hidden:x,visible:N,right:T,title:j,linkWrapper:S,parent:W,linkItem:$,link:D,search:L,locale:E,sublinkToggle:F,standard:R,triangle:q,transparent:B,utility:z,menuToggle:A,twoColumn:G,mobileButtons:H,utilityMobile:J,navInner:K,grid:Q,searchModal:U,localeModal:V,separator:X,newTabIcon:Y,sublinksDescription:Z,linkContent:O,open:P,back:ee,sublinks:ne,show:oe,primaryColumn:te,secondaryColumn:se,spotlightColumn:_e,sublinksInner:ie,sublinksColumn:le,chevron:re,default:"_default_f1e8g_773",advanced:ce,subtitle:ae,withSpotlight:ge,withoutSpotlight:ue,groupDivider:fe,searchWrapper:de,mobileMenu:me,mobileMenuSlide:be,mobileMenuItem:pe,fadeInFromLeft:he,fadeInFromRight:ke,spotlight:ve,imageWrapper:Ie,content:Ce,description:Me,actions:we};function ye({link:e,path:t,parentPath:l,openPath:u,togglePath:r,updateTriangleIndicator:f,setOpenPath:s,renderLinks:d,buttonRefs:m}){var a;const _=u===t,i=!!((a=e.sublinks)!=null&&a.length),c=b.useRef(null);return m.current.set(t,c.current),o.jsxs("div",{className:`${n.linkWrapper} ${l?"":n.parent}`,children:[o.jsx("div",{className:n.linkItem,children:e.href?o.jsxs("a",{href:e.href,className:n.link,target:e.isExternal?"_blank":"_self",rel:e.isExternal?"noopener noreferrer":void 0,onClick:()=>{var g;s(null),(g=e.onClick)==null||g.call(e)},onMouseEnter:()=>{l||s(null)},role:"menuitem",children:[e.label,e.isExternal&&o.jsx(p.ExternalLink,{className:n.newTabIcon,size:16})]}):o.jsxs("button",{ref:c,"aria-haspopup":i?"true":void 0,"aria-expanded":_,className:`${n.sublinkToggle} ${_?n.open:""}`,onClick:()=>r(t),onMouseEnter:()=>{f(t),s(t)},children:[e.label,i&&o.jsx(h.ChevronDown,{size:18,className:n.chevron})]})}),i&&o.jsx("div",{className:`${n.sublinks} ${_?n.show:""}`,onMouseLeave:()=>r(t),role:"menu","aria-label":`${e.label} submenu`,children:o.jsx("div",{children:o.jsx("div",{className:n.sublinksInner,children:o.jsx("div",{className:n.sublinksColumn,children:d(e.sublinks,t)})})})})]},t)}exports.NavLink=ye;exports.styles=n;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as p } from "react";
|
|
3
3
|
import { E as h } from "./external-link-BOPobeQJ.js";
|
|
4
4
|
import { C as k } from "./chevron-down-DSUzBz9F.js";
|
|
5
|
-
import './assets/NavLink.css';const v = "_navbar_f1e8g_5", C = "_sticky_f1e8g_19", I = "_left_f1e8g_34", M = "_container_f1e8g_35", w = "_logo_f1e8g_39", y = "_nav_f1e8g_5", N = "_center_f1e8g_54", T = "_hidden_f1e8g_60", S = "_visible_f1e8g_67", W = "_right_f1e8g_82", x = "_title_f1e8g_89", D = "_linkWrapper_f1e8g_99", E = "_parent_f1e8g_99", $ = "_linkItem_f1e8g_107", F = "_link_f1e8g_99", L = "_search_f1e8g_109", R = "_locale_f1e8g_110", B = "_sublinkToggle_f1e8g_111", j = "_standard_f1e8g_159", z = "_triangle_f1e8g_167", q = "_transparent_f1e8g_172", A = "_utility_f1e8g_226", G = "_menuToggle_f1e8g_246", H = "_twoColumn_f1e8g_276", J = "_mobileButtons_f1e8g_285", K = "_utilityMobile_f1e8g_370", Q = "_navInner_f1e8g_398", U = "_grid_f1e8g_409", V = "_searchModal_f1e8g_428", X = "_localeModal_f1e8g_429", Y = "_separator_f1e8g_444", Z = "_newTabIcon_f1e8g_474", O = "_sublinksDescription_f1e8g_486", P = "_linkContent_f1e8g_489", ee = "_open_f1e8g_500", ne = "_back_f1e8g_524", oe = "_sublinks_f1e8g_486", te = "_show_f1e8g_571", se = "_primaryColumn_f1e8g_612", _e = "_secondaryColumn_f1e8g_621",
|
|
5
|
+
import './assets/NavLink.css';const v = "_navbar_f1e8g_5", C = "_sticky_f1e8g_19", I = "_left_f1e8g_34", M = "_container_f1e8g_35", w = "_logo_f1e8g_39", y = "_nav_f1e8g_5", N = "_center_f1e8g_54", T = "_hidden_f1e8g_60", S = "_visible_f1e8g_67", W = "_right_f1e8g_82", x = "_title_f1e8g_89", D = "_linkWrapper_f1e8g_99", E = "_parent_f1e8g_99", $ = "_linkItem_f1e8g_107", F = "_link_f1e8g_99", L = "_search_f1e8g_109", R = "_locale_f1e8g_110", B = "_sublinkToggle_f1e8g_111", j = "_standard_f1e8g_159", z = "_triangle_f1e8g_167", q = "_transparent_f1e8g_172", A = "_utility_f1e8g_226", G = "_menuToggle_f1e8g_246", H = "_twoColumn_f1e8g_276", J = "_mobileButtons_f1e8g_285", K = "_utilityMobile_f1e8g_370", Q = "_navInner_f1e8g_398", U = "_grid_f1e8g_409", V = "_searchModal_f1e8g_428", X = "_localeModal_f1e8g_429", Y = "_separator_f1e8g_444", Z = "_newTabIcon_f1e8g_474", O = "_sublinksDescription_f1e8g_486", P = "_linkContent_f1e8g_489", ee = "_open_f1e8g_500", ne = "_back_f1e8g_524", oe = "_sublinks_f1e8g_486", te = "_show_f1e8g_571", se = "_primaryColumn_f1e8g_612", _e = "_secondaryColumn_f1e8g_621", ie = "_spotlightColumn_f1e8g_625", le = "_sublinksInner_f1e8g_629", re = "_sublinksColumn_f1e8g_647", ce = "_chevron_f1e8g_657", ae = "_advanced_f1e8g_839", ge = "_subtitle_f1e8g_848", fe = "_withSpotlight_f1e8g_890", ue = "_withoutSpotlight_f1e8g_894", me = "_groupDivider_f1e8g_932", de = "_searchWrapper_f1e8g_940", be = "_mobileMenu_f1e8g_947", pe = "_mobileMenuSlide_f1e8g_948", he = "_mobileMenuItem_f1e8g_958", ke = "_fadeInFromLeft_f1e8g_962", ve = "_fadeInFromRight_f1e8g_966", Ce = "_spotlight_f1e8g_625", Ie = "_imageWrapper_f1e8g_976", Me = "_content_f1e8g_998", we = "_description_f1e8g_1013", ye = "_actions_f1e8g_1017", n = {
|
|
6
6
|
navbar: v,
|
|
7
7
|
sticky: C,
|
|
8
8
|
left: I,
|
|
@@ -43,15 +43,15 @@ import './assets/NavLink.css';const v = "_navbar_f1e8g_5", C = "_sticky_f1e8g_19
|
|
|
43
43
|
show: te,
|
|
44
44
|
primaryColumn: se,
|
|
45
45
|
secondaryColumn: _e,
|
|
46
|
-
spotlightColumn:
|
|
47
|
-
sublinksInner:
|
|
46
|
+
spotlightColumn: ie,
|
|
47
|
+
sublinksInner: le,
|
|
48
48
|
sublinksColumn: re,
|
|
49
|
-
chevron:
|
|
49
|
+
chevron: ce,
|
|
50
50
|
default: "_default_f1e8g_773",
|
|
51
|
-
advanced:
|
|
51
|
+
advanced: ae,
|
|
52
52
|
subtitle: ge,
|
|
53
|
-
withSpotlight:
|
|
54
|
-
withoutSpotlight:
|
|
53
|
+
withSpotlight: fe,
|
|
54
|
+
withoutSpotlight: ue,
|
|
55
55
|
groupDivider: me,
|
|
56
56
|
searchWrapper: de,
|
|
57
57
|
mobileMenu: be,
|
|
@@ -62,27 +62,28 @@ import './assets/NavLink.css';const v = "_navbar_f1e8g_5", C = "_sticky_f1e8g_19
|
|
|
62
62
|
spotlight: Ce,
|
|
63
63
|
imageWrapper: Ie,
|
|
64
64
|
content: Me,
|
|
65
|
-
|
|
65
|
+
description: we,
|
|
66
|
+
actions: ye
|
|
66
67
|
};
|
|
67
|
-
function
|
|
68
|
+
function xe({
|
|
68
69
|
link: e,
|
|
69
70
|
path: o,
|
|
70
71
|
parentPath: r,
|
|
71
|
-
openPath:
|
|
72
|
-
togglePath:
|
|
72
|
+
openPath: u,
|
|
73
|
+
togglePath: c,
|
|
73
74
|
updateTriangleIndicator: m,
|
|
74
75
|
setOpenPath: s,
|
|
75
76
|
renderLinks: d,
|
|
76
77
|
buttonRefs: b
|
|
77
78
|
}) {
|
|
78
79
|
var g;
|
|
79
|
-
const _ =
|
|
80
|
-
return b.current.set(o,
|
|
80
|
+
const _ = u === o, i = !!((g = e.sublinks) != null && g.length), a = p(null);
|
|
81
|
+
return b.current.set(o, a.current), /* @__PURE__ */ l(
|
|
81
82
|
"div",
|
|
82
83
|
{
|
|
83
84
|
className: `${n.linkWrapper} ${r ? "" : n.parent}`,
|
|
84
85
|
children: [
|
|
85
|
-
/* @__PURE__ */ t("div", { className: n.linkItem, children: e.href ? /* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ t("div", { className: n.linkItem, children: e.href ? /* @__PURE__ */ l(
|
|
86
87
|
"a",
|
|
87
88
|
{
|
|
88
89
|
href: e.href,
|
|
@@ -90,8 +91,8 @@ function We({
|
|
|
90
91
|
target: e.isExternal ? "_blank" : "_self",
|
|
91
92
|
rel: e.isExternal ? "noopener noreferrer" : void 0,
|
|
92
93
|
onClick: () => {
|
|
93
|
-
var
|
|
94
|
-
s(null), (
|
|
94
|
+
var f;
|
|
95
|
+
s(null), (f = e.onClick) == null || f.call(e);
|
|
95
96
|
},
|
|
96
97
|
onMouseEnter: () => {
|
|
97
98
|
r || s(null);
|
|
@@ -102,28 +103,28 @@ function We({
|
|
|
102
103
|
e.isExternal && /* @__PURE__ */ t(h, { className: n.newTabIcon, size: 16 })
|
|
103
104
|
]
|
|
104
105
|
}
|
|
105
|
-
) : /* @__PURE__ */
|
|
106
|
+
) : /* @__PURE__ */ l(
|
|
106
107
|
"button",
|
|
107
108
|
{
|
|
108
|
-
ref:
|
|
109
|
-
"aria-haspopup":
|
|
109
|
+
ref: a,
|
|
110
|
+
"aria-haspopup": i ? "true" : void 0,
|
|
110
111
|
"aria-expanded": _,
|
|
111
112
|
className: `${n.sublinkToggle} ${_ ? n.open : ""}`,
|
|
112
|
-
onClick: () =>
|
|
113
|
+
onClick: () => c(o),
|
|
113
114
|
onMouseEnter: () => {
|
|
114
115
|
m(o), s(o);
|
|
115
116
|
},
|
|
116
117
|
children: [
|
|
117
118
|
e.label,
|
|
118
|
-
|
|
119
|
+
i && /* @__PURE__ */ t(k, { size: 18, className: n.chevron })
|
|
119
120
|
]
|
|
120
121
|
}
|
|
121
122
|
) }),
|
|
122
|
-
|
|
123
|
+
i && /* @__PURE__ */ t(
|
|
123
124
|
"div",
|
|
124
125
|
{
|
|
125
126
|
className: `${n.sublinks} ${_ ? n.show : ""}`,
|
|
126
|
-
onMouseLeave: () =>
|
|
127
|
+
onMouseLeave: () => c(o),
|
|
127
128
|
role: "menu",
|
|
128
129
|
"aria-label": `${e.label} submenu`,
|
|
129
130
|
children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("div", { className: n.sublinksInner, children: /* @__PURE__ */ t("div", { className: n.sublinksColumn, children: d(e.sublinks, o) }) }) })
|
|
@@ -135,6 +136,6 @@ function We({
|
|
|
135
136
|
);
|
|
136
137
|
}
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
+
xe as N,
|
|
139
140
|
n as s
|
|
140
141
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const e=require("../../../NavLink-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const e=require("../../../NavLink-CchZ0Ady.cjs");require("../../../external-link-DDShu-48.cjs");require("../../../chevron-down-DfK1XBl3.cjs");exports.NavLink=e.NavLink;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),ae=require("../Modal/index.cjs"),z=require("../../../index-CF-7InbH.cjs"),te=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),ae=require("../Modal/index.cjs"),z=require("../../../index-CF-7InbH.cjs"),te=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-CchZ0Ady.cjs"),I=require("../../../external-link-DDShu-48.cjs"),ke=require("../../../x-Dft9NVe_.cjs"),D=require("../../../createLucideIcon-DpotSgUx.cjs"),pe=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.
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Ce=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Le=D.createLucideIcon("search",Ce),_e={standard:e.styles.standard,transparent:e.styles.transparent},Se={left:e.styles.left,center:e.styles.center,right:e.styles.right},Me=({spotlight:a,renderText:b})=>{var t,w,v,p,j,C,x,L,_,S,y;const g=(t=a.image)==null?void 0:t.asset.altText,f=((w=a.callToAction.linkOptions)==null?void 0:w.linkType)==="external";let u="#";return((v=a.callToAction.linkOptions)==null?void 0:v.linkType)==="external"&&((p=a.callToAction.linkOptions)!=null&&p.externalUrl)?u=(j=a.callToAction.linkOptions)==null?void 0:j.externalUrl:((C=a.callToAction.linkOptions)==null?void 0:C.linkType)==="internal"&&((L=(x=a.callToAction.linkOptions)==null?void 0:x.internalUrl)!=null&&L.slug.current)&&(u=`/${(S=(_=a.callToAction.linkOptions)==null?void 0:_.internalUrl)==null?void 0:S.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[a.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:(a==null?void 0:a.image.imageUrl)??"",alt:g||a.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[a.title&&s.jsx("div",{children:b==null?void 0:b(a.title)}),a.description&&s.jsx("div",{children:b==null?void 0:b(a.description)})]}),((y=a.callToAction)==null?void 0:y.linkOptions)&&s.jsx("div",{className:e.styles.actions,children:s.jsx(z.CallToAction,{as:"a",variant:a.callToAction.variant??"primary",href:u,target:f?"_blank":"_self",rel:f?"noopener noreferrer":"","aria-label":a.callToAction.ariaLabel||a.callToAction.label,children:a.callToAction.label})})]})};function Ae({renderText:a,title:b,logo:g,items:f,groups:u,utilityItems:t,isSticky:w=!1,showSearch:v=!0,showLocaleSelect:p=!0,alignment:j="right",variant:C="standard",navigationType:x="default",searchComponent:L,localeSelectComponent:_,className:S}){const[y,G]=r.useState(!1),[U,m]=r.useState(null),[ie,ce]=r.useState(0),[re,oe]=r.useState(!1),[de,ye]=r.useState(null),[o,M]=r.useState([]),[A,O]=r.useState(0),[ue,V]=r.useState(null),[N,he]=r.useState(!1),[E,q]=r.useState("forward"),B=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ae.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",role:"menuitem",className:e.styles.search,children:s.jsx(Le,{size:16})}),content:L})})}),X=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ae.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx($e,{size:16})}),content:_})})});r.useEffect(()=>{if(typeof window<"u"){const n=()=>{const l=window.innerWidth<768;he(l)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}},[]);const be=()=>{M([])},fe=n=>{q("forward"),M([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},H=n=>{q("forward"),M(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},xe=()=>{q("backward"),M(n=>n.slice(0,-1))},F=r.useRef(null),$=r.useRef(null),W=r.useRef(new Map),me=()=>{G(n=>!n)},J=n=>{const l=W.current.get(n);if(l&&$.current){const d=l.getBoundingClientRect(),h=$.current.getBoundingClientRect(),c=d.left-h.left+d.width/2;ye(c)}},ve=n=>{m(l=>l===n?null:n)},K=r.useCallback(n=>{F.current&&!F.current.contains(n.target)&&m(null)},[]),Q=r.useCallback(()=>{Y(),typeof window<"u"&&window.innerWidth>768&&(G(!1),m(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),Y=r.useCallback(()=>{if($.current){const n=$.current.getBoundingClientRect().width;ce(n),oe(!0)}},[]);r.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",Q),l&&document.addEventListener("click",K),Y(),()=>{n&&window.removeEventListener("resize",Q),l&&document.removeEventListener("click",K)}},[]),r.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=y?"hidden":"",()=>{document.body.style.overflow=""}},[y]);const je=n=>n.map((l,d)=>{var Z,P,ee,se,ne;const h=`group-${d}`,T=ue===d,c=(Z=l.primaryItems)==null?void 0:Z[A??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{V(d),m(h),J(h)},onMouseLeave:()=>{V(null),O(0),m(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{W.current.set(h,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":T,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${T?e.styles.open:""} `,children:[l.title,s.jsx(pe.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${T?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,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}),(P=l.primaryItems)==null?void 0:P.map((i,k)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${A===k?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var le;m(null),(le=i.onClick)==null||le.call(i)},onMouseEnter:()=>i.sublinks?O(k):null,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]}),i.isExternal&&s.jsx(I.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??k):s.jsx("button",{className:`${e.styles.sublinkToggle} ${A===k?e.styles.open:""}`,onMouseEnter:()=>O(k),children:s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]})},i._key??k))]}),(c==null?void 0:c.sublinks)&&((ee=c==null?void 0:c.sublinks)==null?void 0:ee.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(c==null?void 0:c.description)&&s.jsx("div",{className:e.styles.sublinksDescription,children:a==null?void 0:a(c.description)}),(c==null?void 0:c.sublinks)&&R(c.sublinks,`${h}-${A}`)]},`${c.label}-${(se=c==null?void 0:c.sublinks)==null?void 0:se.length}`),(l==null?void 0:l.secondaryItems)&&((ne=l==null?void 0:l.secondaryItems)==null?void 0:ne.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:l.secondaryItems&&l.secondaryItems.length>0&&R(l.secondaryItems,`${h}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Me,{spotlight:l.spotlight,renderText:a??(i=>String(i))})})]})})})]},l._key??`group-${d}`)}),R=(n,l="")=>n.map(d=>{const h=`${l}/${d.label}`;return s.jsx(e.NavLink,{link:d,path:h,parentPath:l,openPath:U,togglePath:ve,updateTriangleIndicator:J,setOpenPath:m,renderLinks:R,buttonRefs:W},d._key??h)});return s.jsx("header",{ref:F,className:`${S??""} ${Se[j]} ${_e[C]} ${e.styles.navbar} ${w?e.styles.sticky:""} ${u&&u.length?e.styles.advanced:e.styles.default}`,role:"navigation","aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!t||t.length===0)&&j!=="center"?e.styles.twoColumn:""}`,children:[g?s.jsx("div",{className:e.styles.logo,children:g}):s.jsx("div",{className:e.styles.title,children:b}),s.jsx("nav",{ref:$,style:{left:j==="center"?`calc(50% - ${ie/2}px)`:"0"},className:`${e.styles.nav} ${y?e.styles.open:""} ${re?e.styles.visible:e.styles.hidden}`,id:"main-menu",role:"menubar","aria-label":"Main navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${de}px`},className:`${e.styles.triangle} ${U?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),x==="default"&&f&&s.jsxs("div",{className:e.styles.grid,children:[f&&f.length>0&&R(f),v&&!N&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(X,{})]}),!N&&x==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&je(u),v&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(X,{})]}),N&&x==="advanced"&&y&&o.length===0&&u&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:u.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>fe(n),children:n.title})},n._key??l))}),N&&x==="advanced"&&y&&o.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{className:e.styles.back,onClick:o.length===1?be:xe,children:s.jsx(z.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),o[o.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:o[o.length-1].description&&(a==null?void 0:a(o[o.length-1].description))}),o[o.length-1].primary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>H(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,role:"menuitem",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(I.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`primary-${l}`)),o[o.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),o[o.length-1].secondary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>H(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,role:"menuitem",children:[n.label,n.isExternal&&s.jsx(I.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`secondary-${l}`))]},`stack-${o.length}`)]})}),t&&t.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(te.ButtonGroup,{children:t.map((n,l)=>s.jsx(z.CallToAction,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel??n.label,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel??n.label}):n.label},n._key||l))})}),t&&t.length>0&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${y?e.styles.open:""}`,children:s.jsx(te.ButtonGroup,{alignment:"center",children:s.jsx(z.CallToAction,{as:"a",href:t[1].href??"/",variant:t[1].variant??"primary",displayType:t[1].displayType??"text",imageSrc:t[1].imageSrc,imageAlt:t[1].imageAlt,"aria-label":t[1].ariaLabel??t[1].label,icon:t[1].icon,iconAlignment:t[1].iconAlignment,children:t[1].imageSrc?s.jsx("img",{src:t[1].imageSrc,"aria-label":t[1].imageAlt??t[1].ariaLabel??t[1].label}):t[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[N&&v&&s.jsx(B,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:me,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,"aria-controls":"main-menu",children:y?s.jsx(ke.X,{size:24}):s.jsx(we,{size:24})})]})]})})}exports.Navbar=Ae;
|
|
16
|
+
*/const Ce=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Le=D.createLucideIcon("search",Ce),_e={standard:e.styles.standard,transparent:e.styles.transparent},Se={left:e.styles.left,center:e.styles.center,right:e.styles.right},Me=({spotlight:a,renderText:b})=>{var t,w,v,p,j,C,f,L,_,S,y;const g=(t=a.image)==null?void 0:t.asset.altText,m=((w=a.callToAction.linkOptions)==null?void 0:w.linkType)==="external";let u="#";return((v=a.callToAction.linkOptions)==null?void 0:v.linkType)==="external"&&((p=a.callToAction.linkOptions)!=null&&p.externalUrl)?u=(j=a.callToAction.linkOptions)==null?void 0:j.externalUrl:((C=a.callToAction.linkOptions)==null?void 0:C.linkType)==="internal"&&((L=(f=a.callToAction.linkOptions)==null?void 0:f.internalUrl)!=null&&L.slug.current)&&(u=`/${(S=(_=a.callToAction.linkOptions)==null?void 0:_.internalUrl)==null?void 0:S.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[a.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:(a==null?void 0:a.image.imageUrl)??"",alt:g||a.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[a.title&&s.jsx("div",{className:e.styles.title,children:b==null?void 0:b(a.title,e.styles.title)}),a.description&&s.jsx("div",{className:e.styles.description,children:b==null?void 0:b(a.description,e.styles.description)})]}),((y=a.callToAction)==null?void 0:y.linkOptions)&&s.jsx("div",{className:e.styles.actions,children:s.jsx(z.CallToAction,{as:"a",variant:a.callToAction.variant??"primary",href:u,target:m?"_blank":"_self",rel:m?"noopener noreferrer":"","aria-label":a.callToAction.ariaLabel||a.callToAction.label,children:a.callToAction.label})})]})};function Ae({renderText:a,title:b,logo:g,items:m,groups:u,utilityItems:t,isSticky:w=!1,showSearch:v=!0,showLocaleSelect:p=!0,alignment:j="right",variant:C="standard",navigationType:f="default",searchComponent:L,localeSelectComponent:_,className:S}){const[y,G]=r.useState(!1),[U,x]=r.useState(null),[ie,ce]=r.useState(0),[re,oe]=r.useState(!1),[de,ye]=r.useState(null),[o,M]=r.useState([]),[A,O]=r.useState(0),[ue,V]=r.useState(null),[N,he]=r.useState(!1),[E,q]=r.useState("forward"),B=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ae.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",role:"menuitem",className:e.styles.search,children:s.jsx(Le,{size:16})}),content:L})})}),X=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(ae.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx($e,{size:16})}),content:_})})});r.useEffect(()=>{if(typeof window<"u"){const n=()=>{const l=window.innerWidth<768;he(l)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}},[]);const be=()=>{M([])},me=n=>{q("forward"),M([{title:n.title,primary:n.primaryItems??[],secondary:n.secondaryItems??[],description:""}])},H=n=>{q("forward"),M(l=>[...l,{title:n.label,primary:n.sublinks??[],secondary:[],description:n.description}])},fe=()=>{q("backward"),M(n=>n.slice(0,-1))},F=r.useRef(null),$=r.useRef(null),W=r.useRef(new Map),xe=()=>{G(n=>!n)},J=n=>{const l=W.current.get(n);if(l&&$.current){const d=l.getBoundingClientRect(),h=$.current.getBoundingClientRect(),c=d.left-h.left+d.width/2;ye(c)}},ve=n=>{x(l=>l===n?null:n)},K=r.useCallback(n=>{F.current&&!F.current.contains(n.target)&&x(null)},[]),Q=r.useCallback(()=>{Y(),typeof window<"u"&&window.innerWidth>768&&(G(!1),x(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),Y=r.useCallback(()=>{if($.current){const n=$.current.getBoundingClientRect().width;ce(n),oe(!0)}},[]);r.useEffect(()=>{const n=typeof window<"u",l=typeof document<"u";return n&&window.addEventListener("resize",Q),l&&document.addEventListener("click",K),Y(),()=>{n&&window.removeEventListener("resize",Q),l&&document.removeEventListener("click",K)}},[]),r.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=y?"hidden":"",()=>{document.body.style.overflow=""}},[y]);const je=n=>n.map((l,d)=>{var Z,P,ee,se,ne;const h=`group-${d}`,T=ue===d,c=(Z=l.primaryItems)==null?void 0:Z[A??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{V(d),x(h),J(h)},onMouseLeave:()=>{V(null),O(0),x(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{W.current.set(h,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":T,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${T?e.styles.open:""} `,children:[l.title,s.jsx(pe.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${T?e.styles.show:""}`,role:"menu","aria-label":`${l.title} submenu`,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}),(P=l.primaryItems)==null?void 0:P.map((i,k)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${A===k?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var le;x(null),(le=i.onClick)==null||le.call(i)},onMouseEnter:()=>i.sublinks?O(k):null,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]}),i.isExternal&&s.jsx(I.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??k):s.jsx("button",{className:`${e.styles.sublinkToggle} ${A===k?e.styles.open:""}`,onMouseEnter:()=>O(k),children:s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]})},i._key??k))]}),(c==null?void 0:c.sublinks)&&((ee=c==null?void 0:c.sublinks)==null?void 0:ee.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(c==null?void 0:c.description)&&s.jsx("div",{className:e.styles.sublinksDescription,children:a==null?void 0:a(c.description)}),(c==null?void 0:c.sublinks)&&R(c.sublinks,`${h}-${A}`)]},`${c.label}-${(se=c==null?void 0:c.sublinks)==null?void 0:se.length}`),(l==null?void 0:l.secondaryItems)&&((ne=l==null?void 0:l.secondaryItems)==null?void 0:ne.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:l.secondaryItems&&l.secondaryItems.length>0&&R(l.secondaryItems,`${h}-secondary`)}),l.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Me,{spotlight:l.spotlight,renderText:a??(i=>String(i))})})]})})})]},l._key??`group-${d}`)}),R=(n,l="")=>n.map(d=>{const h=`${l}/${d.label}`;return s.jsx(e.NavLink,{link:d,path:h,parentPath:l,openPath:U,togglePath:ve,updateTriangleIndicator:J,setOpenPath:x,renderLinks:R,buttonRefs:W},d._key??h)});return s.jsx("header",{ref:F,className:`${S??""} ${Se[j]} ${_e[C]} ${e.styles.navbar} ${w?e.styles.sticky:""} ${u&&u.length?e.styles.advanced:e.styles.default}`,role:"navigation","aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!t||t.length===0)&&j!=="center"?e.styles.twoColumn:""}`,children:[g?s.jsx("div",{className:e.styles.logo,children:g}):s.jsx("div",{className:e.styles.title,children:b}),s.jsx("nav",{ref:$,style:{left:j==="center"?`calc(50% - ${ie/2}px)`:"0"},className:`${e.styles.nav} ${y?e.styles.open:""} ${re?e.styles.visible:e.styles.hidden}`,id:"main-menu",role:"menubar","aria-label":"Main navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${de}px`},className:`${e.styles.triangle} ${U?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),f==="default"&&m&&s.jsxs("div",{className:e.styles.grid,children:[m&&m.length>0&&R(m),v&&!N&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(X,{})]}),!N&&f==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&je(u),v&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(X,{})]}),N&&f==="advanced"&&y&&o.length===0&&u&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:u.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>me(n),children:n.title})},n._key??l))}),N&&f==="advanced"&&y&&o.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{className:e.styles.back,onClick:o.length===1?be:fe,children:s.jsx(z.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),o[o.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:o[o.length-1].description&&(a==null?void 0:a(o[o.length-1].description))}),o[o.length-1].primary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>H(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,role:"menuitem",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(I.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`primary-${l}`)),o[o.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),o[o.length-1].secondary.map((n,l)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${E==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:n.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>H(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,role:"menuitem",children:[n.label,n.isExternal&&s.jsx(I.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},n._key??`secondary-${l}`))]},`stack-${o.length}`)]})}),t&&t.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(te.ButtonGroup,{children:t.map((n,l)=>s.jsx(z.CallToAction,{as:"a",href:n.href??"/",variant:n.variant??"primary",displayType:n.displayType??"text",imageSrc:n.imageSrc,imageAlt:n.imageAlt,"aria-label":n.ariaLabel??n.label,icon:n.icon,iconAlignment:n.iconAlignment,children:n.imageSrc?s.jsx("img",{src:n.imageSrc,alt:n.imageAlt??n.ariaLabel??n.label}):n.label},n._key||l))})}),t&&t.length>0&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${y?e.styles.open:""}`,children:s.jsx(te.ButtonGroup,{alignment:"center",children:s.jsx(z.CallToAction,{as:"a",href:t[1].href??"/",variant:t[1].variant??"primary",displayType:t[1].displayType??"text",imageSrc:t[1].imageSrc,imageAlt:t[1].imageAlt,"aria-label":t[1].ariaLabel??t[1].label,icon:t[1].icon,iconAlignment:t[1].iconAlignment,children:t[1].imageSrc?s.jsx("img",{src:t[1].imageSrc,"aria-label":t[1].imageAlt??t[1].ariaLabel??t[1].label}):t[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[N&&v&&s.jsx(B,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:xe,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,"aria-controls":"main-menu",children:y?s.jsx(ke.X,{size:24}):s.jsx(we,{size:24})})]})]})})}exports.Navbar=Ae;
|
|
@@ -3,7 +3,7 @@ import { useState as f, useEffect as U, useRef as I, useCallback as G } from "re
|
|
|
3
3
|
import { Modal as te } from "../Modal/index.mjs";
|
|
4
4
|
import { a as Le, C as X } from "../../../index-FuTQRxMN.js";
|
|
5
5
|
import { ButtonGroup as de } from "../ButtonGroup/index.mjs";
|
|
6
|
-
import { s as e, N as Me } from "../../../NavLink-
|
|
6
|
+
import { s as e, N as Me } from "../../../NavLink-Dk1p55ah.js";
|
|
7
7
|
import { E as V } from "../../../external-link-BOPobeQJ.js";
|
|
8
8
|
import { X as Ae } from "../../../x-CnsEH4Ox.js";
|
|
9
9
|
import { c as H } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
@@ -71,8 +71,8 @@ const Re = [
|
|
|
71
71
|
}
|
|
72
72
|
) }),
|
|
73
73
|
/* @__PURE__ */ c("div", { className: e.content, children: [
|
|
74
|
-
s.title && /* @__PURE__ */ a("div", { children: u == null ? void 0 : u(s.title) }),
|
|
75
|
-
s.description && /* @__PURE__ */ a("div", { children: u == null ? void 0 : u(s.description) })
|
|
74
|
+
s.title && /* @__PURE__ */ a("div", { className: e.title, children: u == null ? void 0 : u(s.title, e.title) }),
|
|
75
|
+
s.description && /* @__PURE__ */ a("div", { className: e.description, children: u == null ? void 0 : u(s.description, e.description) })
|
|
76
76
|
] }),
|
|
77
77
|
((h = s.callToAction) == null ? void 0 : h.linkOptions) && /* @__PURE__ */ a("div", { className: e.actions, children: /* @__PURE__ */ a(
|
|
78
78
|
X,
|
package/dist/core.d.ts
CHANGED
|
@@ -859,7 +859,7 @@ declare type MultiSelectProps = {
|
|
|
859
859
|
export declare function Navbar({ renderText, title, logo, items, groups, utilityItems, isSticky, showSearch, showLocaleSelect, alignment, variant, navigationType, searchComponent, localeSelectComponent, className, }: NavbarProps): JSX.Element;
|
|
860
860
|
|
|
861
861
|
declare type NavbarProps = {
|
|
862
|
-
renderText?: (content?: RichContent) => default_2.ReactNode;
|
|
862
|
+
renderText?: (content?: RichContent, className?: string) => default_2.ReactNode;
|
|
863
863
|
title?: string;
|
|
864
864
|
logo?: default_2.ReactNode;
|
|
865
865
|
items?: NavItem[];
|
package/dist/main.d.ts
CHANGED
|
@@ -1254,7 +1254,7 @@ declare type MultiSelectProps = {
|
|
|
1254
1254
|
export declare function Navbar({ renderText, title, logo, items, groups, utilityItems, isSticky, showSearch, showLocaleSelect, alignment, variant, navigationType, searchComponent, localeSelectComponent, className, }: NavbarProps): JSX.Element;
|
|
1255
1255
|
|
|
1256
1256
|
declare type NavbarProps = {
|
|
1257
|
-
renderText?: (content?: RichContent) => default_2.ReactNode;
|
|
1257
|
+
renderText?: (content?: RichContent, className?: string) => default_2.ReactNode;
|
|
1258
1258
|
title?: string;
|
|
1259
1259
|
logo?: default_2.ReactNode;
|
|
1260
1260
|
items?: NavItem[];
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require('./assets/NavLink.css');const o=require("react/jsx-runtime"),b=require("react"),p=require("./external-link-DDShu-48.cjs"),h=require("./chevron-down-DfK1XBl3.cjs"),k="_navbar_f1e8g_5",v="_sticky_f1e8g_19",I="_left_f1e8g_34",C="_container_f1e8g_35",M="_logo_f1e8g_39",w="_nav_f1e8g_5",y="_center_f1e8g_54",x="_hidden_f1e8g_60",N="_visible_f1e8g_67",T="_right_f1e8g_82",j="_title_f1e8g_89",S="_linkWrapper_f1e8g_99",W="_parent_f1e8g_99",$="_linkItem_f1e8g_107",D="_link_f1e8g_99",L="_search_f1e8g_109",E="_locale_f1e8g_110",F="_sublinkToggle_f1e8g_111",R="_standard_f1e8g_159",q="_triangle_f1e8g_167",B="_transparent_f1e8g_172",z="_utility_f1e8g_226",A="_menuToggle_f1e8g_246",G="_twoColumn_f1e8g_276",H="_mobileButtons_f1e8g_285",J="_utilityMobile_f1e8g_370",K="_navInner_f1e8g_398",Q="_grid_f1e8g_409",U="_searchModal_f1e8g_428",V="_localeModal_f1e8g_429",X="_separator_f1e8g_444",Y="_newTabIcon_f1e8g_474",Z="_sublinksDescription_f1e8g_486",O="_linkContent_f1e8g_489",P="_open_f1e8g_500",ee="_back_f1e8g_524",ne="_sublinks_f1e8g_486",oe="_show_f1e8g_571",te="_primaryColumn_f1e8g_612",se="_secondaryColumn_f1e8g_621",_e="_spotlightColumn_f1e8g_625",ie="_sublinksInner_f1e8g_629",le="_sublinksColumn_f1e8g_647",re="_chevron_f1e8g_657",ce="_advanced_f1e8g_839",ae="_subtitle_f1e8g_848",ge="_withSpotlight_f1e8g_890",ue="_withoutSpotlight_f1e8g_894",fe="_groupDivider_f1e8g_932",me="_searchWrapper_f1e8g_940",de="_mobileMenu_f1e8g_947",be="_mobileMenuSlide_f1e8g_948",pe="_mobileMenuItem_f1e8g_958",he="_fadeInFromLeft_f1e8g_962",ke="_fadeInFromRight_f1e8g_966",ve="_spotlight_f1e8g_625",Ie="_imageWrapper_f1e8g_976",Ce="_content_f1e8g_998",Me="_actions_f1e8g_1017",n={navbar:k,sticky:v,left:I,container:C,logo:M,nav:w,center:y,hidden:x,visible:N,right:T,title:j,linkWrapper:S,parent:W,linkItem:$,link:D,search:L,locale:E,sublinkToggle:F,standard:R,triangle:q,transparent:B,utility:z,menuToggle:A,twoColumn:G,mobileButtons:H,utilityMobile:J,navInner:K,grid:Q,searchModal:U,localeModal:V,separator:X,newTabIcon:Y,sublinksDescription:Z,linkContent:O,open:P,back:ee,sublinks:ne,show:oe,primaryColumn:te,secondaryColumn:se,spotlightColumn:_e,sublinksInner:ie,sublinksColumn:le,chevron:re,default:"_default_f1e8g_773",advanced:ce,subtitle:ae,withSpotlight:ge,withoutSpotlight:ue,groupDivider:fe,searchWrapper:me,mobileMenu:de,mobileMenuSlide:be,mobileMenuItem:pe,fadeInFromLeft:he,fadeInFromRight:ke,spotlight:ve,imageWrapper:Ie,content:Ce,actions:Me};function we({link:e,path:t,parentPath:l,openPath:u,togglePath:r,updateTriangleIndicator:f,setOpenPath:s,renderLinks:m,buttonRefs:d}){var a;const _=u===t,i=!!((a=e.sublinks)!=null&&a.length),c=b.useRef(null);return d.current.set(t,c.current),o.jsxs("div",{className:`${n.linkWrapper} ${l?"":n.parent}`,children:[o.jsx("div",{className:n.linkItem,children:e.href?o.jsxs("a",{href:e.href,className:n.link,target:e.isExternal?"_blank":"_self",rel:e.isExternal?"noopener noreferrer":void 0,onClick:()=>{var g;s(null),(g=e.onClick)==null||g.call(e)},onMouseEnter:()=>{l||s(null)},role:"menuitem",children:[e.label,e.isExternal&&o.jsx(p.ExternalLink,{className:n.newTabIcon,size:16})]}):o.jsxs("button",{ref:c,"aria-haspopup":i?"true":void 0,"aria-expanded":_,className:`${n.sublinkToggle} ${_?n.open:""}`,onClick:()=>r(t),onMouseEnter:()=>{f(t),s(t)},children:[e.label,i&&o.jsx(h.ChevronDown,{size:18,className:n.chevron})]})}),i&&o.jsx("div",{className:`${n.sublinks} ${_?n.show:""}`,onMouseLeave:()=>r(t),role:"menu","aria-label":`${e.label} submenu`,children:o.jsx("div",{children:o.jsx("div",{className:n.sublinksInner,children:o.jsx("div",{className:n.sublinksColumn,children:m(e.sublinks,t)})})})})]},t)}exports.NavLink=we;exports.styles=n;
|