@npm_leadtech/legal-contracts-ui 0.54.2 → 0.54.4

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