@npm_leadtech/legal-contracts-ui 0.54.1 → 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.
@@ -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,34 +1,33 @@
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
- import { SearchIcon as u } from "./SearchIcon.js";
4
- import { CloseIcon as x } from "./CloseIcon.js";
5
- import { HighlightedText as f } from "./HighlightedText.js";
6
- const w = ({
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: o,
9
- isOpen: s = !1,
10
- onToggle: d,
8
+ placeholder: n,
9
+ isOpen: h = !1,
10
+ onToggle: s,
11
11
  searchValue: t = "",
12
- onInputChange: h,
12
+ onInputChange: d,
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 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: d,
26
- "aria-expanded": s,
27
- children: /* @__PURE__ */ e(u, {})
24
+ onClick: s,
25
+ "aria-expanded": h,
26
+ children: /* @__PURE__ */ e(p, {})
28
27
  }
29
28
  ),
30
- s && /* @__PURE__ */ r(p, { children: [
31
- /* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick: d, "aria-hidden": "true" }),
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: h,
40
- placeholder: o,
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
- n && /* @__PURE__ */ e(
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(x, { width: 14, height: 14 })
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 && n ? /* @__PURE__ */ e("ul", { className: "py-2", children: i.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
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(f, { text: a.label, highlight: t })
60
+ children: /* @__PURE__ */ e(x, { text: a.label, highlight: t })
62
61
  }
63
- ) }, a.href)) }) : /* @__PURE__ */ e("div", { className: "text-small px-4 py-6 text-center text-neutral-400", children: b }),
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: h,
84
- placeholder: o,
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
- n ? /* @__PURE__ */ e(
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(x, { width: 16, height: 16 })
93
+ children: /* @__PURE__ */ e(u, { width: 16, height: 16 })
95
94
  }
96
- ) : /* @__PURE__ */ e(u, { fill: "var(--neutral-500)", width: 20, height: 20 })
95
+ ) : /* @__PURE__ */ e(p, { fill: "var(--neutral-500)", width: 20, height: 20 })
97
96
  ] }),
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(
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(f, { text: a.label, highlight: t })
103
+ children: /* @__PURE__ */ e(x, { text: a.label, highlight: t })
105
104
  }
106
- ) }, a.href)) }) : /* @__PURE__ */ e("div", { className: "px-4 py-6 text-center text-base text-neutral-400", children: b }),
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
- w as SearchBar
119
+ y as SearchBar
121
120
  };
@@ -713,7 +713,6 @@ export declare interface SearchBarProps {
713
713
  searchValue?: string;
714
714
  onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
715
715
  onClear?: () => void;
716
- noResultsText?: string;
717
716
  allDocumentsItem?: SearchItem;
718
717
  }
719
718
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.54.1",
3
+ "version": "0.54.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",