@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.
@@ -98,7 +98,6 @@ export interface SearchBarProps {
98
98
  searchValue?: string;
99
99
  onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
100
100
  onClear?: () => void;
101
- noResultsText?: string;
102
101
  allDocumentsItem?: SearchItem;
103
102
  }
104
103
 
@@ -44,7 +44,6 @@ export interface SearchBarProps {
44
44
  searchValue?: string;
45
45
  onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
46
46
  onClear?: () => void;
47
- noResultsText?: string;
48
47
  allDocumentsItem?: SearchItem;
49
48
  }
50
49
 
@@ -71,7 +71,6 @@ export interface SearchBarProps {
71
71
  searchValue?: string;
72
72
  onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
73
73
  onClear?: () => void;
74
- noResultsText?: string;
75
74
  allDocumentsItem?: SearchItem;
76
75
  }
77
76
 
@@ -10,7 +10,6 @@ export declare interface SearchBarProps {
10
10
  searchValue?: string;
11
11
  onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
12
12
  onClear?: () => void;
13
- noResultsText?: string;
14
13
  allDocumentsItem?: SearchItem;
15
14
  }
16
15
 
@@ -1,21 +1,20 @@
1
- import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
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 x } from "./CloseIcon.js";
4
+ import { CloseIcon as p } from "./CloseIcon.js";
5
5
  import { HighlightedText as f } from "./HighlightedText.js";
6
- const w = ({
7
- items: i,
8
- placeholder: o,
9
- isOpen: s = !1,
6
+ const y = ({
7
+ items: o,
8
+ placeholder: n,
9
+ isOpen: h = !1,
10
10
  onToggle: d,
11
- searchValue: t = "",
12
- onInputChange: h,
11
+ searchValue: i = "",
12
+ onInputChange: s,
13
13
  onClear: c,
14
- noResultsText: b,
15
14
  allDocumentsItem: l
16
15
  }) => {
17
- const n = t.length > 0;
18
- return /* @__PURE__ */ r(p, { children: [
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": s,
25
+ "aria-expanded": h,
27
26
  children: /* @__PURE__ */ e(u, {})
28
27
  }
29
28
  ),
30
- s && /* @__PURE__ */ r(p, { children: [
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-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: [
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: t,
39
- onChange: h,
40
- placeholder: o,
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
- n && /* @__PURE__ */ e(
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-200",
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(x, { width: 14, height: 14 })
51
+ children: /* @__PURE__ */ e(p, { fill: "var(--neutral-400)", width: 20, height: 20 })
52
52
  }
53
53
  )
54
54
  ] }) }),
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(
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
- 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 })
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)) }) : /* @__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(
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-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",
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
- value: t,
83
- onChange: h,
84
- placeholder: o,
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
- n ? /* @__PURE__ */ e(
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(x, { width: 16, height: 16 })
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
- 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(
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-4 py-3 text-base text-neutral-800 transition-colors",
104
- children: /* @__PURE__ */ e(f, { text: a.label, highlight: t })
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)) }) : /* @__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(
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-4 py-3 text-base font-semibold text-neutral-800 transition-colors",
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
- w as SearchBar
122
+ y as SearchBar
121
123
  };