@npm_leadtech/legal-contracts-ui 0.54.4 → 0.54.5
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/SearchBar.js +21 -21
- package/dist/components/index.d.ts +862 -0
- package/dist/globals.css +1 -1
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ import { SearchIcon as u } from "./SearchIcon.js";
|
|
|
4
4
|
import { CloseIcon as p } from "./CloseIcon.js";
|
|
5
5
|
import { HighlightedText as f } from "./HighlightedText.js";
|
|
6
6
|
const y = ({
|
|
7
|
-
items:
|
|
8
|
-
placeholder:
|
|
9
|
-
isOpen:
|
|
10
|
-
onToggle:
|
|
7
|
+
items: n,
|
|
8
|
+
placeholder: o,
|
|
9
|
+
isOpen: h = !1,
|
|
10
|
+
onToggle: d,
|
|
11
11
|
searchValue: i = "",
|
|
12
12
|
onInputChange: s,
|
|
13
13
|
onClear: c,
|
|
@@ -21,14 +21,14 @@ 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:
|
|
25
|
-
"aria-expanded":
|
|
24
|
+
onClick: d,
|
|
25
|
+
"aria-expanded": h,
|
|
26
26
|
children: /* @__PURE__ */ e(u, {})
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick:
|
|
31
|
-
/* @__PURE__ */ r("div", { className: "absolute top-full left-0 z-50 mt-
|
|
29
|
+
h && /* @__PURE__ */ r(b, { children: [
|
|
30
|
+
/* @__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-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
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",
|
|
@@ -37,7 +37,7 @@ const y = ({
|
|
|
37
37
|
type: "text",
|
|
38
38
|
value: i,
|
|
39
39
|
onChange: s,
|
|
40
|
-
placeholder:
|
|
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
|
}
|
|
@@ -53,7 +53,7 @@ const y = ({
|
|
|
53
53
|
)
|
|
54
54
|
] }) }),
|
|
55
55
|
/* @__PURE__ */ e("div", { className: "overflow-y-auto", children: /* @__PURE__ */ r("ul", { className: t ? "py-4" : "", children: [
|
|
56
|
-
|
|
56
|
+
n.length > 0 && t && n.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
57
57
|
"a",
|
|
58
58
|
{
|
|
59
59
|
href: a.href,
|
|
@@ -83,7 +83,7 @@ const y = ({
|
|
|
83
83
|
name: "search",
|
|
84
84
|
value: i,
|
|
85
85
|
onChange: s,
|
|
86
|
-
placeholder:
|
|
86
|
+
placeholder: o,
|
|
87
87
|
className: "flex-1 bg-transparent text-base text-neutral-800 outline-none placeholder:text-neutral-400"
|
|
88
88
|
}
|
|
89
89
|
),
|
|
@@ -93,28 +93,28 @@ const y = ({
|
|
|
93
93
|
onClick: c,
|
|
94
94
|
className: "cursor-pointer rounded-full p-1 transition-colors hover:bg-neutral-200",
|
|
95
95
|
"aria-label": "Clear search",
|
|
96
|
-
children: /* @__PURE__ */ e(p, { width:
|
|
96
|
+
children: /* @__PURE__ */ e(p, { fill: "var(--neutral-400)", width: 20, height: 20 })
|
|
97
97
|
}
|
|
98
98
|
) : /* @__PURE__ */ e(u, { fill: "var(--neutral-500)", width: 20, height: 20 })
|
|
99
99
|
] }),
|
|
100
|
-
t && /* @__PURE__ */
|
|
101
|
-
|
|
100
|
+
t && /* @__PURE__ */ e("div", { className: "absolute mt-2 overflow-y-auto bg-white", children: /* @__PURE__ */ r("ul", { className: "py-4", children: [
|
|
101
|
+
n.length > 0 && n.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
102
102
|
"a",
|
|
103
103
|
{
|
|
104
104
|
href: a.href,
|
|
105
|
-
className: "hover:bg-primary-50 block
|
|
105
|
+
className: "hover:bg-primary-50 block py-2.5 text-base text-neutral-800 transition-colors",
|
|
106
106
|
children: /* @__PURE__ */ e(f, { text: a.label, highlight: i })
|
|
107
107
|
}
|
|
108
|
-
) }, a.href))
|
|
109
|
-
l && /* @__PURE__ */ e("
|
|
108
|
+
) }, a.href)),
|
|
109
|
+
l && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
110
110
|
"a",
|
|
111
111
|
{
|
|
112
112
|
href: l.href,
|
|
113
|
-
className: "hover:bg-primary-50 block
|
|
113
|
+
className: "hover:bg-primary-50 block py-2.5 text-base font-semibold text-neutral-800 transition-colors",
|
|
114
114
|
children: l.label
|
|
115
115
|
}
|
|
116
|
-
) }, l.href)
|
|
117
|
-
] })
|
|
116
|
+
) }, l.href)
|
|
117
|
+
] }) })
|
|
118
118
|
] })
|
|
119
119
|
] });
|
|
120
120
|
};
|