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