@npm_leadtech/legal-contracts-ui 0.13.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.
Files changed (36) hide show
  1. package/dist/components/Anchor.d.ts +4 -0
  2. package/dist/components/Anchor.js +13 -0
  3. package/dist/components/Badge.js +3 -3
  4. package/dist/components/Blockquote.d.ts +4 -0
  5. package/dist/components/Blockquote.js +5 -0
  6. package/dist/components/Code.d.ts +4 -0
  7. package/dist/components/Code.js +5 -0
  8. package/dist/components/Header.d.ts +19 -0
  9. package/dist/components/Header.js +33 -42
  10. package/dist/components/Header1.d.ts +4 -0
  11. package/dist/components/Header1.js +5 -0
  12. package/dist/components/Header2.d.ts +4 -0
  13. package/dist/components/Header2.js +5 -0
  14. package/dist/components/Header3.d.ts +4 -0
  15. package/dist/components/Header3.js +5 -0
  16. package/dist/components/Header4.d.ts +4 -0
  17. package/dist/components/Header4.js +5 -0
  18. package/dist/components/HighlightedText.d.ts +7 -0
  19. package/dist/components/HighlightedText.js +13 -0
  20. package/dist/components/Markdown.d.ts +9 -0
  21. package/dist/components/Markdown.js +7856 -0
  22. package/dist/components/OrderedList.d.ts +4 -0
  23. package/dist/components/OrderedList.js +5 -0
  24. package/dist/components/Paragraph.d.ts +4 -0
  25. package/dist/components/Paragraph.js +5 -0
  26. package/dist/components/SearchBar.d.ts +19 -2
  27. package/dist/components/SearchBar.js +120 -5
  28. package/dist/components/Table.d.ts +4 -0
  29. package/dist/components/Table.js +5 -0
  30. package/dist/components/UnorderedList.d.ts +4 -0
  31. package/dist/components/UnorderedList.js +5 -0
  32. package/dist/components/Video.d.ts +4 -0
  33. package/dist/components/Video.js +5 -0
  34. package/dist/components/index.d.ts +32 -1
  35. package/dist/globals.css +1 -1
  36. package/package.json +28 -26
@@ -0,0 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Anchor: ({ children, className }: React.ComponentProps<"a">) => JSX.Element;
4
+
@@ -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
+ };
@@ -1,10 +1,10 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
- const s = ({ children: t, color: e = "secondary" }) => /* @__PURE__ */ r(
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-${e}-200 text-small px-2 py-2 text-neutral-800 shadow-md`,
7
- children: t
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,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Blockquote: ({ children }: React.ComponentProps<"blockquote">) => JSX.Element;
4
+
@@ -0,0 +1,5 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ const e = ({ children: o }) => /* @__PURE__ */ r("blockquote", { className: "my-4 border-l-4 border-gray-300 pl-4 text-gray-700 italic", children: o });
3
+ export {
4
+ e as Blockquote
5
+ };
@@ -0,0 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Code: ({ children, className }: React.ComponentProps<"code">) => JSX.Element;
4
+
@@ -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 {
@@ -23,6 +24,7 @@ export declare interface HeaderProps {
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 b, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as l, Fragment as N, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { NavMenu as N } from "./NavMenu.js";
4
- import { LanguageSelector as y } from "./LanguageSelector.js";
5
- import { HamburgerIcon as v } from "./HamburgerIcon.js";
6
- import { CloseIcon as g } from "./CloseIcon.js";
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 { SearchIcon as h } from "./SearchIcon.js";
9
- const F = ({
8
+ import { CloseIcon as k } from "./CloseIcon.js";
9
+ const T = ({
10
10
  logo: c,
11
- navMenu: f,
11
+ navMenu: x,
12
12
  languageSelectorProps: s,
13
- isMobileMenuOpen: n,
14
- onOpenMobileMenu: x,
13
+ isMobileMenuOpen: d,
14
+ onOpenMobileMenu: o,
15
15
  onCloseMobileMenu: t,
16
- mobileMenuSections: o = [],
16
+ mobileMenuSections: u = [],
17
17
  mobileContactInfo: a,
18
- userActions: d,
19
- seeAllDocumentsLabel: m,
20
- seeAllDocumentsHref: p
21
- }) => /* @__PURE__ */ l(b, { children: [
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(N, { ...f }) })
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("button", { "aria-label": "Search", className: "cursor-pointer p-2", children: /* @__PURE__ */ e(h, {}) }),
29
- /* @__PURE__ */ e("div", { className: "hidden xl:block", children: s && /* @__PURE__ */ e(y, { ...s }) }),
30
- d
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: x,
37
+ onClick: o,
37
38
  "aria-label": "Open menu",
38
- "aria-expanded": n,
39
- children: /* @__PURE__ */ e(v, {})
39
+ "aria-expanded": d,
40
+ children: /* @__PURE__ */ e(g, {})
40
41
  }
41
42
  )
42
43
  ] }) }),
43
- n && /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white lg:hidden", children: [
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(g, {})
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: d }),
58
- /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3 rounded-sm border border-neutral-200 bg-white px-4 py-3", children: [
59
- /* @__PURE__ */ e(h, { fill: "var(--neutral-500)" }),
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 ?? u
91
+ r.title ?? b
101
92
  )) }),
102
- m && p && /* @__PURE__ */ e("div", { className: "my-4 flex items-center justify-center", children: /* @__PURE__ */ e(
93
+ n && f && /* @__PURE__ */ e("div", { className: "my-4 flex items-center justify-center", children: /* @__PURE__ */ e(
103
94
  "a",
104
95
  {
105
- href: p,
96
+ href: f,
106
97
  className: "border-primary-500 text-primary-500 rounded-md border-2 p-3 font-semibold",
107
- children: m
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
- F as Header
125
+ T as Header
135
126
  };
@@ -0,0 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Header1: ({ children }: React.ComponentProps<"h1">) => JSX.Element;
4
+
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const m = ({ children: t }) => /* @__PURE__ */ e("h1", { className: "mt-6 mb-4 text-4xl font-bold text-gray-900", children: t });
3
+ export {
4
+ m as Header1
5
+ };
@@ -0,0 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Header2: ({ children }: React.ComponentProps<"h2">) => JSX.Element;
4
+
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const m = ({ children: t }) => /* @__PURE__ */ e("h2", { className: "mt-5 mb-3 text-3xl font-bold text-gray-900", children: t });
3
+ export {
4
+ m as Header2
5
+ };
@@ -0,0 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Header3: ({ children }: React.ComponentProps<"h3">) => JSX.Element;
4
+
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const o = ({ children: t }) => /* @__PURE__ */ e("h3", { className: "mt-4 mb-2 text-2xl font-semibold text-gray-900", children: t });
3
+ export {
4
+ o as Header3
5
+ };
@@ -0,0 +1,4 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Header4: ({ children }: React.ComponentProps<"h4">) => JSX.Element;
4
+
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const o = ({ children: t }) => /* @__PURE__ */ e("h4", { className: "mt-3 mb-2 text-xl font-semibold text-gray-900", children: t });
3
+ export {
4
+ o as Header4
5
+ };
@@ -0,0 +1,7 @@
1
+ import * as React_2 from 'react';
2
+
3
+ export declare const HighlightedText: React_2.FC<{
4
+ text: string;
5
+ highlight: string;
6
+ }>;
7
+
@@ -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
+ };
@@ -0,0 +1,9 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const Markdown: default_2.FC<MarkdownProps>;
4
+
5
+ export declare interface MarkdownProps {
6
+ content: string;
7
+ className: string;
8
+ }
9
+