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