quirk-ui 0.0.421 → 0.0.422
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-C5ZCMRQ6.cjs +1 -0
- package/dist/NavLink-CfAA47R1.js +122 -0
- 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 +130 -113
- 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-3G_M0Xmt.js +0 -119
- package/dist/NavLink-DSn6ti8O.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as k } from "react";
|
|
3
|
+
import { E as v } from "./external-link-BOPobeQJ.js";
|
|
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 = "_spotlightColumn_1bon6_625", O = "_sublinksInner_1bon6_629", P = "_sublinksColumn_1bon6_647", nn = "_chevron_1bon6_657", on = "_advanced_1bon6_839", sn = "_subtitle_1bon6_848", en = "_withSpotlight_1bon6_890", tn = "_withoutSpotlight_1bon6_894", _n = "_searchWrapper_1bon6_940", rn = "_fadeInFromLeft_1bon6_962", o = {
|
|
6
|
+
navbar: f,
|
|
7
|
+
sticky: C,
|
|
8
|
+
left: w,
|
|
9
|
+
container: I,
|
|
10
|
+
logo: N,
|
|
11
|
+
nav: y,
|
|
12
|
+
center: x,
|
|
13
|
+
hidden: T,
|
|
14
|
+
visible: E,
|
|
15
|
+
right: S,
|
|
16
|
+
title: W,
|
|
17
|
+
linkWrapper: $,
|
|
18
|
+
parent: L,
|
|
19
|
+
linkItem: D,
|
|
20
|
+
link: F,
|
|
21
|
+
sublinkToggle: M,
|
|
22
|
+
standard: j,
|
|
23
|
+
triangle: z,
|
|
24
|
+
transparent: R,
|
|
25
|
+
twoColumn: q,
|
|
26
|
+
navInner: A,
|
|
27
|
+
grid: B,
|
|
28
|
+
separator: G,
|
|
29
|
+
newTabIcon: H,
|
|
30
|
+
sublinksDescription: J,
|
|
31
|
+
linkContent: K,
|
|
32
|
+
open: Q,
|
|
33
|
+
sublinks: U,
|
|
34
|
+
show: V,
|
|
35
|
+
primaryColumn: X,
|
|
36
|
+
secondaryColumn: Y,
|
|
37
|
+
spotlightColumn: Z,
|
|
38
|
+
sublinksInner: O,
|
|
39
|
+
sublinksColumn: P,
|
|
40
|
+
chevron: nn,
|
|
41
|
+
default: "_default_1bon6_773",
|
|
42
|
+
advanced: on,
|
|
43
|
+
subtitle: sn,
|
|
44
|
+
withSpotlight: en,
|
|
45
|
+
withoutSpotlight: tn,
|
|
46
|
+
searchWrapper: _n,
|
|
47
|
+
fadeInFromLeft: rn
|
|
48
|
+
};
|
|
49
|
+
function un({
|
|
50
|
+
link: n,
|
|
51
|
+
path: s,
|
|
52
|
+
parentPath: i,
|
|
53
|
+
openPath: d,
|
|
54
|
+
togglePath: a,
|
|
55
|
+
updateTriangleIndicator: m,
|
|
56
|
+
setOpenPath: t,
|
|
57
|
+
renderLinks: p,
|
|
58
|
+
buttonRefs: h
|
|
59
|
+
}) {
|
|
60
|
+
var b;
|
|
61
|
+
const _ = d === s, r = !!((b = n.sublinks) != null && b.length), c = k(null);
|
|
62
|
+
return h.current.set(s, c.current), /* @__PURE__ */ l(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: `${o.linkWrapper} ${i ? "" : o.parent}`,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ e("div", { className: o.linkItem, children: n.href ? /* @__PURE__ */ l(
|
|
68
|
+
"a",
|
|
69
|
+
{
|
|
70
|
+
href: n.href,
|
|
71
|
+
className: o.link,
|
|
72
|
+
target: n.isExternal ? "_blank" : "_self",
|
|
73
|
+
rel: n.isExternal ? "noopener noreferrer" : void 0,
|
|
74
|
+
onClick: () => {
|
|
75
|
+
var u;
|
|
76
|
+
t(null), (u = n.onClick) == null || u.call(n);
|
|
77
|
+
},
|
|
78
|
+
onMouseEnter: () => {
|
|
79
|
+
i || t(null);
|
|
80
|
+
},
|
|
81
|
+
role: "menuitem",
|
|
82
|
+
children: [
|
|
83
|
+
n.label,
|
|
84
|
+
n.isExternal && /* @__PURE__ */ e(v, { className: o.newTabIcon, size: 16 })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
) : /* @__PURE__ */ l(
|
|
88
|
+
"button",
|
|
89
|
+
{
|
|
90
|
+
ref: c,
|
|
91
|
+
"aria-haspopup": r ? "true" : void 0,
|
|
92
|
+
"aria-expanded": _,
|
|
93
|
+
className: `${o.sublinkToggle} ${_ ? o.open : ""}`,
|
|
94
|
+
onClick: () => a(s),
|
|
95
|
+
onMouseEnter: () => {
|
|
96
|
+
m(s), t(s);
|
|
97
|
+
},
|
|
98
|
+
children: [
|
|
99
|
+
n.label,
|
|
100
|
+
r && /* @__PURE__ */ e(g, { size: 18, className: o.chevron })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
) }),
|
|
104
|
+
r && /* @__PURE__ */ e(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: `${o.sublinks} ${_ ? o.show : ""}`,
|
|
108
|
+
onMouseLeave: () => a(s),
|
|
109
|
+
role: "menu",
|
|
110
|
+
"aria-label": `${n.label} submenu`,
|
|
111
|
+
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: o.sublinksInner, children: /* @__PURE__ */ e("div", { className: o.sublinksColumn, children: p(n.sublinks, s) }) }) })
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
s
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
un as N,
|
|
121
|
+
o as s
|
|
122
|
+
};
|
|
@@ -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-C5ZCMRQ6.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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),e=require("../../../NavLink-C5ZCMRQ6.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 oe({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,r]=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),p=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})}),N=l=>{const n=p.current.get(l);if(n&&y.current){const o=n.getBoundingClientRect(),c=y.current.getBoundingClientRect(),t=o.left-c.left+o.width/2;P(t)}};console.log(N);const se=l=>{r(n=>n===l?null:l)},ne=l=>l.map((n,o)=>{var q,I,O,T,D;const c=`group-${o}`,b=ee===o,t=(q=n.primaryItems)==null?void 0:q[f??0];return console.log(t),s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{M(o),r(c),N(c)},onMouseLeave:()=>{M(null),m(0),r(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:a=>{p.current.set(c,a)},role:"menuitem","aria-haspopup":"true","aria-expanded":b,"aria-controls":`submenu-${o}`,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-${o}`,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}),(I=n.primaryItems)==null?void 0:I.map((a,d)=>a.href?s.jsxs("a",{href:a.href,className:`${e.styles.link} ${f===d?e.styles.open:""}`,target:a.isExternal?"_blank":"_self",rel:a.isExternal?"noopener noreferrer":void 0,onClick:()=>{var F;r(null),(F=a.onClick)==null||F.call(a)},onMouseEnter:()=>a.sublinks?m(d):null,role:"menuitem",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(le.ExternalLink,{className:e.styles.newTabIcon,size:16})]},a._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:[a.label,a.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:a.subtitle})]})},a._key??d))]}),(t==null?void 0:t.sublinks)&&((O=t==null?void 0:t.sublinks)==null?void 0:O.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(t==null?void 0:t.description)&&s.jsx("div",{className:e.styles.sublinksDescription,children:t==null?void 0:t.description}),v(t.sublinks,`${c}-${f}`)]},`${t.label}-${(T=t==null?void 0:t.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.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:n.spotlight})]})})})]},n._key??`group-${o}`)}),v=(l,n="")=>l.map(o=>{const c=`${n}/${o.label}`;return s.jsx(e.NavLink,{link:o,path:c,parentPath:n,openPath:L,togglePath:se,updateTriangleIndicator:N,setOpenPath:r,renderLinks:v,buttonRefs:p},o._key??c)}),_=i.useCallback(l=>{j.current&&!j.current.contains(l.target)&&r(null)},[]),z=i.useCallback(()=>{B(),typeof window<"u"&&window.innerWidth>768&&(K(!1),r(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),B=i.useCallback(()=>{if(y.current){const l=y.current.getBoundingClientRect().width;J(l),Y(!0)}},[]);return i.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",z),n&&document.addEventListener("click",_),B(),()=>{l&&window.removeEventListener("resize",z),n&&document.removeEventListener("click",_)}},[]),i.useEffect(()=>{if(typeof window<"u"){const l=()=>{const n=window.innerWidth<768;Q(n)};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}},[]),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=oe;
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { s as e, N as
|
|
4
|
-
import { C as
|
|
5
|
-
import { E as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as n, jsxs as i, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r, useRef as C, useCallback as E, useEffect as L } from "react";
|
|
3
|
+
import { s as e, N as ce } from "../../../NavLink-CfAA47R1.js";
|
|
4
|
+
import { C as re } from "../../../chevron-down-DSUzBz9F.js";
|
|
5
|
+
import { E as de } from "../../../external-link-BOPobeQJ.js";
|
|
6
|
+
const ue = {
|
|
7
7
|
standard: e.standard,
|
|
8
8
|
transparent: e.transparent
|
|
9
|
-
},
|
|
9
|
+
}, he = {
|
|
10
10
|
left: e.left,
|
|
11
11
|
center: e.center,
|
|
12
12
|
right: e.right
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
title:
|
|
14
|
+
function pe({
|
|
15
|
+
title: J,
|
|
16
16
|
logo: M,
|
|
17
17
|
items: v,
|
|
18
18
|
groups: h,
|
|
19
19
|
utilityItems: x,
|
|
20
|
-
isSticky:
|
|
20
|
+
isSticky: K = !1,
|
|
21
21
|
showSearch: R = !0,
|
|
22
22
|
showLocaleSelect: W = !0,
|
|
23
|
-
alignment:
|
|
24
|
-
variant:
|
|
23
|
+
alignment: p = "right",
|
|
24
|
+
variant: Q = "standard",
|
|
25
25
|
navigationType: z = "default",
|
|
26
26
|
// searchComponent,
|
|
27
27
|
// localeSelectComponent,
|
|
28
|
-
className:
|
|
28
|
+
className: U
|
|
29
29
|
}) {
|
|
30
|
-
const [
|
|
30
|
+
const [Y, Z] = r(0), [B, d] = r(null), [N, P] = r(!1), [I, ee] = r(!1), [ne, se] = r(!1), [te, le] = r(null), [m, w] = r(
|
|
31
31
|
0
|
|
32
|
-
), [
|
|
32
|
+
), [ae, _] = r(null), k = C(null), f = C(null), g = C(/* @__PURE__ */ new Map()), O = () => /* @__PURE__ */ n(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
className: `${e.linkWrapper} ${e.parent} ${e.searchWrapper}`,
|
|
36
36
|
children: /* @__PURE__ */ n("div", { className: e.linkItem })
|
|
37
37
|
}
|
|
38
|
-
), T = () => /* @__PURE__ */ n("div", { className: `${e.linkWrapper} ${e.parent} `, children: /* @__PURE__ */ n("div", { className: e.linkItem }) }),
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
|
|
38
|
+
), T = () => /* @__PURE__ */ n("div", { className: `${e.linkWrapper} ${e.parent} `, children: /* @__PURE__ */ n("div", { className: e.linkItem }) }), y = (l) => {
|
|
39
|
+
const s = g.current.get(l);
|
|
40
|
+
if (s && f.current) {
|
|
41
|
+
const o = s.getBoundingClientRect(), c = f.current.getBoundingClientRect(), t = o.left - c.left + o.width / 2;
|
|
42
|
+
le(t);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
console.log(
|
|
46
|
-
const
|
|
47
|
-
d((
|
|
48
|
-
},
|
|
49
|
-
var
|
|
50
|
-
const
|
|
51
|
-
return console.log(
|
|
45
|
+
console.log(y);
|
|
46
|
+
const ie = (l) => {
|
|
47
|
+
d((s) => s === l ? null : l);
|
|
48
|
+
}, oe = (l) => l.map((s, o) => {
|
|
49
|
+
var X, F, S, V, A;
|
|
50
|
+
const c = `group-${o}`, b = ae === o, t = (X = s.primaryItems) == null ? void 0 : X[m ?? 0];
|
|
51
|
+
return console.log(t), /* @__PURE__ */ i(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
className: `${e.linkWrapper} ${e.parent}`,
|
|
55
55
|
onMouseEnter: () => {
|
|
56
|
-
_(
|
|
56
|
+
_(o), d(c), y(c);
|
|
57
57
|
},
|
|
58
58
|
onMouseLeave: () => {
|
|
59
59
|
_(null), w(0), d(null);
|
|
60
60
|
},
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */ n("div", { className: e.linkItem, children: /* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ n("div", { className: e.linkItem, children: /* @__PURE__ */ i(
|
|
63
63
|
"button",
|
|
64
64
|
{
|
|
65
|
-
ref: (
|
|
66
|
-
|
|
65
|
+
ref: (a) => {
|
|
66
|
+
g.current.set(c, a);
|
|
67
67
|
},
|
|
68
68
|
role: "menuitem",
|
|
69
69
|
"aria-haspopup": "true",
|
|
70
|
-
"aria-expanded":
|
|
71
|
-
"aria-controls": `submenu-${
|
|
72
|
-
className: `${e.sublinkToggle} ${
|
|
70
|
+
"aria-expanded": b,
|
|
71
|
+
"aria-controls": `submenu-${o}`,
|
|
72
|
+
className: `${e.sublinkToggle} ${b ? e.open : ""} `,
|
|
73
73
|
children: [
|
|
74
|
-
|
|
75
|
-
/* @__PURE__ */ n(
|
|
74
|
+
s.title,
|
|
75
|
+
/* @__PURE__ */ n(re, { size: 18, className: e.chevron })
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
) }),
|
|
79
79
|
/* @__PURE__ */ n(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
|
-
id: `submenu-${
|
|
83
|
-
className: `${e.sublinks} ${
|
|
82
|
+
id: `submenu-${o}`,
|
|
83
|
+
className: `${e.sublinks} ${b ? e.show : ""}`,
|
|
84
84
|
role: "menu",
|
|
85
|
-
"aria-label": `${
|
|
86
|
-
children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */
|
|
85
|
+
"aria-label": `${s.title} submenu`,
|
|
86
|
+
children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ i(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
|
-
className: `${e.sublinksInner} ${
|
|
89
|
+
className: `${e.sublinksInner} ${s.spotlight ? e.withSpotlight : e.withoutSpotlight}`,
|
|
90
90
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ i(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
94
|
className: `${e.sublinksColumn} ${e.primaryColumn}`,
|
|
95
95
|
children: [
|
|
96
96
|
/* @__PURE__ */ n("div", { className: e.linkItem }),
|
|
97
|
-
(F =
|
|
98
|
-
(
|
|
97
|
+
(F = s.primaryItems) == null ? void 0 : F.map(
|
|
98
|
+
(a, u) => a.href ? /* @__PURE__ */ i(
|
|
99
99
|
"a",
|
|
100
100
|
{
|
|
101
|
-
href:
|
|
102
|
-
className: `${e.link} ${
|
|
103
|
-
target:
|
|
104
|
-
rel:
|
|
101
|
+
href: a.href,
|
|
102
|
+
className: `${e.link} ${m === u ? e.open : ""}`,
|
|
103
|
+
target: a.isExternal ? "_blank" : "_self",
|
|
104
|
+
rel: a.isExternal ? "noopener noreferrer" : void 0,
|
|
105
105
|
onClick: () => {
|
|
106
|
-
var
|
|
107
|
-
d(null), (
|
|
106
|
+
var H;
|
|
107
|
+
d(null), (H = a.onClick) == null || H.call(a);
|
|
108
108
|
},
|
|
109
|
-
onMouseEnter: () =>
|
|
109
|
+
onMouseEnter: () => a.sublinks ? w(u) : null,
|
|
110
110
|
role: "menuitem",
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
/* @__PURE__ */ i("span", { className: e.linkContent, children: [
|
|
113
|
+
a.label,
|
|
114
|
+
a.subtitle && /* @__PURE__ */ n("span", { className: e.subtitle, children: a.subtitle })
|
|
115
115
|
] }),
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
a.isExternal && /* @__PURE__ */ n(
|
|
117
|
+
de,
|
|
118
118
|
{
|
|
119
119
|
className: e.newTabIcon,
|
|
120
120
|
size: 16
|
|
@@ -122,33 +122,50 @@ function be({
|
|
|
122
122
|
)
|
|
123
123
|
]
|
|
124
124
|
},
|
|
125
|
-
|
|
125
|
+
a._key ?? u
|
|
126
126
|
) : /* @__PURE__ */ n(
|
|
127
127
|
"button",
|
|
128
128
|
{
|
|
129
|
-
className: `${e.sublinkToggle} ${
|
|
129
|
+
className: `${e.sublinkToggle} ${m === u ? e.open : ""}`,
|
|
130
130
|
onMouseEnter: () => w(u),
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
children: /* @__PURE__ */ i("span", { className: e.linkContent, children: [
|
|
132
|
+
a.label,
|
|
133
|
+
a.subtitle && /* @__PURE__ */ n("span", { className: e.subtitle, children: a.subtitle })
|
|
134
134
|
] })
|
|
135
135
|
},
|
|
136
|
-
|
|
136
|
+
a._key ?? u
|
|
137
137
|
)
|
|
138
138
|
)
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
(
|
|
142
|
+
(t == null ? void 0 : t.sublinks) && ((S = t == null ? void 0 : t.sublinks) == null ? void 0 : S.length) > 0 && /* @__PURE__ */ i(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
145
145
|
className: `${e.sublinksColumn} ${e.fadeInFromLeft}`,
|
|
146
|
-
children:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
children: [
|
|
147
|
+
(t == null ? void 0 : t.description) && /* @__PURE__ */ n("div", { className: e.sublinksDescription, children: t == null ? void 0 : t.description }),
|
|
148
|
+
$(
|
|
149
|
+
t.sublinks,
|
|
150
|
+
`${c}-${m}`
|
|
151
|
+
)
|
|
152
|
+
]
|
|
150
153
|
},
|
|
151
|
-
`${
|
|
154
|
+
`${t.label}-${(V = t == null ? void 0 : t.sublinks) == null ? void 0 : V.length}`
|
|
155
|
+
),
|
|
156
|
+
(s == null ? void 0 : s.secondaryItems) && ((A = s == null ? void 0 : s.secondaryItems) == null ? void 0 : A.length) > 0 && /* @__PURE__ */ n(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
className: `${e.sublinksColumn} ${e.secondaryColumn}`,
|
|
160
|
+
children: $(s.secondaryItems, `${c}-secondary`)
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
s.spotlight && /* @__PURE__ */ n(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: `${e.sublinksColumn} ${e.spotlightColumn}`,
|
|
167
|
+
children: s.spotlight
|
|
168
|
+
}
|
|
152
169
|
)
|
|
153
170
|
]
|
|
154
171
|
}
|
|
@@ -157,83 +174,83 @@ function be({
|
|
|
157
174
|
)
|
|
158
175
|
]
|
|
159
176
|
},
|
|
160
|
-
|
|
177
|
+
s._key ?? `group-${o}`
|
|
161
178
|
);
|
|
162
|
-
}),
|
|
163
|
-
const
|
|
179
|
+
}), $ = (l, s = "") => l.map((o) => {
|
|
180
|
+
const c = `${s}/${o.label}`;
|
|
164
181
|
return /* @__PURE__ */ n(
|
|
165
|
-
|
|
182
|
+
ce,
|
|
166
183
|
{
|
|
167
|
-
link:
|
|
168
|
-
path:
|
|
169
|
-
parentPath:
|
|
170
|
-
openPath:
|
|
171
|
-
togglePath:
|
|
172
|
-
updateTriangleIndicator:
|
|
184
|
+
link: o,
|
|
185
|
+
path: c,
|
|
186
|
+
parentPath: s,
|
|
187
|
+
openPath: B,
|
|
188
|
+
togglePath: ie,
|
|
189
|
+
updateTriangleIndicator: y,
|
|
173
190
|
setOpenPath: d,
|
|
174
|
-
renderLinks:
|
|
175
|
-
buttonRefs:
|
|
191
|
+
renderLinks: $,
|
|
192
|
+
buttonRefs: g
|
|
176
193
|
},
|
|
177
|
-
|
|
194
|
+
o._key ?? c
|
|
178
195
|
);
|
|
179
|
-
}), j = E((
|
|
180
|
-
|
|
196
|
+
}), j = E((l) => {
|
|
197
|
+
k.current && !k.current.contains(l.target) && d(null);
|
|
198
|
+
}, []), D = E(() => {
|
|
199
|
+
G(), typeof window < "u" && window.innerWidth > 768 && (P(!1), d(null), typeof document < "u" && (document.body.style.overflow = ""));
|
|
181
200
|
}, []), G = E(() => {
|
|
182
|
-
X(), typeof window < "u" && window.innerWidth > 768 && (Z(!1), d(null), typeof document < "u" && (document.body.style.overflow = ""));
|
|
183
|
-
}, []), X = E(() => {
|
|
184
201
|
if (f.current) {
|
|
185
|
-
const
|
|
186
|
-
|
|
202
|
+
const l = f.current.getBoundingClientRect().width;
|
|
203
|
+
Z(l), se(!0);
|
|
187
204
|
}
|
|
188
205
|
}, []);
|
|
189
206
|
return L(() => {
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
|
|
207
|
+
const l = typeof window < "u", s = typeof document < "u";
|
|
208
|
+
return l && window.addEventListener("resize", D), s && document.addEventListener("click", j), G(), () => {
|
|
209
|
+
l && window.removeEventListener("resize", D), s && document.removeEventListener("click", j);
|
|
193
210
|
};
|
|
194
211
|
}, []), L(() => {
|
|
195
212
|
if (typeof window < "u") {
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
|
|
213
|
+
const l = () => {
|
|
214
|
+
const s = window.innerWidth < 768;
|
|
215
|
+
ee(s);
|
|
199
216
|
};
|
|
200
|
-
return
|
|
217
|
+
return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
201
218
|
}
|
|
202
219
|
}, []), L(() => {
|
|
203
220
|
if (typeof document < "u")
|
|
204
|
-
return document.body.style.overflow =
|
|
221
|
+
return document.body.style.overflow = N ? "hidden" : "", () => {
|
|
205
222
|
document.body.style.overflow = "";
|
|
206
223
|
};
|
|
207
|
-
}, [
|
|
224
|
+
}, [N]), /* @__PURE__ */ n(
|
|
208
225
|
"header",
|
|
209
226
|
{
|
|
210
|
-
ref:
|
|
211
|
-
className: `${
|
|
227
|
+
ref: k,
|
|
228
|
+
className: `${U ?? ""} ${he[p]} ${ue[Q]} ${e.navbar} ${K ? e.sticky : ""} ${h && h.length ? e.advanced : e.default}`,
|
|
212
229
|
role: "navigation",
|
|
213
230
|
"aria-label": "Main navigation",
|
|
214
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ i(
|
|
215
232
|
"div",
|
|
216
233
|
{
|
|
217
|
-
className: `${e.container} ${(!x || x.length === 0) &&
|
|
234
|
+
className: `${e.container} ${(!x || x.length === 0) && p !== "center" ? e.twoColumn : ""}`,
|
|
218
235
|
children: [
|
|
219
|
-
M ? /* @__PURE__ */ n("div", { className: e.logo, children: M }) : /* @__PURE__ */ n("div", { className: e.title, children:
|
|
236
|
+
M ? /* @__PURE__ */ n("div", { className: e.logo, children: M }) : /* @__PURE__ */ n("div", { className: e.title, children: J }),
|
|
220
237
|
/* @__PURE__ */ n(
|
|
221
238
|
"nav",
|
|
222
239
|
{
|
|
223
240
|
ref: f,
|
|
224
241
|
style: {
|
|
225
|
-
left:
|
|
242
|
+
left: p === "center" ? `calc(50% - ${Y / 2}px)` : "0"
|
|
226
243
|
},
|
|
227
|
-
className: `${e.nav} ${
|
|
244
|
+
className: `${e.nav} ${N ? e.open : ""} ${ne ? e.visible : e.hidden}`,
|
|
228
245
|
id: "main-menu",
|
|
229
246
|
role: "menubar",
|
|
230
247
|
"aria-label": "Main navigation",
|
|
231
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ i("div", { className: e.navInner, children: [
|
|
232
249
|
/* @__PURE__ */ n(
|
|
233
250
|
"svg",
|
|
234
251
|
{
|
|
235
|
-
style: { left: `${
|
|
236
|
-
className: `${e.triangle} ${
|
|
252
|
+
style: { left: `${te}px` },
|
|
253
|
+
className: `${e.triangle} ${B ? e.show : ""}`,
|
|
237
254
|
width: 16,
|
|
238
255
|
height: 12,
|
|
239
256
|
viewBox: "0 0 100 75",
|
|
@@ -249,17 +266,17 @@ function be({
|
|
|
249
266
|
)
|
|
250
267
|
}
|
|
251
268
|
),
|
|
252
|
-
z === "default" && v && /* @__PURE__ */
|
|
253
|
-
v && v.length > 0 &&
|
|
254
|
-
R && !
|
|
269
|
+
z === "default" && v && /* @__PURE__ */ i("div", { className: e.grid, children: [
|
|
270
|
+
v && v.length > 0 && $(v),
|
|
271
|
+
R && !I && /* @__PURE__ */ i(q, { children: [
|
|
255
272
|
/* @__PURE__ */ n("span", { className: e.separator }),
|
|
256
273
|
/* @__PURE__ */ n(O, {})
|
|
257
274
|
] }),
|
|
258
275
|
W && /* @__PURE__ */ n(T, {})
|
|
259
276
|
] }),
|
|
260
|
-
!
|
|
261
|
-
h.length > 0 &&
|
|
262
|
-
R && /* @__PURE__ */
|
|
277
|
+
!I && z === "advanced" && h && /* @__PURE__ */ i("div", { className: e.grid, children: [
|
|
278
|
+
h.length > 0 && oe(h),
|
|
279
|
+
R && /* @__PURE__ */ i(q, { children: [
|
|
263
280
|
/* @__PURE__ */ n("span", { className: e.separator }),
|
|
264
281
|
/* @__PURE__ */ n(O, {})
|
|
265
282
|
] }),
|
|
@@ -275,5 +292,5 @@ function be({
|
|
|
275
292
|
);
|
|
276
293
|
}
|
|
277
294
|
export {
|
|
278
|
-
|
|
295
|
+
pe as Navbar
|
|
279
296
|
};
|
package/dist/core.d.ts
CHANGED
package/dist/main.d.ts
CHANGED
package/dist/next.d.ts
CHANGED
package/package.json
CHANGED
package/dist/NavLink-3G_M0Xmt.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as v } from "react";
|
|
3
|
-
import { E as k } from "./external-link-BOPobeQJ.js";
|
|
4
|
-
import { C as g } from "./chevron-down-DSUzBz9F.js";
|
|
5
|
-
import './assets/NavLink.css';const f = "_navbar_1bon6_5", w = "_sticky_1bon6_19", C = "_left_1bon6_34", I = "_container_1bon6_35", N = "_logo_1bon6_39", x = "_nav_1bon6_5", T = "_center_1bon6_54", y = "_hidden_1bon6_60", E = "_visible_1bon6_67", S = "_right_1bon6_82", W = "_title_1bon6_89", $ = "_linkWrapper_1bon6_99", L = "_parent_1bon6_99", F = "_linkItem_1bon6_107", M = "_link_1bon6_99", j = "_sublinkToggle_1bon6_111", z = "_standard_1bon6_159", R = "_triangle_1bon6_167", D = "_transparent_1bon6_172", q = "_twoColumn_1bon6_276", A = "_navInner_1bon6_398", B = "_grid_1bon6_409", G = "_separator_1bon6_444", H = "_newTabIcon_1bon6_474", J = "_linkContent_1bon6_489", K = "_open_1bon6_500", Q = "_sublinks_1bon6_486", U = "_show_1bon6_571", V = "_primaryColumn_1bon6_612", X = "_sublinksInner_1bon6_629", Y = "_sublinksColumn_1bon6_647", Z = "_chevron_1bon6_657", O = "_advanced_1bon6_839", P = "_subtitle_1bon6_848", nn = "_withSpotlight_1bon6_890", on = "_withoutSpotlight_1bon6_894", en = "_searchWrapper_1bon6_940", sn = "_fadeInFromLeft_1bon6_962", o = {
|
|
6
|
-
navbar: f,
|
|
7
|
-
sticky: w,
|
|
8
|
-
left: C,
|
|
9
|
-
container: I,
|
|
10
|
-
logo: N,
|
|
11
|
-
nav: x,
|
|
12
|
-
center: T,
|
|
13
|
-
hidden: y,
|
|
14
|
-
visible: E,
|
|
15
|
-
right: S,
|
|
16
|
-
title: W,
|
|
17
|
-
linkWrapper: $,
|
|
18
|
-
parent: L,
|
|
19
|
-
linkItem: F,
|
|
20
|
-
link: M,
|
|
21
|
-
sublinkToggle: j,
|
|
22
|
-
standard: z,
|
|
23
|
-
triangle: R,
|
|
24
|
-
transparent: D,
|
|
25
|
-
twoColumn: q,
|
|
26
|
-
navInner: A,
|
|
27
|
-
grid: B,
|
|
28
|
-
separator: G,
|
|
29
|
-
newTabIcon: H,
|
|
30
|
-
linkContent: J,
|
|
31
|
-
open: K,
|
|
32
|
-
sublinks: Q,
|
|
33
|
-
show: U,
|
|
34
|
-
primaryColumn: V,
|
|
35
|
-
sublinksInner: X,
|
|
36
|
-
sublinksColumn: Y,
|
|
37
|
-
chevron: Z,
|
|
38
|
-
default: "_default_1bon6_773",
|
|
39
|
-
advanced: O,
|
|
40
|
-
subtitle: P,
|
|
41
|
-
withSpotlight: nn,
|
|
42
|
-
withoutSpotlight: on,
|
|
43
|
-
searchWrapper: en,
|
|
44
|
-
fadeInFromLeft: sn
|
|
45
|
-
};
|
|
46
|
-
function an({
|
|
47
|
-
link: n,
|
|
48
|
-
path: e,
|
|
49
|
-
parentPath: i,
|
|
50
|
-
openPath: d,
|
|
51
|
-
togglePath: a,
|
|
52
|
-
updateTriangleIndicator: m,
|
|
53
|
-
setOpenPath: t,
|
|
54
|
-
renderLinks: p,
|
|
55
|
-
buttonRefs: h
|
|
56
|
-
}) {
|
|
57
|
-
var b;
|
|
58
|
-
const r = d === e, _ = !!((b = n.sublinks) != null && b.length), c = v(null);
|
|
59
|
-
return h.current.set(e, c.current), /* @__PURE__ */ l(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
className: `${o.linkWrapper} ${i ? "" : o.parent}`,
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ s("div", { className: o.linkItem, children: n.href ? /* @__PURE__ */ l(
|
|
65
|
-
"a",
|
|
66
|
-
{
|
|
67
|
-
href: n.href,
|
|
68
|
-
className: o.link,
|
|
69
|
-
target: n.isExternal ? "_blank" : "_self",
|
|
70
|
-
rel: n.isExternal ? "noopener noreferrer" : void 0,
|
|
71
|
-
onClick: () => {
|
|
72
|
-
var u;
|
|
73
|
-
t(null), (u = n.onClick) == null || u.call(n);
|
|
74
|
-
},
|
|
75
|
-
onMouseEnter: () => {
|
|
76
|
-
i || t(null);
|
|
77
|
-
},
|
|
78
|
-
role: "menuitem",
|
|
79
|
-
children: [
|
|
80
|
-
n.label,
|
|
81
|
-
n.isExternal && /* @__PURE__ */ s(k, { className: o.newTabIcon, size: 16 })
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
) : /* @__PURE__ */ l(
|
|
85
|
-
"button",
|
|
86
|
-
{
|
|
87
|
-
ref: c,
|
|
88
|
-
"aria-haspopup": _ ? "true" : void 0,
|
|
89
|
-
"aria-expanded": r,
|
|
90
|
-
className: `${o.sublinkToggle} ${r ? o.open : ""}`,
|
|
91
|
-
onClick: () => a(e),
|
|
92
|
-
onMouseEnter: () => {
|
|
93
|
-
m(e), t(e);
|
|
94
|
-
},
|
|
95
|
-
children: [
|
|
96
|
-
n.label,
|
|
97
|
-
_ && /* @__PURE__ */ s(g, { size: 18, className: o.chevron })
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
) }),
|
|
101
|
-
_ && /* @__PURE__ */ s(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
className: `${o.sublinks} ${r ? o.show : ""}`,
|
|
105
|
-
onMouseLeave: () => a(e),
|
|
106
|
-
role: "menu",
|
|
107
|
-
"aria-label": `${n.label} submenu`,
|
|
108
|
-
children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("div", { className: o.sublinksInner, children: /* @__PURE__ */ s("div", { className: o.sublinksColumn, children: p(n.sublinks, e) }) }) })
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
e
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
export {
|
|
117
|
-
an as N,
|
|
118
|
-
o as s
|
|
119
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require('./assets/NavLink.css');const e=require("react/jsx-runtime"),p=require("react"),v=require("./external-link-DDShu-48.cjs"),k=require("./chevron-down-DfK1XBl3.cjs"),g="_navbar_1bon6_5",f="_sticky_1bon6_19",w="_left_1bon6_34",I="_container_1bon6_35",C="_logo_1bon6_39",x="_nav_1bon6_5",N="_center_1bon6_54",j="_hidden_1bon6_60",$="_visible_1bon6_67",y="_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",F="_standard_1bon6_159",M="_triangle_1bon6_167",R="_transparent_1bon6_172",z="_twoColumn_1bon6_276",D="_navInner_1bon6_398",A="_grid_1bon6_409",B="_separator_1bon6_444",G="_newTabIcon_1bon6_474",H="_linkContent_1bon6_489",J="_open_1bon6_500",K="_sublinks_1bon6_486",Q="_show_1bon6_571",U="_primaryColumn_1bon6_612",V="_sublinksInner_1bon6_629",X="_sublinksColumn_1bon6_647",Y="_chevron_1bon6_657",Z="_advanced_1bon6_839",O="_subtitle_1bon6_848",P="_withSpotlight_1bon6_890",nn="_withoutSpotlight_1bon6_894",on="_searchWrapper_1bon6_940",en="_fadeInFromLeft_1bon6_962",o={navbar:g,sticky:f,left:w,container:I,logo:C,nav:x,center:N,hidden:j,visible:$,right:y,title:L,linkWrapper:T,parent:S,linkItem:W,link:E,sublinkToggle:q,standard:F,triangle:M,transparent:R,twoColumn:z,navInner:D,grid:A,separator:B,newTabIcon:G,linkContent:H,open:J,sublinks:K,show:Q,primaryColumn:U,sublinksInner:V,sublinksColumn:X,chevron:Y,default:"_default_1bon6_773",advanced:Z,subtitle:O,withSpotlight:P,withoutSpotlight:nn,searchWrapper:on,fadeInFromLeft:en};function sn({link:n,path:s,parentPath:i,openPath:u,togglePath:l,updateTriangleIndicator:d,setOpenPath:t,renderLinks:h,buttonRefs:m}){var c;const r=u===s,_=!!((c=n.sublinks)!=null&&c.length),a=p.useRef(null);return m.current.set(s,a.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(v.ExternalLink,{className:o.newTabIcon,size:16})]}):e.jsxs("button",{ref:a,"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(k.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:h(n.sublinks,s)})})})})]},s)}exports.NavLink=sn;exports.styles=o;
|