@npm_leadtech/legal-contracts-ui 0.61.3 → 0.62.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/Badge.js +6 -3
- package/dist/components/Header.d.ts +4 -4
- package/dist/components/MobileMenu.d.ts +4 -4
- package/dist/components/NotFoundTemplate.d.ts +4 -4
- package/dist/components/SearchBar.d.ts +7 -5
- package/dist/components/SearchBar.js +41 -71
- package/dist/components/index.d.ts +894 -0
- package/dist/globals.css +1 -1
- package/package.json +1 -1
package/dist/components/Badge.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
const d = ({ children:
|
|
3
|
+
const d = ({ children: r, color: e = "secondary", className: o = "" }) => /* @__PURE__ */ a(
|
|
4
4
|
"div",
|
|
5
5
|
{
|
|
6
|
-
className: `flex items-center gap-2 rounded
|
|
7
|
-
|
|
6
|
+
className: `flex items-center gap-2 rounded ${{
|
|
7
|
+
primary: "bg-primary-200",
|
|
8
|
+
secondary: "bg-secondary-200"
|
|
9
|
+
}[e]} whitespace-nowrap text-neutral-800 shadow-md ${o}`,
|
|
10
|
+
children: r
|
|
8
11
|
}
|
|
9
12
|
);
|
|
10
13
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
1
2
|
import { FC } from 'react';
|
|
2
|
-
import * as React_2 from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
|
|
5
5
|
export interface FormattedLanguageItem {
|
|
@@ -96,13 +96,13 @@ export interface SearchBarProps {
|
|
|
96
96
|
isOpen?: boolean;
|
|
97
97
|
onToggle?: () => void;
|
|
98
98
|
searchValue?: string;
|
|
99
|
-
onInputChange?: (e:
|
|
99
|
+
onInputChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
100
100
|
onClear?: () => void;
|
|
101
101
|
allDocumentsItem?: SearchItem;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
export interface SearchItem {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
id: string;
|
|
106
|
+
link: ReactNode;
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
1
2
|
import { FC } from 'react';
|
|
2
|
-
import * as React_2 from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
|
|
5
5
|
export declare interface MobileContactInfo {
|
|
@@ -42,13 +42,13 @@ export interface SearchBarProps {
|
|
|
42
42
|
isOpen?: boolean;
|
|
43
43
|
onToggle?: () => void;
|
|
44
44
|
searchValue?: string;
|
|
45
|
-
onInputChange?: (e:
|
|
45
|
+
onInputChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
46
46
|
onClear?: () => void;
|
|
47
47
|
allDocumentsItem?: SearchItem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export interface SearchItem {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
id: string;
|
|
52
|
+
link: ReactNode;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
1
2
|
import { ComponentPropsWithRef } from 'react';
|
|
2
3
|
import { FC } from 'react';
|
|
3
|
-
import * as React_2 from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
|
|
@@ -69,13 +69,13 @@ export interface SearchBarProps {
|
|
|
69
69
|
isOpen?: boolean;
|
|
70
70
|
onToggle?: () => void;
|
|
71
71
|
searchValue?: string;
|
|
72
|
-
onInputChange?: (e:
|
|
72
|
+
onInputChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
73
73
|
onClear?: () => void;
|
|
74
74
|
allDocumentsItem?: SearchItem;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export interface SearchItem {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
id: string;
|
|
79
|
+
link: ReactNode;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
2
4
|
|
|
3
|
-
export declare const SearchBar:
|
|
5
|
+
export declare const SearchBar: FC<SearchBarProps>;
|
|
4
6
|
|
|
5
7
|
export declare interface SearchBarProps {
|
|
6
8
|
items: SearchItem[];
|
|
@@ -8,13 +10,13 @@ export declare interface SearchBarProps {
|
|
|
8
10
|
isOpen?: boolean;
|
|
9
11
|
onToggle?: () => void;
|
|
10
12
|
searchValue?: string;
|
|
11
|
-
onInputChange?: (e:
|
|
13
|
+
onInputChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
12
14
|
onClear?: () => void;
|
|
13
15
|
allDocumentsItem?: SearchItem;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export declare interface SearchItem {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
id: string;
|
|
20
|
+
link: ReactNode;
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -1,75 +1,59 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
allDocumentsItem: l
|
|
1
|
+
import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { SearchIcon as f } from "./SearchIcon.js";
|
|
3
|
+
import { CloseIcon as b } from "./CloseIcon.js";
|
|
4
|
+
import { LinkWrapper as n } from "./LinkWrapper.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
items: t,
|
|
7
|
+
placeholder: d,
|
|
8
|
+
isOpen: s = !1,
|
|
9
|
+
onToggle: c,
|
|
10
|
+
searchValue: o = "",
|
|
11
|
+
onInputChange: h,
|
|
12
|
+
onClear: u,
|
|
13
|
+
allDocumentsItem: i
|
|
15
14
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ r(
|
|
15
|
+
const l = o.length > 0;
|
|
16
|
+
return /* @__PURE__ */ r(p, { children: [
|
|
18
17
|
/* @__PURE__ */ r("div", { className: "relative hidden lg:block", children: [
|
|
19
18
|
/* @__PURE__ */ e(
|
|
20
19
|
"button",
|
|
21
20
|
{
|
|
22
21
|
"aria-label": "Search",
|
|
23
22
|
className: "hover:bg-primary-100 cursor-pointer rounded-full p-2 transition-colors",
|
|
24
|
-
onClick:
|
|
25
|
-
"aria-expanded":
|
|
26
|
-
children: /* @__PURE__ */ e(
|
|
23
|
+
onClick: c,
|
|
24
|
+
"aria-expanded": s,
|
|
25
|
+
children: /* @__PURE__ */ e(f, {})
|
|
27
26
|
}
|
|
28
27
|
),
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick:
|
|
28
|
+
s && /* @__PURE__ */ r(p, { children: [
|
|
29
|
+
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-40", onClick: c, "aria-hidden": "true" }),
|
|
31
30
|
/* @__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 ${
|
|
31
|
+
/* @__PURE__ */ e("div", { className: `py-2 ${l ? "border-b border-neutral-200" : ""}`, children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2 rounded-md py-2", children: [
|
|
33
32
|
/* @__PURE__ */ e(
|
|
34
33
|
"input",
|
|
35
34
|
{
|
|
36
35
|
name: "search",
|
|
37
36
|
type: "text",
|
|
38
|
-
value:
|
|
39
|
-
onChange:
|
|
40
|
-
placeholder:
|
|
37
|
+
value: o,
|
|
38
|
+
onChange: h,
|
|
39
|
+
placeholder: d,
|
|
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
|
-
|
|
44
|
+
l && /* @__PURE__ */ e(
|
|
46
45
|
"button",
|
|
47
46
|
{
|
|
48
|
-
onClick:
|
|
47
|
+
onClick: u,
|
|
49
48
|
className: "cursor-pointer rounded-full p-0.5 transition-colors hover:bg-neutral-100",
|
|
50
49
|
"aria-label": "Clear search",
|
|
51
|
-
children: /* @__PURE__ */ e(
|
|
50
|
+
children: /* @__PURE__ */ e(b, { fill: "var(--neutral-400)", width: 20, height: 20 })
|
|
52
51
|
}
|
|
53
52
|
)
|
|
54
53
|
] }) }),
|
|
55
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto", children: /* @__PURE__ */ r("ul", { className:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
href: a.href,
|
|
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 })
|
|
63
|
-
}
|
|
64
|
-
) }, a.href)),
|
|
65
|
-
l && t && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
66
|
-
"a",
|
|
67
|
-
{
|
|
68
|
-
href: l.href,
|
|
69
|
-
className: "hover:bg-primary-50 text-medium block rounded px-1 py-2.5 font-semibold text-neutral-800 transition-colors",
|
|
70
|
-
children: l.label
|
|
71
|
-
}
|
|
72
|
-
) }, l.href)
|
|
54
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto", children: /* @__PURE__ */ r("ul", { className: l ? "py-4" : "", children: [
|
|
55
|
+
t.length > 0 && l && t.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(n, { className: "w-full justify-start", variant: "tertiary-thin", children: a.link }) }, a.id)),
|
|
56
|
+
i && l && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(n, { className: "w-full justify-start font-bold", variant: "tertiary-thin", children: i.link }) })
|
|
73
57
|
] }) })
|
|
74
58
|
] })
|
|
75
59
|
] })
|
|
@@ -81,43 +65,29 @@ const y = ({
|
|
|
81
65
|
{
|
|
82
66
|
type: "text",
|
|
83
67
|
name: "search",
|
|
84
|
-
value:
|
|
85
|
-
onChange:
|
|
86
|
-
placeholder:
|
|
68
|
+
value: o,
|
|
69
|
+
onChange: h,
|
|
70
|
+
placeholder: d,
|
|
87
71
|
className: "flex-1 bg-transparent text-base text-neutral-800 outline-none placeholder:text-neutral-400"
|
|
88
72
|
}
|
|
89
73
|
),
|
|
90
|
-
|
|
74
|
+
l ? /* @__PURE__ */ e(
|
|
91
75
|
"button",
|
|
92
76
|
{
|
|
93
|
-
onClick:
|
|
77
|
+
onClick: u,
|
|
94
78
|
className: "cursor-pointer rounded-full p-1 transition-colors hover:bg-neutral-200",
|
|
95
79
|
"aria-label": "Clear search",
|
|
96
|
-
children: /* @__PURE__ */ e(
|
|
80
|
+
children: /* @__PURE__ */ e(b, { fill: "var(--neutral-400)", width: 20, height: 20 })
|
|
97
81
|
}
|
|
98
|
-
) : /* @__PURE__ */ e(
|
|
82
|
+
) : /* @__PURE__ */ e(f, { fill: "var(--neutral-500)", width: 20, height: 20 })
|
|
99
83
|
] }),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
href: a.href,
|
|
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 })
|
|
107
|
-
}
|
|
108
|
-
) }, a.href)),
|
|
109
|
-
l && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
110
|
-
"a",
|
|
111
|
-
{
|
|
112
|
-
href: l.href,
|
|
113
|
-
className: "hover:bg-primary-50 block px-2 py-2.5 text-base font-semibold text-neutral-800 transition-colors",
|
|
114
|
-
children: l.label
|
|
115
|
-
}
|
|
116
|
-
) }, l.href)
|
|
84
|
+
l && /* @__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: [
|
|
85
|
+
t.length > 0 && t.map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(n, { variant: "tertiary-thin", children: a.link }) }, a.id)),
|
|
86
|
+
i && /* @__PURE__ */ e(n, { className: "font-bold", variant: "tertiary-thin", children: i.link })
|
|
117
87
|
] }) })
|
|
118
88
|
] })
|
|
119
89
|
] });
|
|
120
90
|
};
|
|
121
91
|
export {
|
|
122
|
-
|
|
92
|
+
N as SearchBar
|
|
123
93
|
};
|