@npm_leadtech/legal-contracts-ui 0.12.0 → 0.16.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/Anchor.d.ts +4 -0
- package/dist/components/Anchor.js +13 -0
- package/dist/components/Badge.js +3 -3
- package/dist/components/Blockquote.d.ts +4 -0
- package/dist/components/Blockquote.js +5 -0
- package/dist/components/Code.d.ts +4 -0
- package/dist/components/Code.js +5 -0
- package/dist/components/Header.d.ts +22 -3
- package/dist/components/Header.js +33 -42
- package/dist/components/Header1.d.ts +4 -0
- package/dist/components/Header1.js +5 -0
- package/dist/components/Header2.d.ts +4 -0
- package/dist/components/Header2.js +5 -0
- package/dist/components/Header3.d.ts +4 -0
- package/dist/components/Header3.js +5 -0
- package/dist/components/Header4.d.ts +4 -0
- package/dist/components/Header4.js +5 -0
- package/dist/components/HighlightedText.d.ts +7 -0
- package/dist/components/HighlightedText.js +13 -0
- package/dist/components/Markdown.d.ts +9 -0
- package/dist/components/Markdown.js +7856 -0
- package/dist/components/OrderedList.d.ts +4 -0
- package/dist/components/OrderedList.js +5 -0
- package/dist/components/Paragraph.d.ts +4 -0
- package/dist/components/Paragraph.js +5 -0
- package/dist/components/SearchBar.d.ts +19 -2
- package/dist/components/SearchBar.js +120 -5
- package/dist/components/Table.d.ts +4 -0
- package/dist/components/Table.js +5 -0
- package/dist/components/UnorderedList.d.ts +4 -0
- package/dist/components/UnorderedList.js +5 -0
- package/dist/components/Video.d.ts +4 -0
- package/dist/components/Video.js +5 -0
- package/dist/components/index.d.ts +654 -0
- package/dist/globals.css +1 -1
- package/package.json +28 -26
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const n = ({ children: e, className: r }) => /* @__PURE__ */ o(
|
|
3
|
+
"a",
|
|
4
|
+
{
|
|
5
|
+
className: `text-blue-600 underline hover:text-blue-800 ${r || ""}`,
|
|
6
|
+
target: "_blank",
|
|
7
|
+
rel: "noopener noreferrer",
|
|
8
|
+
children: e
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
export {
|
|
12
|
+
n as Anchor
|
|
13
|
+
};
|
package/dist/components/Badge.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
const s = ({ children:
|
|
3
|
+
const s = ({ children: e, color: t = "secondary" }) => /* @__PURE__ */ r(
|
|
4
4
|
"div",
|
|
5
5
|
{
|
|
6
|
-
className: `absolute -top-4 -right-2 flex items-center gap-2 rounded bg-${
|
|
7
|
-
children:
|
|
6
|
+
className: `absolute -top-4 -right-2 flex items-center gap-2 rounded bg-${t}-200 text-small px-2 py-2 whitespace-nowrap text-neutral-800 shadow-md`,
|
|
7
|
+
children: e
|
|
8
8
|
}
|
|
9
9
|
);
|
|
10
10
|
export {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
const d = ({ children: e, className: o }) => !o || !o.includes("language-") ? /* @__PURE__ */ t("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-sm text-red-600", children: e }) : /* @__PURE__ */ t("code", { className: `mb-4 block overflow-x-auto rounded-lg bg-gray-900 p-4 text-gray-100 ${o || ""}`, children: e });
|
|
3
|
+
export {
|
|
4
|
+
d as Code
|
|
5
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
+
import * as React_2 from 'react';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
4
5
|
|
|
5
6
|
export interface FormattedLanguageItem {
|
|
@@ -14,15 +15,16 @@ export declare const Header: FC<HeaderProps>;
|
|
|
14
15
|
export declare interface HeaderProps {
|
|
15
16
|
logo: ReactNode;
|
|
16
17
|
navMenu: NavMenuProps;
|
|
17
|
-
isMobileMenuOpen
|
|
18
|
-
onOpenMobileMenu
|
|
19
|
-
onCloseMobileMenu
|
|
18
|
+
isMobileMenuOpen?: boolean;
|
|
19
|
+
onOpenMobileMenu?: () => void;
|
|
20
|
+
onCloseMobileMenu?: () => void;
|
|
20
21
|
mobileMenuSections?: MobileMenuSection[];
|
|
21
22
|
mobileContactInfo?: MobileContactInfo;
|
|
22
23
|
seeAllDocumentsLabel?: string;
|
|
23
24
|
seeAllDocumentsHref?: string;
|
|
24
25
|
userActions?: ReactNode;
|
|
25
26
|
languageSelectorProps?: LanguageSelectorProps;
|
|
27
|
+
searchBarProps: SearchBarProps;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export interface LanguageSelectorProps {
|
|
@@ -65,4 +67,21 @@ export interface NavMenuItemProps {
|
|
|
65
67
|
export interface NavMenuProps {
|
|
66
68
|
navItems: NavMenuItemProps[];
|
|
67
69
|
}
|
|
70
|
+
|
|
71
|
+
export interface SearchBarProps {
|
|
72
|
+
items: SearchItem[];
|
|
73
|
+
placeholder?: string;
|
|
74
|
+
isOpen?: boolean;
|
|
75
|
+
onToggle?: () => void;
|
|
76
|
+
searchValue?: string;
|
|
77
|
+
onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
78
|
+
onClear?: () => void;
|
|
79
|
+
noResultsText?: string;
|
|
80
|
+
allDocumentsItem?: SearchItem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface SearchItem {
|
|
84
|
+
label: string;
|
|
85
|
+
href: string;
|
|
86
|
+
}
|
|
68
87
|
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import { jsxs as l, Fragment as
|
|
1
|
+
import { jsxs as l, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { NavMenu as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { NavMenu as y } from "./NavMenu.js";
|
|
4
|
+
import { SearchBar as p } from "./SearchBar.js";
|
|
5
|
+
import { LanguageSelector as v } from "./LanguageSelector.js";
|
|
6
|
+
import { HamburgerIcon as g } from "./HamburgerIcon.js";
|
|
7
7
|
import { PhoneTalkIcon as j } from "./PhoneTalkIcon.js";
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
8
|
+
import { CloseIcon as k } from "./CloseIcon.js";
|
|
9
|
+
const T = ({
|
|
10
10
|
logo: c,
|
|
11
|
-
navMenu:
|
|
11
|
+
navMenu: x,
|
|
12
12
|
languageSelectorProps: s,
|
|
13
|
-
isMobileMenuOpen:
|
|
14
|
-
onOpenMobileMenu:
|
|
13
|
+
isMobileMenuOpen: d,
|
|
14
|
+
onOpenMobileMenu: o,
|
|
15
15
|
onCloseMobileMenu: t,
|
|
16
|
-
mobileMenuSections:
|
|
16
|
+
mobileMenuSections: u = [],
|
|
17
17
|
mobileContactInfo: a,
|
|
18
|
-
userActions:
|
|
19
|
-
seeAllDocumentsLabel:
|
|
20
|
-
seeAllDocumentsHref:
|
|
21
|
-
|
|
18
|
+
userActions: m,
|
|
19
|
+
seeAllDocumentsLabel: n,
|
|
20
|
+
seeAllDocumentsHref: f,
|
|
21
|
+
searchBarProps: h
|
|
22
|
+
}) => /* @__PURE__ */ l(N, { children: [
|
|
22
23
|
/* @__PURE__ */ e("header", { className: "bg-primary-50", children: /* @__PURE__ */ l("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
|
|
23
24
|
/* @__PURE__ */ l("div", { className: "flex flex-1 items-center gap-8", children: [
|
|
24
25
|
c,
|
|
25
|
-
/* @__PURE__ */ e("div", { className: "hidden lg:block", children: /* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ e("div", { className: "hidden lg:block", children: /* @__PURE__ */ e(y, { ...x }) })
|
|
26
27
|
] }),
|
|
27
28
|
/* @__PURE__ */ l("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex", children: [
|
|
28
|
-
/* @__PURE__ */ e(
|
|
29
|
-
/* @__PURE__ */ e("div", { className: "hidden xl:block", children: s && /* @__PURE__ */ e(
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ e(p, { ...h }),
|
|
30
|
+
/* @__PURE__ */ e("div", { className: "hidden xl:block", children: s && /* @__PURE__ */ e(v, { ...s }) }),
|
|
31
|
+
m
|
|
31
32
|
] }),
|
|
32
33
|
/* @__PURE__ */ e(
|
|
33
34
|
"button",
|
|
34
35
|
{
|
|
35
36
|
className: "flex cursor-pointer items-center justify-center p-2 lg:hidden",
|
|
36
|
-
onClick:
|
|
37
|
+
onClick: o,
|
|
37
38
|
"aria-label": "Open menu",
|
|
38
|
-
"aria-expanded":
|
|
39
|
-
children: /* @__PURE__ */ e(
|
|
39
|
+
"aria-expanded": d,
|
|
40
|
+
children: /* @__PURE__ */ e(g, {})
|
|
40
41
|
}
|
|
41
42
|
)
|
|
42
43
|
] }) }),
|
|
43
|
-
|
|
44
|
+
d && /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white lg:hidden", children: [
|
|
44
45
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between px-4 py-4", children: [
|
|
45
46
|
c,
|
|
46
47
|
/* @__PURE__ */ e(
|
|
@@ -49,24 +50,14 @@ const F = ({
|
|
|
49
50
|
className: "flex cursor-pointer items-center justify-center p-2",
|
|
50
51
|
onClick: t,
|
|
51
52
|
"aria-label": "Close menu",
|
|
52
|
-
children: /* @__PURE__ */ e(
|
|
53
|
+
children: /* @__PURE__ */ e(k, {})
|
|
53
54
|
}
|
|
54
55
|
)
|
|
55
56
|
] }),
|
|
56
57
|
/* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
|
|
57
|
-
/* @__PURE__ */ e("div", { className: "mb-6 flex items-center justify-center gap-8", children:
|
|
58
|
-
/* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
/* @__PURE__ */ e(
|
|
61
|
-
"input",
|
|
62
|
-
{
|
|
63
|
-
type: "text",
|
|
64
|
-
placeholder: "Search",
|
|
65
|
-
className: "flex-1 bg-transparent text-base text-neutral-800 outline-none placeholder:text-neutral-400"
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] }) }),
|
|
69
|
-
/* @__PURE__ */ e("nav", { className: "flex-1", children: o.map((r, u) => /* @__PURE__ */ l(
|
|
58
|
+
/* @__PURE__ */ e("div", { className: "mb-6 flex items-center justify-center gap-8", children: m }),
|
|
59
|
+
/* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ e(p, { ...h }) }),
|
|
60
|
+
/* @__PURE__ */ e("nav", { className: "flex-1", children: u.map((r, b) => /* @__PURE__ */ l(
|
|
70
61
|
"div",
|
|
71
62
|
{
|
|
72
63
|
className: `py-4 ${r.icon == null ? "border-t border-b border-neutral-200" : ""}`,
|
|
@@ -97,14 +88,14 @@ const F = ({
|
|
|
97
88
|
] })
|
|
98
89
|
]
|
|
99
90
|
},
|
|
100
|
-
r.title ??
|
|
91
|
+
r.title ?? b
|
|
101
92
|
)) }),
|
|
102
|
-
|
|
93
|
+
n && f && /* @__PURE__ */ e("div", { className: "my-4 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
103
94
|
"a",
|
|
104
95
|
{
|
|
105
|
-
href:
|
|
96
|
+
href: f,
|
|
106
97
|
className: "border-primary-500 text-primary-500 rounded-md border-2 p-3 font-semibold",
|
|
107
|
-
children:
|
|
98
|
+
children: n
|
|
108
99
|
}
|
|
109
100
|
) }),
|
|
110
101
|
a && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
|
|
@@ -131,5 +122,5 @@ const F = ({
|
|
|
131
122
|
] })
|
|
132
123
|
] });
|
|
133
124
|
export {
|
|
134
|
-
|
|
125
|
+
T as Header
|
|
135
126
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as r, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
const l = (e) => e.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), m = ({ text: e, highlight: t }) => {
|
|
4
|
+
if (!t.trim())
|
|
5
|
+
return /* @__PURE__ */ r(s, { children: e });
|
|
6
|
+
const c = new RegExp(`(${l(t)})`, "gi"), a = e.split(c);
|
|
7
|
+
return /* @__PURE__ */ r(s, { children: a.map(
|
|
8
|
+
(n, o) => n.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ r("strong", { className: "font-bold", children: n }, `${String(o)}-bold`) : /* @__PURE__ */ r(i.Fragment, { children: n }, `${String(o)}-text`)
|
|
9
|
+
) });
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
m as HighlightedText
|
|
13
|
+
};
|