@npm_leadtech/legal-contracts-ui 0.54.0 → 0.54.2
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/components/Header.d.ts +7 -1
- package/dist/components/MobileMenu.d.ts +1 -1
- package/dist/components/MobileMenu.js +26 -22
- package/dist/components/NavMenu.d.ts +6 -0
- package/dist/components/NavMenu.js +19 -5
- package/dist/components/NavMenuItem.d.ts +6 -0
- package/dist/components/NavMenuItem.js +86 -43
- package/dist/components/NotFoundTemplate.d.ts +0 -1
- package/dist/components/SearchBar.d.ts +0 -1
- package/dist/components/SearchBar.js +33 -34
- package/dist/components/index.d.ts +7 -1
- package/dist/globals.css +1 -1
- package/package.json +1 -1
|
@@ -56,6 +56,7 @@ export interface MobileMenuSection {
|
|
|
56
56
|
items?: {
|
|
57
57
|
id: string;
|
|
58
58
|
link: ReactNode;
|
|
59
|
+
tag?: string;
|
|
59
60
|
}[];
|
|
60
61
|
seeAll?: ReactNode | null;
|
|
61
62
|
content?: ReactNode | null;
|
|
@@ -67,6 +68,9 @@ export type NavMenuItemProps = {
|
|
|
67
68
|
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
68
69
|
hasDropdown: true;
|
|
69
70
|
isNested?: boolean;
|
|
71
|
+
onItemClick?: () => void;
|
|
72
|
+
isOpen?: boolean;
|
|
73
|
+
onToggle?: (open: boolean) => void;
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
export type NavMenuLink = {
|
|
@@ -76,6 +80,9 @@ export type NavMenuLink = {
|
|
|
76
80
|
hasDropdown: false;
|
|
77
81
|
isNested?: boolean;
|
|
78
82
|
bold?: boolean;
|
|
83
|
+
onItemClick?: () => void;
|
|
84
|
+
isOpen?: boolean;
|
|
85
|
+
onToggle?: (open: boolean) => void;
|
|
79
86
|
};
|
|
80
87
|
|
|
81
88
|
export interface NavMenuProps {
|
|
@@ -91,7 +98,6 @@ export interface SearchBarProps {
|
|
|
91
98
|
searchValue?: string;
|
|
92
99
|
onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
93
100
|
onClear?: () => void;
|
|
94
|
-
noResultsText?: string;
|
|
95
101
|
allDocumentsItem?: SearchItem;
|
|
96
102
|
}
|
|
97
103
|
|
|
@@ -30,6 +30,7 @@ export declare interface MobileMenuSection {
|
|
|
30
30
|
items?: {
|
|
31
31
|
id: string;
|
|
32
32
|
link: ReactNode;
|
|
33
|
+
tag?: string;
|
|
33
34
|
}[];
|
|
34
35
|
seeAll?: ReactNode | null;
|
|
35
36
|
content?: ReactNode | null;
|
|
@@ -43,7 +44,6 @@ export interface SearchBarProps {
|
|
|
43
44
|
searchValue?: string;
|
|
44
45
|
onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
45
46
|
onClear?: () => void;
|
|
46
|
-
noResultsText?: string;
|
|
47
47
|
allDocumentsItem?: SearchItem;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { SearchBar as
|
|
3
|
+
import { SearchBar as u } from "./SearchBar.js";
|
|
4
4
|
import { PhoneTalkIcon as f } from "./PhoneTalkIcon.js";
|
|
5
5
|
import { CloseIcon as h } from "./CloseIcon.js";
|
|
6
6
|
const j = ({
|
|
7
|
-
isOpen:
|
|
8
|
-
onClose:
|
|
9
|
-
logo:
|
|
10
|
-
userActions:
|
|
11
|
-
searchBarProps:
|
|
12
|
-
sections:
|
|
7
|
+
isOpen: n,
|
|
8
|
+
onClose: m,
|
|
9
|
+
logo: d,
|
|
10
|
+
userActions: c,
|
|
11
|
+
searchBarProps: o,
|
|
12
|
+
sections: p = [],
|
|
13
13
|
contactInfo: t,
|
|
14
|
-
closeText:
|
|
15
|
-
}) =>
|
|
14
|
+
closeText: x
|
|
15
|
+
}) => n ? /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white text-neutral-800 lg:hidden", children: [
|
|
16
16
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
17
|
-
|
|
17
|
+
d,
|
|
18
18
|
/* @__PURE__ */ l(
|
|
19
19
|
"button",
|
|
20
20
|
{
|
|
21
21
|
className: "text-small text-primary-500 flex cursor-pointer items-center justify-center gap-1 rounded border border-neutral-400 px-2 py-1",
|
|
22
|
-
onClick:
|
|
22
|
+
onClick: m,
|
|
23
23
|
"aria-label": "Close menu",
|
|
24
24
|
children: [
|
|
25
|
-
|
|
25
|
+
x,
|
|
26
26
|
/* @__PURE__ */ r(h, { fill: "var(--primary-500)" })
|
|
27
27
|
]
|
|
28
28
|
}
|
|
@@ -30,27 +30,31 @@ const j = ({
|
|
|
30
30
|
] }),
|
|
31
31
|
/* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
|
|
32
32
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-6", children: [
|
|
33
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-4", children:
|
|
34
|
-
/* @__PURE__ */ r(
|
|
33
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: c }),
|
|
34
|
+
/* @__PURE__ */ r(u, { ...o })
|
|
35
35
|
] }),
|
|
36
|
-
/* @__PURE__ */ r("nav", { className: "flex flex-col gap-0", children:
|
|
37
|
-
const
|
|
38
|
-
return e.content != null ? /* @__PURE__ */ r("div", { className: "flex items-center px-6 pb-8", children: e.content }, e.id ?? `custom-${
|
|
36
|
+
/* @__PURE__ */ r("nav", { className: "flex flex-col gap-0", children: p.map((e, s) => {
|
|
37
|
+
const i = e.icon != null;
|
|
38
|
+
return e.content != null ? /* @__PURE__ */ r("div", { className: "flex items-center px-6 pb-8", children: e.content }, e.id ?? `custom-${s.toString()}`) : /* @__PURE__ */ l(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
className: e.title !== "" && !
|
|
41
|
+
className: e.title !== "" && !i ? "border-t border-b border-neutral-200 pt-4" : "",
|
|
42
42
|
children: [
|
|
43
|
-
e.title && /* @__PURE__ */ l("div", { className: `flex items-center gap-2 px-6 ${
|
|
43
|
+
e.title && /* @__PURE__ */ l("div", { className: `flex items-center gap-2 px-6 ${i ? "bg-neutral-50 py-4" : ""}`, children: [
|
|
44
44
|
e.icon != null && /* @__PURE__ */ r("span", { className: "text-primary-700", children: e.icon }),
|
|
45
45
|
/* @__PURE__ */ r("h4", { className: "text-medium font-semibold", children: e.title })
|
|
46
46
|
] }),
|
|
47
|
-
e.items != null && /* @__PURE__ */ l("ul", { className: `flex flex-col gap-4 ${
|
|
48
|
-
e.items.map((
|
|
47
|
+
e.items != null && /* @__PURE__ */ l("ul", { className: `flex flex-col gap-4 ${i ? "p-6" : "px-6 py-4"}`, children: [
|
|
48
|
+
e.items.map((a) => /* @__PURE__ */ l("li", { className: "text-medium flex items-center gap-1", children: [
|
|
49
|
+
a.link,
|
|
50
|
+
" ",
|
|
51
|
+
a.tag && /* @__PURE__ */ r("span", { className: "bg-secondary-200 text-extra-small flex h-4.5 w-5.25 items-center justify-center rounded align-middle font-bold", children: a.tag })
|
|
52
|
+
] }, a.id)),
|
|
49
53
|
e.seeAll != null && /* @__PURE__ */ r("li", { className: "font-semibold", children: e.seeAll })
|
|
50
54
|
] })
|
|
51
55
|
]
|
|
52
56
|
},
|
|
53
|
-
e.id ?? e.title ??
|
|
57
|
+
e.id ?? e.title ?? s.toString()
|
|
54
58
|
);
|
|
55
59
|
}) }),
|
|
56
60
|
t && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
|
|
@@ -9,6 +9,9 @@ export type NavMenuItemProps = {
|
|
|
9
9
|
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
10
10
|
hasDropdown: true;
|
|
11
11
|
isNested?: boolean;
|
|
12
|
+
onItemClick?: () => void;
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
onToggle?: (open: boolean) => void;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export type NavMenuLink = {
|
|
@@ -18,6 +21,9 @@ export type NavMenuLink = {
|
|
|
18
21
|
hasDropdown: false;
|
|
19
22
|
isNested?: boolean;
|
|
20
23
|
bold?: boolean;
|
|
24
|
+
onItemClick?: () => void;
|
|
25
|
+
isOpen?: boolean;
|
|
26
|
+
onToggle?: (open: boolean) => void;
|
|
21
27
|
};
|
|
22
28
|
|
|
23
29
|
export declare interface NavMenuProps {
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useState as m } from "react";
|
|
4
|
+
import { NavMenuItem as n } from "./NavMenuItem.js";
|
|
5
|
+
const c = ({ navItems: l, className: o = "" }) => {
|
|
6
|
+
const [t, i] = m(null);
|
|
7
|
+
return /* @__PURE__ */ r("nav", { className: o, children: /* @__PURE__ */ r("ul", { className: "text-medium flex flex-wrap items-center gap-4 xl:gap-8", children: l.map((e) => /* @__PURE__ */ r(
|
|
8
|
+
n,
|
|
9
|
+
{
|
|
10
|
+
...e,
|
|
11
|
+
isOpen: t === e.id,
|
|
12
|
+
onToggle: (p) => {
|
|
13
|
+
i(p ? e.id : null);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
e.id
|
|
17
|
+
)) }) });
|
|
18
|
+
};
|
|
5
19
|
export {
|
|
6
|
-
|
|
20
|
+
c as NavMenu
|
|
7
21
|
};
|
|
@@ -9,6 +9,9 @@ export declare type NavMenuItemProps = {
|
|
|
9
9
|
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
10
10
|
hasDropdown: true;
|
|
11
11
|
isNested?: boolean;
|
|
12
|
+
onItemClick?: () => void;
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
onToggle?: (open: boolean) => void;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export declare type NavMenuLink = {
|
|
@@ -18,5 +21,8 @@ export declare type NavMenuLink = {
|
|
|
18
21
|
hasDropdown: false;
|
|
19
22
|
isNested?: boolean;
|
|
20
23
|
bold?: boolean;
|
|
24
|
+
onItemClick?: () => void;
|
|
25
|
+
isOpen?: boolean;
|
|
26
|
+
onToggle?: (open: boolean) => void;
|
|
21
27
|
};
|
|
22
28
|
|
|
@@ -1,61 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { useState as p, useCallback as E, useRef as T, useEffect as $ } from "react";
|
|
4
|
+
import { ChevronDownIcon as j } from "./ChevronDownIcon.js";
|
|
5
|
+
import { ChevronRightIcon as P } from "./ChevronRightIcon.js";
|
|
6
|
+
const R = (l) => {
|
|
7
|
+
const { hasDropdown: g, isNested: w, isOpen: v, onToggle: i } = l, [x, C] = p(!1), [I, u] = p(null), s = v ?? x, n = E(
|
|
8
|
+
(e) => {
|
|
9
|
+
e || u(null), i ? i(e) : C(e);
|
|
10
|
+
},
|
|
11
|
+
[i]
|
|
12
|
+
), r = T(null);
|
|
13
|
+
$(() => {
|
|
14
|
+
if (!s) return;
|
|
15
|
+
const e = (c) => {
|
|
16
|
+
r.current && !r.current.contains(c.target) && n(!1);
|
|
17
|
+
};
|
|
18
|
+
return document.addEventListener("mousedown", e), () => {
|
|
19
|
+
document.removeEventListener("mousedown", e);
|
|
20
|
+
};
|
|
21
|
+
}, [s, n]);
|
|
22
|
+
const m = {
|
|
7
23
|
topLevel: {
|
|
8
|
-
liClass: "
|
|
24
|
+
liClass: "relative py-2",
|
|
9
25
|
triggerClass: "hover:text-neutral-600",
|
|
10
26
|
dropdownPosition: "top-full left-0",
|
|
11
|
-
|
|
12
|
-
Icon: g,
|
|
13
|
-
iconClass: "transition-transform duration-200 group-hover:rotate-180"
|
|
27
|
+
Icon: j
|
|
14
28
|
},
|
|
15
29
|
nested: {
|
|
16
|
-
liClass: "
|
|
30
|
+
liClass: "relative",
|
|
17
31
|
triggerClass: "p-1 hover:bg-primary-100 w-full rounded min-w-48.5",
|
|
18
32
|
dropdownPosition: "top-0 left-full -mt-4 pl-6",
|
|
19
|
-
|
|
20
|
-
Icon: f,
|
|
21
|
-
iconClass: ""
|
|
33
|
+
Icon: P
|
|
22
34
|
}
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
}, o = w ? m.nested : m.topLevel, b = o.Icon, f = () => {
|
|
36
|
+
n(!1), l.onItemClick && l.onItemClick();
|
|
37
|
+
}, N = (e) => {
|
|
38
|
+
e.stopPropagation(), n(!s);
|
|
39
|
+
}, k = () => {
|
|
40
|
+
globalThis.window.matchMedia("(hover: hover)").matches && n(!0);
|
|
41
|
+
}, O = () => {
|
|
42
|
+
globalThis.window.matchMedia("(hover: hover)").matches && n(!1);
|
|
43
|
+
};
|
|
44
|
+
if (g) {
|
|
45
|
+
const { dropdownItems: e, label: c } = l;
|
|
46
|
+
return /* @__PURE__ */ d(
|
|
47
|
+
"li",
|
|
48
|
+
{
|
|
49
|
+
ref: r,
|
|
50
|
+
className: o.liClass,
|
|
51
|
+
onMouseEnter: k,
|
|
52
|
+
onMouseLeave: O,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ d(
|
|
55
|
+
"button",
|
|
56
|
+
{
|
|
57
|
+
className: `text-small flex w-full cursor-pointer items-center justify-between gap-1 font-medium text-nowrap text-neutral-800 transition-colors ${o.triggerClass}`,
|
|
58
|
+
"aria-haspopup": "menu",
|
|
59
|
+
"aria-expanded": s,
|
|
60
|
+
onClick: N,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ t("span", { className: "text-medium", children: c }),
|
|
63
|
+
/* @__PURE__ */ t(b, { fill: "#000", width: 20, height: 20 })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ t(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: `absolute z-50 min-w-48 transition-all duration-200 ${o.dropdownPosition} ${s ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"}`,
|
|
71
|
+
children: /* @__PURE__ */ t("div", { className: "rounded-md border border-neutral-200 bg-white p-4 shadow-lg", children: /* @__PURE__ */ t("ul", { className: "flex flex-col gap-2", children: e.map((a) => /* @__PURE__ */ t(
|
|
72
|
+
R,
|
|
73
|
+
{
|
|
74
|
+
...a,
|
|
75
|
+
isNested: !0,
|
|
76
|
+
onItemClick: f,
|
|
77
|
+
isOpen: I === a.id,
|
|
78
|
+
onToggle: (M) => {
|
|
79
|
+
u(M ? a.id : null);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
a.id
|
|
83
|
+
)) }) })
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
46
89
|
}
|
|
47
|
-
const { link:
|
|
48
|
-
return /* @__PURE__ */
|
|
90
|
+
const { link: y, tag: h, bold: L } = l;
|
|
91
|
+
return /* @__PURE__ */ t("li", { className: o.liClass, onClick: f, children: /* @__PURE__ */ d(
|
|
49
92
|
"span",
|
|
50
93
|
{
|
|
51
|
-
className: `text-small relative flex w-full items-center
|
|
94
|
+
className: `text-small relative flex w-full items-center gap-1 font-medium text-nowrap text-neutral-800 transition-colors ${o.triggerClass} `,
|
|
52
95
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
96
|
+
/* @__PURE__ */ t("span", { className: `text-medium flex-1 ${L ? "font-bold" : ""} [&_a]:after:absolute [&_a]:after:inset-0`, children: y }),
|
|
97
|
+
h && /* @__PURE__ */ t("span", { className: "bg-secondary-200 text-extra-small flex h-4.5 w-5.25 items-center justify-center rounded align-middle font-bold", children: h })
|
|
55
98
|
]
|
|
56
99
|
}
|
|
57
100
|
) });
|
|
58
101
|
};
|
|
59
102
|
export {
|
|
60
|
-
|
|
103
|
+
R as NavMenuItem
|
|
61
104
|
};
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as
|
|
1
|
+
import { jsxs as r, Fragment as b, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { SearchIcon as
|
|
4
|
-
import { CloseIcon as
|
|
5
|
-
import { HighlightedText as
|
|
6
|
-
const
|
|
3
|
+
import { SearchIcon as p } from "./SearchIcon.js";
|
|
4
|
+
import { CloseIcon as u } from "./CloseIcon.js";
|
|
5
|
+
import { HighlightedText as x } from "./HighlightedText.js";
|
|
6
|
+
const y = ({
|
|
7
7
|
items: i,
|
|
8
|
-
placeholder:
|
|
9
|
-
isOpen:
|
|
10
|
-
onToggle:
|
|
8
|
+
placeholder: n,
|
|
9
|
+
isOpen: h = !1,
|
|
10
|
+
onToggle: s,
|
|
11
11
|
searchValue: t = "",
|
|
12
|
-
onInputChange:
|
|
12
|
+
onInputChange: d,
|
|
13
13
|
onClear: c,
|
|
14
|
-
noResultsText: b,
|
|
15
14
|
allDocumentsItem: l
|
|
16
15
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
return /* @__PURE__ */ r(
|
|
16
|
+
const o = t.length > 0;
|
|
17
|
+
return /* @__PURE__ */ r(b, { children: [
|
|
19
18
|
/* @__PURE__ */ r("div", { className: "relative hidden lg:block", children: [
|
|
20
19
|
/* @__PURE__ */ e(
|
|
21
20
|
"button",
|
|
22
21
|
{
|
|
23
22
|
"aria-label": "Search",
|
|
24
23
|
className: "hover:bg-primary-100 cursor-pointer rounded-full p-2 transition-colors",
|
|
25
|
-
onClick:
|
|
26
|
-
"aria-expanded":
|
|
27
|
-
children: /* @__PURE__ */ e(
|
|
24
|
+
onClick: s,
|
|
25
|
+
"aria-expanded": h,
|
|
26
|
+
children: /* @__PURE__ */ e(p, {})
|
|
28
27
|
}
|
|
29
28
|
),
|
|
30
|
-
|
|
31
|
-
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick:
|
|
29
|
+
h && /* @__PURE__ */ r(b, { children: [
|
|
30
|
+
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick: s, "aria-hidden": "true" }),
|
|
32
31
|
/* @__PURE__ */ r("div", { className: "absolute top-full left-0 z-50 mt-2 max-h-[50dvh] w-80 animate-[slideDown_0.2s_ease-out] overflow-y-auto rounded-lg border border-neutral-200 bg-white shadow-lg", children: [
|
|
33
32
|
/* @__PURE__ */ e("div", { className: "border-b border-neutral-200 p-3", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2 rounded-md px-3 py-2", children: [
|
|
34
33
|
/* @__PURE__ */ e(
|
|
@@ -36,31 +35,31 @@ const w = ({
|
|
|
36
35
|
{
|
|
37
36
|
type: "text",
|
|
38
37
|
value: t,
|
|
39
|
-
onChange:
|
|
40
|
-
placeholder:
|
|
38
|
+
onChange: d,
|
|
39
|
+
placeholder: n,
|
|
41
40
|
className: "flex-1 text-base text-neutral-800 outline-none placeholder:text-neutral-400",
|
|
42
41
|
autoFocus: !0
|
|
43
42
|
}
|
|
44
43
|
),
|
|
45
|
-
|
|
44
|
+
o && /* @__PURE__ */ e(
|
|
46
45
|
"button",
|
|
47
46
|
{
|
|
48
47
|
onClick: c,
|
|
49
48
|
className: "cursor-pointer rounded-full p-0.5 transition-colors hover:bg-neutral-200",
|
|
50
49
|
"aria-label": "Clear search",
|
|
51
|
-
children: /* @__PURE__ */ e(
|
|
50
|
+
children: /* @__PURE__ */ e(u, { width: 14, height: 14 })
|
|
52
51
|
}
|
|
53
52
|
)
|
|
54
53
|
] }) }),
|
|
55
54
|
/* @__PURE__ */ r("div", { className: "overflow-y-auto", children: [
|
|
56
|
-
i.length > 0 &&
|
|
55
|
+
i.length > 0 && o && /* @__PURE__ */ e("ul", { className: "py-2", children: i.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
57
56
|
"a",
|
|
58
57
|
{
|
|
59
58
|
href: a.href,
|
|
60
59
|
className: "hover:bg-primary-50 block px-4 py-2.5 text-base text-neutral-800 transition-colors",
|
|
61
|
-
children: /* @__PURE__ */ e(
|
|
60
|
+
children: /* @__PURE__ */ e(x, { text: a.label, highlight: t })
|
|
62
61
|
}
|
|
63
|
-
) }, a.href)) })
|
|
62
|
+
) }, a.href)) }),
|
|
64
63
|
l && /* @__PURE__ */ e("ul", { className: "py-2", children: /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
65
64
|
"a",
|
|
66
65
|
{
|
|
@@ -80,30 +79,30 @@ const w = ({
|
|
|
80
79
|
{
|
|
81
80
|
type: "text",
|
|
82
81
|
value: t,
|
|
83
|
-
onChange:
|
|
84
|
-
placeholder:
|
|
82
|
+
onChange: d,
|
|
83
|
+
placeholder: n,
|
|
85
84
|
className: "flex-1 bg-transparent text-base text-neutral-800 outline-none placeholder:text-neutral-400"
|
|
86
85
|
}
|
|
87
86
|
),
|
|
88
|
-
|
|
87
|
+
o ? /* @__PURE__ */ e(
|
|
89
88
|
"button",
|
|
90
89
|
{
|
|
91
90
|
onClick: c,
|
|
92
91
|
className: "cursor-pointer rounded-full p-1 transition-colors hover:bg-neutral-200",
|
|
93
92
|
"aria-label": "Clear search",
|
|
94
|
-
children: /* @__PURE__ */ e(
|
|
93
|
+
children: /* @__PURE__ */ e(u, { width: 16, height: 16 })
|
|
95
94
|
}
|
|
96
|
-
) : /* @__PURE__ */ e(
|
|
95
|
+
) : /* @__PURE__ */ e(p, { fill: "var(--neutral-500)", width: 20, height: 20 })
|
|
97
96
|
] }),
|
|
98
|
-
|
|
99
|
-
i.length > 0
|
|
97
|
+
o && /* @__PURE__ */ r("div", { className: "absolute mt-2 w-11/12 overflow-y-auto rounded-md border border-neutral-200 bg-white shadow-sm", children: [
|
|
98
|
+
i.length > 0 && /* @__PURE__ */ e("ul", { className: "py-2", children: i.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
100
99
|
"a",
|
|
101
100
|
{
|
|
102
101
|
href: a.href,
|
|
103
102
|
className: "hover:bg-primary-50 block px-4 py-3 text-base text-neutral-800 transition-colors",
|
|
104
|
-
children: /* @__PURE__ */ e(
|
|
103
|
+
children: /* @__PURE__ */ e(x, { text: a.label, highlight: t })
|
|
105
104
|
}
|
|
106
|
-
) }, a.href)) })
|
|
105
|
+
) }, a.href)) }),
|
|
107
106
|
l && /* @__PURE__ */ e("ul", { className: "py-2", children: /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
108
107
|
"a",
|
|
109
108
|
{
|
|
@@ -117,5 +116,5 @@ const w = ({
|
|
|
117
116
|
] });
|
|
118
117
|
};
|
|
119
118
|
export {
|
|
120
|
-
|
|
119
|
+
y as SearchBar
|
|
121
120
|
};
|
|
@@ -568,6 +568,7 @@ export declare interface MobileMenuSection {
|
|
|
568
568
|
items?: {
|
|
569
569
|
id: string;
|
|
570
570
|
link: ReactNode;
|
|
571
|
+
tag?: string;
|
|
571
572
|
}[];
|
|
572
573
|
seeAll?: ReactNode | null;
|
|
573
574
|
content?: ReactNode | null;
|
|
@@ -585,6 +586,9 @@ export declare type NavMenuItemProps = {
|
|
|
585
586
|
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
586
587
|
hasDropdown: true;
|
|
587
588
|
isNested?: boolean;
|
|
589
|
+
onItemClick?: () => void;
|
|
590
|
+
isOpen?: boolean;
|
|
591
|
+
onToggle?: (open: boolean) => void;
|
|
588
592
|
};
|
|
589
593
|
|
|
590
594
|
export declare type NavMenuLink = {
|
|
@@ -594,6 +598,9 @@ export declare type NavMenuLink = {
|
|
|
594
598
|
hasDropdown: false;
|
|
595
599
|
isNested?: boolean;
|
|
596
600
|
bold?: boolean;
|
|
601
|
+
onItemClick?: () => void;
|
|
602
|
+
isOpen?: boolean;
|
|
603
|
+
onToggle?: (open: boolean) => void;
|
|
597
604
|
};
|
|
598
605
|
|
|
599
606
|
export declare interface NavMenuProps {
|
|
@@ -706,7 +713,6 @@ export declare interface SearchBarProps {
|
|
|
706
713
|
searchValue?: string;
|
|
707
714
|
onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
708
715
|
onClear?: () => void;
|
|
709
|
-
noResultsText?: string;
|
|
710
716
|
allDocumentsItem?: SearchItem;
|
|
711
717
|
}
|
|
712
718
|
|