quirk-ui 0.0.424 → 0.0.425
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-BCSzEhr3.cjs +1 -0
- package/dist/{NavLink-CfAA47R1.js → NavLink-DgPiB7YX.js} +31 -32
- 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 +1 -1
- package/dist/core/components/NavBar/index.mjs +1 -8
- package/dist/core.d.ts +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/next.d.ts +1 -1
- package/package.json +1 -1
- package/dist/NavLink-C5ZCMRQ6.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/NavLink.css');const e=require("react/jsx-runtime"),h=require("react"),k=require("./external-link-DDShu-48.cjs"),v=require("./chevron-down-DfK1XBl3.cjs"),g="_navbar_1bon6_5",f="_sticky_1bon6_19",C="_left_1bon6_34",w="_container_1bon6_35",I="_logo_1bon6_39",x="_nav_1bon6_5",y="_center_1bon6_54",N="_hidden_1bon6_60",j="_visible_1bon6_67",$="_right_1bon6_82",L="_title_1bon6_89",T="_linkWrapper_1bon6_99",S="_parent_1bon6_99",W="_linkItem_1bon6_107",E="_link_1bon6_99",q="_sublinkToggle_1bon6_111",D="_standard_1bon6_159",F="_triangle_1bon6_167",M="_transparent_1bon6_172",R="_twoColumn_1bon6_276",z="_navInner_1bon6_398",A="_grid_1bon6_409",B="_separator_1bon6_444",G="_newTabIcon_1bon6_474",H="_sublinksDescription_1bon6_486",J="_linkContent_1bon6_489",K="_open_1bon6_500",Q="_sublinks_1bon6_486",U="_show_1bon6_571",V="_primaryColumn_1bon6_612",X="_secondaryColumn_1bon6_621",Y="_sublinksInner_1bon6_629",Z="_sublinksColumn_1bon6_647",O="_chevron_1bon6_657",P="_advanced_1bon6_839",nn="_subtitle_1bon6_848",on="_withSpotlight_1bon6_890",en="_withoutSpotlight_1bon6_894",sn="_searchWrapper_1bon6_940",tn="_fadeInFromLeft_1bon6_962",o={navbar:g,sticky:f,left:C,container:w,logo:I,nav:x,center:y,hidden:N,visible:j,right:$,title:L,linkWrapper:T,parent:S,linkItem:W,link:E,sublinkToggle:q,standard:D,triangle:F,transparent:M,twoColumn:R,navInner:z,grid:A,separator:B,newTabIcon:G,sublinksDescription:H,linkContent:J,open:K,sublinks:Q,show:U,primaryColumn:V,secondaryColumn:X,sublinksInner:Y,sublinksColumn:Z,chevron:O,default:"_default_1bon6_773",advanced:P,subtitle:nn,withSpotlight:on,withoutSpotlight:en,searchWrapper:sn,fadeInFromLeft:tn};function rn({link:n,path:s,parentPath:i,openPath:u,togglePath:l,updateTriangleIndicator:d,setOpenPath:t,renderLinks:m,buttonRefs:p}){var a;const r=u===s,_=!!((a=n.sublinks)!=null&&a.length),c=h.useRef(null);return p.current.set(s,c.current),e.jsxs("div",{className:`${o.linkWrapper} ${i?"":o.parent}`,children:[e.jsx("div",{className:o.linkItem,children:n.href?e.jsxs("a",{href:n.href,className:o.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,onClick:()=>{var b;t(null),(b=n.onClick)==null||b.call(n)},onMouseEnter:()=>{i||t(null)},role:"menuitem",children:[n.label,n.isExternal&&e.jsx(k.ExternalLink,{className:o.newTabIcon,size:16})]}):e.jsxs("button",{ref:c,"aria-haspopup":_?"true":void 0,"aria-expanded":r,className:`${o.sublinkToggle} ${r?o.open:""}`,onClick:()=>l(s),onMouseEnter:()=>{d(s),t(s)},children:[n.label,_&&e.jsx(v.ChevronDown,{size:18,className:o.chevron})]})}),_&&e.jsx("div",{className:`${o.sublinks} ${r?o.show:""}`,onMouseLeave:()=>l(s),role:"menu","aria-label":`${n.label} submenu`,children:e.jsx("div",{children:e.jsx("div",{className:o.sublinksInner,children:e.jsx("div",{className:o.sublinksColumn,children:m(n.sublinks,s)})})})})]},s)}exports.NavLink=rn;exports.styles=o;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as k } from "react";
|
|
3
3
|
import { E as v } from "./external-link-BOPobeQJ.js";
|
|
4
4
|
import { C as g } from "./chevron-down-DSUzBz9F.js";
|
|
5
|
-
import './assets/NavLink.css';const f = "_navbar_1bon6_5", C = "_sticky_1bon6_19", w = "_left_1bon6_34", I = "_container_1bon6_35", N = "_logo_1bon6_39", y = "_nav_1bon6_5", x = "_center_1bon6_54", T = "_hidden_1bon6_60", E = "_visible_1bon6_67", S = "_right_1bon6_82", W = "_title_1bon6_89", $ = "_linkWrapper_1bon6_99", L = "_parent_1bon6_99", D = "_linkItem_1bon6_107", F = "_link_1bon6_99", M = "_sublinkToggle_1bon6_111", j = "_standard_1bon6_159", z = "_triangle_1bon6_167", R = "_transparent_1bon6_172", q = "_twoColumn_1bon6_276", A = "_navInner_1bon6_398", B = "_grid_1bon6_409", G = "_separator_1bon6_444", H = "_newTabIcon_1bon6_474", J = "_sublinksDescription_1bon6_486", K = "_linkContent_1bon6_489", Q = "_open_1bon6_500", U = "_sublinks_1bon6_486", V = "_show_1bon6_571", X = "_primaryColumn_1bon6_612", Y = "_secondaryColumn_1bon6_621", Z = "
|
|
5
|
+
import './assets/NavLink.css';const f = "_navbar_1bon6_5", C = "_sticky_1bon6_19", w = "_left_1bon6_34", I = "_container_1bon6_35", N = "_logo_1bon6_39", y = "_nav_1bon6_5", x = "_center_1bon6_54", T = "_hidden_1bon6_60", E = "_visible_1bon6_67", S = "_right_1bon6_82", W = "_title_1bon6_89", $ = "_linkWrapper_1bon6_99", L = "_parent_1bon6_99", D = "_linkItem_1bon6_107", F = "_link_1bon6_99", M = "_sublinkToggle_1bon6_111", j = "_standard_1bon6_159", z = "_triangle_1bon6_167", R = "_transparent_1bon6_172", q = "_twoColumn_1bon6_276", A = "_navInner_1bon6_398", B = "_grid_1bon6_409", G = "_separator_1bon6_444", H = "_newTabIcon_1bon6_474", J = "_sublinksDescription_1bon6_486", K = "_linkContent_1bon6_489", Q = "_open_1bon6_500", U = "_sublinks_1bon6_486", V = "_show_1bon6_571", X = "_primaryColumn_1bon6_612", Y = "_secondaryColumn_1bon6_621", Z = "_sublinksInner_1bon6_629", O = "_sublinksColumn_1bon6_647", P = "_chevron_1bon6_657", nn = "_advanced_1bon6_839", on = "_subtitle_1bon6_848", en = "_withSpotlight_1bon6_890", sn = "_withoutSpotlight_1bon6_894", tn = "_searchWrapper_1bon6_940", rn = "_fadeInFromLeft_1bon6_962", o = {
|
|
6
6
|
navbar: f,
|
|
7
7
|
sticky: C,
|
|
8
8
|
left: w,
|
|
@@ -34,22 +34,21 @@ import './assets/NavLink.css';const f = "_navbar_1bon6_5", C = "_sticky_1bon6_19
|
|
|
34
34
|
show: V,
|
|
35
35
|
primaryColumn: X,
|
|
36
36
|
secondaryColumn: Y,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
chevron: nn,
|
|
37
|
+
sublinksInner: Z,
|
|
38
|
+
sublinksColumn: O,
|
|
39
|
+
chevron: P,
|
|
41
40
|
default: "_default_1bon6_773",
|
|
42
|
-
advanced:
|
|
43
|
-
subtitle:
|
|
41
|
+
advanced: nn,
|
|
42
|
+
subtitle: on,
|
|
44
43
|
withSpotlight: en,
|
|
45
|
-
withoutSpotlight:
|
|
46
|
-
searchWrapper:
|
|
44
|
+
withoutSpotlight: sn,
|
|
45
|
+
searchWrapper: tn,
|
|
47
46
|
fadeInFromLeft: rn
|
|
48
47
|
};
|
|
49
|
-
function
|
|
48
|
+
function bn({
|
|
50
49
|
link: n,
|
|
51
|
-
path:
|
|
52
|
-
parentPath:
|
|
50
|
+
path: e,
|
|
51
|
+
parentPath: l,
|
|
53
52
|
openPath: d,
|
|
54
53
|
togglePath: a,
|
|
55
54
|
updateTriangleIndicator: m,
|
|
@@ -58,13 +57,13 @@ function un({
|
|
|
58
57
|
buttonRefs: h
|
|
59
58
|
}) {
|
|
60
59
|
var b;
|
|
61
|
-
const
|
|
62
|
-
return h.current.set(
|
|
60
|
+
const r = d === e, _ = !!((b = n.sublinks) != null && b.length), c = k(null);
|
|
61
|
+
return h.current.set(e, c.current), /* @__PURE__ */ i(
|
|
63
62
|
"div",
|
|
64
63
|
{
|
|
65
|
-
className: `${o.linkWrapper} ${
|
|
64
|
+
className: `${o.linkWrapper} ${l ? "" : o.parent}`,
|
|
66
65
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ s("div", { className: o.linkItem, children: n.href ? /* @__PURE__ */ i(
|
|
68
67
|
"a",
|
|
69
68
|
{
|
|
70
69
|
href: n.href,
|
|
@@ -76,47 +75,47 @@ function un({
|
|
|
76
75
|
t(null), (u = n.onClick) == null || u.call(n);
|
|
77
76
|
},
|
|
78
77
|
onMouseEnter: () => {
|
|
79
|
-
|
|
78
|
+
l || t(null);
|
|
80
79
|
},
|
|
81
80
|
role: "menuitem",
|
|
82
81
|
children: [
|
|
83
82
|
n.label,
|
|
84
|
-
n.isExternal && /* @__PURE__ */
|
|
83
|
+
n.isExternal && /* @__PURE__ */ s(v, { className: o.newTabIcon, size: 16 })
|
|
85
84
|
]
|
|
86
85
|
}
|
|
87
|
-
) : /* @__PURE__ */
|
|
86
|
+
) : /* @__PURE__ */ i(
|
|
88
87
|
"button",
|
|
89
88
|
{
|
|
90
89
|
ref: c,
|
|
91
|
-
"aria-haspopup":
|
|
92
|
-
"aria-expanded":
|
|
93
|
-
className: `${o.sublinkToggle} ${
|
|
94
|
-
onClick: () => a(
|
|
90
|
+
"aria-haspopup": _ ? "true" : void 0,
|
|
91
|
+
"aria-expanded": r,
|
|
92
|
+
className: `${o.sublinkToggle} ${r ? o.open : ""}`,
|
|
93
|
+
onClick: () => a(e),
|
|
95
94
|
onMouseEnter: () => {
|
|
96
|
-
m(
|
|
95
|
+
m(e), t(e);
|
|
97
96
|
},
|
|
98
97
|
children: [
|
|
99
98
|
n.label,
|
|
100
|
-
|
|
99
|
+
_ && /* @__PURE__ */ s(g, { size: 18, className: o.chevron })
|
|
101
100
|
]
|
|
102
101
|
}
|
|
103
102
|
) }),
|
|
104
|
-
|
|
103
|
+
_ && /* @__PURE__ */ s(
|
|
105
104
|
"div",
|
|
106
105
|
{
|
|
107
|
-
className: `${o.sublinks} ${
|
|
108
|
-
onMouseLeave: () => a(
|
|
106
|
+
className: `${o.sublinks} ${r ? o.show : ""}`,
|
|
107
|
+
onMouseLeave: () => a(e),
|
|
109
108
|
role: "menu",
|
|
110
109
|
"aria-label": `${n.label} submenu`,
|
|
111
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("div", { className: o.sublinksInner, children: /* @__PURE__ */ s("div", { className: o.sublinksColumn, children: p(n.sublinks, e) }) }) })
|
|
112
111
|
}
|
|
113
112
|
)
|
|
114
113
|
]
|
|
115
114
|
},
|
|
116
|
-
|
|
115
|
+
e
|
|
117
116
|
);
|
|
118
117
|
}
|
|
119
118
|
export {
|
|
120
|
-
|
|
119
|
+
bn as N,
|
|
121
120
|
o as s
|
|
122
121
|
};
|
|
@@ -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-BCSzEhr3.cjs");require("../../../external-link-DDShu-48.cjs");require("../../../chevron-down-DfK1XBl3.cjs");exports.NavLink=e.NavLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),e=require("../../../NavLink-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),e=require("../../../NavLink-BCSzEhr3.cjs"),te=require("../../../chevron-down-DfK1XBl3.cjs"),le=require("../../../external-link-DDShu-48.cjs"),ae={standard:e.styles.standard,transparent:e.styles.transparent},ie={left:e.styles.left,center:e.styles.center,right:e.styles.right};function re({title:G,logo:k,items:h,groups:u,utilityItems:w,isSticky:X=!1,showSearch:g=!0,showLocaleSelect:C=!0,alignment:$="right",variant:V="standard",navigationType:E="default",className:A}){const[H,J]=i.useState(0),[L,o]=i.useState(null),[x,K]=i.useState(!1),[R,Q]=i.useState(!1),[U,Y]=i.useState(!1),[Z,P]=i.useState(null),[f,m]=i.useState(0),[ee,M]=i.useState(null),j=i.useRef(null),y=i.useRef(null),N=i.useRef(new Map),S=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem})}),W=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem})}),p=t=>{const n=N.current.get(t);if(n&&y.current){const r=n.getBoundingClientRect(),c=y.current.getBoundingClientRect(),a=r.left-c.left+r.width/2;P(a)}};console.log(p);const se=t=>{o(n=>n===t?null:t)},ne=t=>t.map((n,r)=>{var B,q,O,T,D;const c=`group-${r}`,b=ee===r,a=(B=n.primaryItems)==null?void 0:B[f??0];return console.log(a),s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{M(r),o(c),p(c)},onMouseLeave:()=>{M(null),m(0),o(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:l=>{N.current.set(c,l)},role:"menuitem","aria-haspopup":"true","aria-expanded":b,"aria-controls":`submenu-${r}`,className:`${e.styles.sublinkToggle} ${b?e.styles.open:""} `,children:[n.title,s.jsx(te.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${r}`,className:`${e.styles.sublinks} ${b?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,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}),(q=n.primaryItems)==null?void 0:q.map((l,d)=>l.href?s.jsxs("a",{href:l.href,className:`${e.styles.link} ${f===d?e.styles.open:""}`,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,onClick:()=>{var F;o(null),(F=l.onClick)==null||F.call(l)},onMouseEnter:()=>l.sublinks?m(d):null,role:"menuitem",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(le.ExternalLink,{className:e.styles.newTabIcon,size:16})]},l._key??d):s.jsx("button",{className:`${e.styles.sublinkToggle} ${f===d?e.styles.open:""}`,onMouseEnter:()=>m(d),children:s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]})},l._key??d))]}),(a==null?void 0:a.sublinks)&&((O=a==null?void 0:a.sublinks)==null?void 0:O.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(a==null?void 0:a.description)&&s.jsx("div",{className:e.styles.sublinksDescription}),v(a.sublinks,`${c}-${f}`)]},`${a.label}-${(T=a==null?void 0:a.sublinks)==null?void 0:T.length}`),(n==null?void 0:n.secondaryItems)&&((D=n==null?void 0:n.secondaryItems)==null?void 0:D.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:v(n.secondaryItems,`${c}-secondary`)})]})})})]},n._key??`group-${r}`)}),v=(t,n="")=>t.map(r=>{const c=`${n}/${r.label}`;return s.jsx(e.NavLink,{link:r,path:c,parentPath:n,openPath:L,togglePath:se,updateTriangleIndicator:p,setOpenPath:o,renderLinks:v,buttonRefs:N},r._key??c)}),_=i.useCallback(t=>{j.current&&!j.current.contains(t.target)&&o(null)},[]),z=i.useCallback(()=>{I(),typeof window<"u"&&window.innerWidth>768&&(K(!1),o(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),I=i.useCallback(()=>{if(y.current){const t=y.current.getBoundingClientRect().width;J(t),Y(!0)}},[]);return i.useEffect(()=>{const t=typeof window<"u",n=typeof document<"u";return t&&window.addEventListener("resize",z),n&&document.addEventListener("click",_),I(),()=>{t&&window.removeEventListener("resize",z),n&&document.removeEventListener("click",_)}},[]),i.useEffect(()=>{if(typeof window<"u"){const t=()=>{const n=window.innerWidth<768;Q(n)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}},[]),i.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=x?"hidden":"",()=>{document.body.style.overflow=""}},[x]),s.jsx("header",{ref:j,className:`${A??""} ${ie[$]} ${ae[V]} ${e.styles.navbar} ${X?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} ${(!w||w.length===0)&&$!=="center"?e.styles.twoColumn:""}`,children:[k?s.jsx("div",{className:e.styles.logo,children:k}):s.jsx("div",{className:e.styles.title,children:G}),s.jsx("nav",{ref:y,style:{left:$==="center"?`calc(50% - ${H/2}px)`:"0"},className:`${e.styles.nav} ${x?e.styles.open:""} ${U?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:`${Z}px`},className:`${e.styles.triangle} ${L?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"})}),E==="default"&&h&&s.jsxs("div",{className:e.styles.grid,children:[h&&h.length>0&&v(h),g&&!R&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(S,{})]}),C&&s.jsx(W,{})]}),!R&&E==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&ne(u),g&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(S,{})]}),C&&s.jsx(W,{})]})]})})]})})}exports.Navbar=re;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n, jsxs as i, Fragment as q } from "react/jsx-runtime";
|
|
2
2
|
import { useState as c, useRef as C, useCallback as E, useEffect as L } from "react";
|
|
3
|
-
import { s as e, N as re } from "../../../NavLink-
|
|
3
|
+
import { s as e, N as re } from "../../../NavLink-DgPiB7YX.js";
|
|
4
4
|
import { C as ce } from "../../../chevron-down-DSUzBz9F.js";
|
|
5
5
|
import { E as de } from "../../../external-link-BOPobeQJ.js";
|
|
6
6
|
const ue = {
|
|
@@ -159,13 +159,6 @@ function pe({
|
|
|
159
159
|
className: `${e.sublinksColumn} ${e.secondaryColumn}`,
|
|
160
160
|
children: $(s.secondaryItems, `${r}-secondary`)
|
|
161
161
|
}
|
|
162
|
-
),
|
|
163
|
-
s.spotlight && /* @__PURE__ */ n(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
className: `${e.sublinksColumn} ${e.spotlightColumn}`,
|
|
167
|
-
children: s.spotlight
|
|
168
|
-
}
|
|
169
162
|
)
|
|
170
163
|
]
|
|
171
164
|
}
|
package/dist/core.d.ts
CHANGED
package/dist/main.d.ts
CHANGED
package/dist/next.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require('./assets/NavLink.css');const s=require("react/jsx-runtime"),h=require("react"),k=require("./external-link-DDShu-48.cjs"),v=require("./chevron-down-DfK1XBl3.cjs"),g="_navbar_1bon6_5",C="_sticky_1bon6_19",f="_left_1bon6_34",w="_container_1bon6_35",I="_logo_1bon6_39",x="_nav_1bon6_5",y="_center_1bon6_54",N="_hidden_1bon6_60",j="_visible_1bon6_67",$="_right_1bon6_82",L="_title_1bon6_89",T="_linkWrapper_1bon6_99",S="_parent_1bon6_99",W="_linkItem_1bon6_107",E="_link_1bon6_99",q="_sublinkToggle_1bon6_111",D="_standard_1bon6_159",F="_triangle_1bon6_167",M="_transparent_1bon6_172",R="_twoColumn_1bon6_276",z="_navInner_1bon6_398",A="_grid_1bon6_409",B="_separator_1bon6_444",G="_newTabIcon_1bon6_474",H="_sublinksDescription_1bon6_486",J="_linkContent_1bon6_489",K="_open_1bon6_500",Q="_sublinks_1bon6_486",U="_show_1bon6_571",V="_primaryColumn_1bon6_612",X="_secondaryColumn_1bon6_621",Y="_spotlightColumn_1bon6_625",Z="_sublinksInner_1bon6_629",O="_sublinksColumn_1bon6_647",P="_chevron_1bon6_657",nn="_advanced_1bon6_839",on="_subtitle_1bon6_848",sn="_withSpotlight_1bon6_890",en="_withoutSpotlight_1bon6_894",tn="_searchWrapper_1bon6_940",rn="_fadeInFromLeft_1bon6_962",o={navbar:g,sticky:C,left:f,container:w,logo:I,nav:x,center:y,hidden:N,visible:j,right:$,title:L,linkWrapper:T,parent:S,linkItem:W,link:E,sublinkToggle:q,standard:D,triangle:F,transparent:M,twoColumn:R,navInner:z,grid:A,separator:B,newTabIcon:G,sublinksDescription:H,linkContent:J,open:K,sublinks:Q,show:U,primaryColumn:V,secondaryColumn:X,spotlightColumn:Y,sublinksInner:Z,sublinksColumn:O,chevron:P,default:"_default_1bon6_773",advanced:nn,subtitle:on,withSpotlight:sn,withoutSpotlight:en,searchWrapper:tn,fadeInFromLeft:rn};function _n({link:n,path:e,parentPath:i,openPath:u,togglePath:l,updateTriangleIndicator:d,setOpenPath:t,renderLinks:m,buttonRefs:p}){var a;const r=u===e,_=!!((a=n.sublinks)!=null&&a.length),c=h.useRef(null);return p.current.set(e,c.current),s.jsxs("div",{className:`${o.linkWrapper} ${i?"":o.parent}`,children:[s.jsx("div",{className:o.linkItem,children:n.href?s.jsxs("a",{href:n.href,className:o.link,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,onClick:()=>{var b;t(null),(b=n.onClick)==null||b.call(n)},onMouseEnter:()=>{i||t(null)},role:"menuitem",children:[n.label,n.isExternal&&s.jsx(k.ExternalLink,{className:o.newTabIcon,size:16})]}):s.jsxs("button",{ref:c,"aria-haspopup":_?"true":void 0,"aria-expanded":r,className:`${o.sublinkToggle} ${r?o.open:""}`,onClick:()=>l(e),onMouseEnter:()=>{d(e),t(e)},children:[n.label,_&&s.jsx(v.ChevronDown,{size:18,className:o.chevron})]})}),_&&s.jsx("div",{className:`${o.sublinks} ${r?o.show:""}`,onMouseLeave:()=>l(e),role:"menu","aria-label":`${n.label} submenu`,children:s.jsx("div",{children:s.jsx("div",{className:o.sublinksInner,children:s.jsx("div",{className:o.sublinksColumn,children:m(n.sublinks,e)})})})})]},e)}exports.NavLink=_n;exports.styles=o;
|