@npm_leadtech/legal-contracts-ui 0.56.0 → 0.56.1
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 +0 -1
- package/dist/components/MobileMenu.d.ts +0 -1
- package/dist/components/NotFoundTemplate.d.ts +0 -1
- package/dist/components/SearchBar.d.ts +0 -1
- package/dist/components/SearchBar.js +47 -45
- package/dist/globals.css +1 -1
- package/package.json +1 -1
- package/dist/components/index.d.ts +0 -863
|
@@ -1,21 +1,20 @@
|
|
|
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
3
|
import { SearchIcon as u } from "./SearchIcon.js";
|
|
4
|
-
import { CloseIcon as
|
|
4
|
+
import { CloseIcon as p } from "./CloseIcon.js";
|
|
5
5
|
import { HighlightedText as f } from "./HighlightedText.js";
|
|
6
|
-
const
|
|
7
|
-
items:
|
|
8
|
-
placeholder:
|
|
9
|
-
isOpen:
|
|
6
|
+
const y = ({
|
|
7
|
+
items: o,
|
|
8
|
+
placeholder: n,
|
|
9
|
+
isOpen: h = !1,
|
|
10
10
|
onToggle: d,
|
|
11
|
-
searchValue:
|
|
12
|
-
onInputChange:
|
|
11
|
+
searchValue: i = "",
|
|
12
|
+
onInputChange: s,
|
|
13
13
|
onClear: c,
|
|
14
|
-
noResultsText: b,
|
|
15
14
|
allDocumentsItem: l
|
|
16
15
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
return /* @__PURE__ */ r(
|
|
16
|
+
const t = i.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",
|
|
@@ -23,53 +22,55 @@ const w = ({
|
|
|
23
22
|
"aria-label": "Search",
|
|
24
23
|
className: "hover:bg-primary-100 cursor-pointer rounded-full p-2 transition-colors",
|
|
25
24
|
onClick: d,
|
|
26
|
-
"aria-expanded":
|
|
25
|
+
"aria-expanded": h,
|
|
27
26
|
children: /* @__PURE__ */ e(u, {})
|
|
28
27
|
}
|
|
29
28
|
),
|
|
30
|
-
|
|
29
|
+
h && /* @__PURE__ */ r(b, { children: [
|
|
31
30
|
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick: d, "aria-hidden": "true" }),
|
|
32
|
-
/* @__PURE__ */ r("div", { className: "absolute top-full left-0 z-50 mt-
|
|
33
|
-
/* @__PURE__ */ e("div", { className: "border-b border-neutral-200
|
|
31
|
+
/* @__PURE__ */ r("div", { className: "absolute top-full left-0 z-50 mt-4 max-h-[50dvh] w-80 animate-[slideDown_0.2s_ease-out] overflow-y-auto rounded-lg border border-neutral-200 bg-white px-4 shadow-lg", children: [
|
|
32
|
+
/* @__PURE__ */ e("div", { className: `py-2 ${t ? "border-b border-neutral-200" : ""}`, children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2 rounded-md py-2", children: [
|
|
34
33
|
/* @__PURE__ */ e(
|
|
35
34
|
"input",
|
|
36
35
|
{
|
|
36
|
+
name: "search",
|
|
37
37
|
type: "text",
|
|
38
|
-
value:
|
|
39
|
-
onChange:
|
|
40
|
-
placeholder:
|
|
38
|
+
value: i,
|
|
39
|
+
onChange: s,
|
|
40
|
+
placeholder: n,
|
|
41
41
|
className: "flex-1 text-base text-neutral-800 outline-none placeholder:text-neutral-400",
|
|
42
42
|
autoFocus: !0
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
|
|
45
|
+
t && /* @__PURE__ */ e(
|
|
46
46
|
"button",
|
|
47
47
|
{
|
|
48
48
|
onClick: c,
|
|
49
|
-
className: "cursor-pointer rounded-full p-0.5 transition-colors hover:bg-neutral-
|
|
49
|
+
className: "cursor-pointer rounded-full p-0.5 transition-colors hover:bg-neutral-100",
|
|
50
50
|
"aria-label": "Clear search",
|
|
51
|
-
children: /* @__PURE__ */ e(
|
|
51
|
+
children: /* @__PURE__ */ e(p, { fill: "var(--neutral-400)", width: 20, height: 20 })
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
] }) }),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
55
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto", children: /* @__PURE__ */ r("ul", { className: t ? "py-4" : "", children: [
|
|
56
|
+
o.length > 0 && t && o.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
57
57
|
"a",
|
|
58
58
|
{
|
|
59
59
|
href: a.href,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
title: a.label,
|
|
61
|
+
className: "hover:bg-primary-50 text-medium block rounded px-1 py-2.5 text-neutral-800 transition-colors",
|
|
62
|
+
children: /* @__PURE__ */ e(f, { text: a.label, highlight: i })
|
|
62
63
|
}
|
|
63
|
-
) }, a.href))
|
|
64
|
-
l &&
|
|
64
|
+
) }, a.href)),
|
|
65
|
+
l && t && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
65
66
|
"a",
|
|
66
67
|
{
|
|
67
68
|
href: l.href,
|
|
68
|
-
className: "hover:bg-primary-50 block px-
|
|
69
|
+
className: "hover:bg-primary-50 text-medium block rounded px-1 py-2.5 font-semibold text-neutral-800 transition-colors",
|
|
69
70
|
children: l.label
|
|
70
71
|
}
|
|
71
|
-
) }, l.href)
|
|
72
|
-
] })
|
|
72
|
+
) }, l.href)
|
|
73
|
+
] }) })
|
|
73
74
|
] })
|
|
74
75
|
] })
|
|
75
76
|
] }),
|
|
@@ -79,43 +80,44 @@ const w = ({
|
|
|
79
80
|
"input",
|
|
80
81
|
{
|
|
81
82
|
type: "text",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
name: "search",
|
|
84
|
+
value: i,
|
|
85
|
+
onChange: s,
|
|
86
|
+
placeholder: n,
|
|
85
87
|
className: "flex-1 bg-transparent text-base text-neutral-800 outline-none placeholder:text-neutral-400"
|
|
86
88
|
}
|
|
87
89
|
),
|
|
88
|
-
|
|
90
|
+
t ? /* @__PURE__ */ e(
|
|
89
91
|
"button",
|
|
90
92
|
{
|
|
91
93
|
onClick: c,
|
|
92
94
|
className: "cursor-pointer rounded-full p-1 transition-colors hover:bg-neutral-200",
|
|
93
95
|
"aria-label": "Clear search",
|
|
94
|
-
children: /* @__PURE__ */ e(
|
|
96
|
+
children: /* @__PURE__ */ e(p, { fill: "var(--neutral-400)", width: 20, height: 20 })
|
|
95
97
|
}
|
|
96
98
|
) : /* @__PURE__ */ e(u, { fill: "var(--neutral-500)", width: 20, height: 20 })
|
|
97
99
|
] }),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
t && /* @__PURE__ */ e("div", { className: "absolute left-0 mt-2 w-full overflow-x-hidden overflow-y-auto bg-white", children: /* @__PURE__ */ r("ul", { className: "py-4 pl-4", children: [
|
|
101
|
+
o.length > 0 && o.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
100
102
|
"a",
|
|
101
103
|
{
|
|
102
104
|
href: a.href,
|
|
103
|
-
className: "hover:bg-primary-50 block px-
|
|
104
|
-
children: /* @__PURE__ */ e(f, { text: a.label, highlight:
|
|
105
|
+
className: "hover:bg-primary-50 block px-2 py-2.5 text-base text-neutral-800 transition-colors",
|
|
106
|
+
children: /* @__PURE__ */ e(f, { text: a.label, highlight: i })
|
|
105
107
|
}
|
|
106
|
-
) }, a.href))
|
|
107
|
-
l && /* @__PURE__ */ e("
|
|
108
|
+
) }, a.href)),
|
|
109
|
+
l && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
108
110
|
"a",
|
|
109
111
|
{
|
|
110
112
|
href: l.href,
|
|
111
|
-
className: "hover:bg-primary-50 block px-
|
|
113
|
+
className: "hover:bg-primary-50 block px-2 py-2.5 text-base font-semibold text-neutral-800 transition-colors",
|
|
112
114
|
children: l.label
|
|
113
115
|
}
|
|
114
|
-
) }, l.href)
|
|
115
|
-
] })
|
|
116
|
+
) }, l.href)
|
|
117
|
+
] }) })
|
|
116
118
|
] })
|
|
117
119
|
] });
|
|
118
120
|
};
|
|
119
121
|
export {
|
|
120
|
-
|
|
122
|
+
y as SearchBar
|
|
121
123
|
};
|