@npm_leadtech/legal-contracts-ui 0.52.8 → 0.52.10
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/Header.d.ts +15 -9
- package/dist/components/MobileMenu.d.ts +2 -2
- package/dist/components/MobileMenu.js +31 -31
- package/dist/components/NavMenu.d.ts +13 -7
- package/dist/components/NavMenu.js +1 -1
- package/dist/components/NavMenuItem.d.ts +13 -7
- package/dist/components/NavMenuItem.js +42 -43
- package/dist/components/index.d.ts +852 -0
- package/dist/globals.css +1 -1
- package/dist/node_modules/.pnpm/hast-util-raw@9.1.0/node_modules/hast-util-raw/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.js +1 -1
- package/package.json +1 -1
- /package/dist/node_modules/.pnpm/{unist-util-visit@5.0.0 → unist-util-visit@5.1.0}/node_modules/unist-util-visit/lib/index.js +0 -0
|
@@ -52,26 +52,32 @@ export interface MobileMenuSection {
|
|
|
52
52
|
title?: string;
|
|
53
53
|
icon: ReactNode | null;
|
|
54
54
|
items?: {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
id: string;
|
|
56
|
+
link: ReactNode;
|
|
57
57
|
}[];
|
|
58
58
|
seeAll?: ReactNode | null;
|
|
59
59
|
content?: ReactNode | null;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export
|
|
62
|
+
export type NavMenuItemProps = {
|
|
63
|
+
id: string;
|
|
63
64
|
label: string;
|
|
64
|
-
|
|
65
|
-
hasDropdown
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
66
|
+
hasDropdown: true;
|
|
67
|
+
isNested?: boolean;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type NavMenuLink = {
|
|
71
|
+
id: string;
|
|
72
|
+
link: ReactNode;
|
|
68
73
|
tag?: string;
|
|
74
|
+
hasDropdown: false;
|
|
69
75
|
isNested?: boolean;
|
|
70
76
|
bold?: boolean;
|
|
71
|
-
}
|
|
77
|
+
};
|
|
72
78
|
|
|
73
79
|
export interface NavMenuProps {
|
|
74
|
-
navItems: NavMenuItemProps[];
|
|
80
|
+
navItems: (NavMenuItemProps | NavMenuLink)[];
|
|
75
81
|
className?: string;
|
|
76
82
|
}
|
|
77
83
|
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { SearchBar as
|
|
4
|
-
import { PhoneTalkIcon as
|
|
5
|
-
import { CloseIcon as
|
|
3
|
+
import { SearchBar as u } from "./SearchBar.js";
|
|
4
|
+
import { PhoneTalkIcon as x } from "./PhoneTalkIcon.js";
|
|
5
|
+
import { CloseIcon as f } from "./CloseIcon.js";
|
|
6
6
|
const y = ({
|
|
7
|
-
isOpen:
|
|
8
|
-
onClose:
|
|
7
|
+
isOpen: n,
|
|
8
|
+
onClose: m,
|
|
9
9
|
logo: c,
|
|
10
10
|
userActions: d,
|
|
11
|
-
searchBarProps:
|
|
12
|
-
sections:
|
|
11
|
+
searchBarProps: o,
|
|
12
|
+
sections: p = [],
|
|
13
13
|
contactInfo: t
|
|
14
|
-
}) =>
|
|
15
|
-
/* @__PURE__ */
|
|
14
|
+
}) => n ? /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white text-neutral-800 lg:hidden", children: [
|
|
15
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
16
16
|
c,
|
|
17
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ r(
|
|
18
18
|
"button",
|
|
19
19
|
{
|
|
20
20
|
className: "flex cursor-pointer items-center justify-center p-2",
|
|
21
|
-
onClick:
|
|
21
|
+
onClick: m,
|
|
22
22
|
"aria-label": "Close menu",
|
|
23
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ r(f, {})
|
|
24
24
|
}
|
|
25
25
|
)
|
|
26
26
|
] }),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
|
|
28
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-6", children: [
|
|
29
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: d }),
|
|
30
|
+
/* @__PURE__ */ r(u, { ...o })
|
|
31
31
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ r("nav", { className: "flex flex-col gap-0", children: p.map((e, i) => {
|
|
33
33
|
const a = e.icon != null;
|
|
34
|
-
return e.content != null ? /* @__PURE__ */
|
|
34
|
+
return e.content != null ? /* @__PURE__ */ r("div", { className: "flex items-center px-6 pb-8", children: e.content }, e.id ?? `custom-${i.toString()}`) : /* @__PURE__ */ l(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
className: e.title !== "" && !a ? "border-t border-b border-neutral-200 pt-4" : "",
|
|
38
38
|
children: [
|
|
39
|
-
e.title && /* @__PURE__ */
|
|
40
|
-
e.icon != null && /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
39
|
+
e.title && /* @__PURE__ */ l("div", { className: `flex items-center gap-2 px-6 ${a ? "bg-neutral-50 py-4" : ""}`, children: [
|
|
40
|
+
e.icon != null && /* @__PURE__ */ r("span", { className: "text-primary-700", children: e.icon }),
|
|
41
|
+
/* @__PURE__ */ r("h4", { className: "text-medium font-semibold", children: e.title })
|
|
42
42
|
] }),
|
|
43
|
-
e.items != null && /* @__PURE__ */
|
|
44
|
-
e.items.map((
|
|
45
|
-
e.seeAll != null && /* @__PURE__ */
|
|
43
|
+
e.items != null && /* @__PURE__ */ l("ul", { className: `flex flex-col gap-4 ${a ? "p-6" : "px-6 py-4"}`, children: [
|
|
44
|
+
e.items.map((s) => /* @__PURE__ */ r("li", { className: "text-medium", children: s.link }, s.id)),
|
|
45
|
+
e.seeAll != null && /* @__PURE__ */ r("li", { className: "font-semibold", children: e.seeAll })
|
|
46
46
|
] })
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
|
-
e.id ?? e.title ??
|
|
49
|
+
e.id ?? e.title ?? i.toString()
|
|
50
50
|
);
|
|
51
51
|
}) }),
|
|
52
|
-
t && /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
52
|
+
t && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
|
|
53
|
+
/* @__PURE__ */ l(
|
|
54
54
|
"a",
|
|
55
55
|
{
|
|
56
56
|
href: `tel:${t.phoneNumber.replaceAll(" ", "")}`,
|
|
57
57
|
className: "bg-primary-700 flex w-full items-center justify-center gap-2 rounded-md p-3 text-base font-semibold text-white",
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ r(x, { fill: "#ffff" }),
|
|
60
60
|
t.phoneNumber
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
t.contactHours && /* @__PURE__ */
|
|
65
|
-
t.contactHoursLabel != null && /* @__PURE__ */
|
|
64
|
+
t.contactHours && /* @__PURE__ */ l("p", { className: "text-small mt-4 text-base text-neutral-500", children: [
|
|
65
|
+
t.contactHoursLabel != null && /* @__PURE__ */ l("span", { children: [
|
|
66
66
|
t.contactHoursLabel,
|
|
67
67
|
" "
|
|
68
68
|
] }),
|
|
@@ -3,19 +3,25 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export declare const NavMenu: FC<NavMenuProps>;
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export type NavMenuItemProps = {
|
|
7
|
+
id: string;
|
|
7
8
|
label: string;
|
|
8
|
-
|
|
9
|
-
hasDropdown
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
10
|
+
hasDropdown: true;
|
|
11
|
+
isNested?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type NavMenuLink = {
|
|
15
|
+
id: string;
|
|
16
|
+
link: ReactNode;
|
|
12
17
|
tag?: string;
|
|
18
|
+
hasDropdown: false;
|
|
13
19
|
isNested?: boolean;
|
|
14
20
|
bold?: boolean;
|
|
15
|
-
}
|
|
21
|
+
};
|
|
16
22
|
|
|
17
23
|
export declare interface NavMenuProps {
|
|
18
|
-
navItems: NavMenuItemProps[];
|
|
24
|
+
navItems: (NavMenuItemProps | NavMenuLink)[];
|
|
19
25
|
className?: string;
|
|
20
26
|
}
|
|
21
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { NavMenuItem as a } from "./NavMenuItem.js";
|
|
4
|
-
const o = ({ navItems: m, className: t = "" }) => /* @__PURE__ */ e("nav", { className: t, children: /* @__PURE__ */ e("ul", { className: "text-medium flex flex-wrap items-center gap-4 xl:gap-8", children: m.map((r) => /* @__PURE__ */ e(a, { ...r }, r.
|
|
4
|
+
const o = ({ navItems: m, className: t = "" }) => /* @__PURE__ */ e("nav", { className: t, children: /* @__PURE__ */ e("ul", { className: "text-medium flex flex-wrap items-center gap-4 xl:gap-8", children: m.map((r) => /* @__PURE__ */ e(a, { ...r }, r.id)) }) });
|
|
5
5
|
export {
|
|
6
6
|
o as NavMenu
|
|
7
7
|
};
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
export declare const NavMenuItem: FC<NavMenuItemProps>;
|
|
4
|
+
export declare const NavMenuItem: FC<NavMenuItemProps | NavMenuLink>;
|
|
5
5
|
|
|
6
|
-
export declare
|
|
6
|
+
export declare type NavMenuItemProps = {
|
|
7
|
+
id: string;
|
|
7
8
|
label: string;
|
|
8
|
-
|
|
9
|
-
hasDropdown
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
dropdownItems: (NavMenuItemProps | NavMenuLink)[];
|
|
10
|
+
hasDropdown: true;
|
|
11
|
+
isNested?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare type NavMenuLink = {
|
|
15
|
+
id: string;
|
|
16
|
+
link: ReactNode;
|
|
12
17
|
tag?: string;
|
|
18
|
+
hasDropdown: false;
|
|
13
19
|
isNested?: boolean;
|
|
14
20
|
bold?: boolean;
|
|
15
|
-
}
|
|
21
|
+
};
|
|
16
22
|
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { ChevronDownIcon as
|
|
4
|
-
import { ChevronRightIcon as
|
|
5
|
-
const h = ({
|
|
6
|
-
|
|
7
|
-
href: c,
|
|
8
|
-
dropdownItems: r,
|
|
9
|
-
tag: i,
|
|
10
|
-
hasDropdown: e = !1,
|
|
11
|
-
isNested: d = !1,
|
|
12
|
-
bold: p = !1
|
|
13
|
-
}) => {
|
|
14
|
-
const u = e && r != null && r.length > 0, g = e ? "span" : "a", s = {
|
|
3
|
+
import { ChevronDownIcon as g } from "./ChevronDownIcon.js";
|
|
4
|
+
import { ChevronRightIcon as f } from "./ChevronRightIcon.js";
|
|
5
|
+
const h = (o) => {
|
|
6
|
+
const { hasDropdown: a, isNested: i } = o, n = {
|
|
15
7
|
topLevel: {
|
|
16
8
|
liClass: "group relative py-2",
|
|
17
9
|
triggerClass: "hover:text-neutral-600",
|
|
18
10
|
dropdownPosition: "top-full left-0",
|
|
19
11
|
dropdownTrigger: "group-hover:pointer-events-auto group-hover:opacity-100",
|
|
20
|
-
Icon:
|
|
12
|
+
Icon: g,
|
|
21
13
|
iconClass: "transition-transform duration-200 group-hover:rotate-180"
|
|
22
14
|
},
|
|
23
15
|
nested: {
|
|
@@ -25,37 +17,44 @@ const h = ({
|
|
|
25
17
|
triggerClass: "p-1 hover:bg-primary-100 w-full rounded",
|
|
26
18
|
dropdownPosition: "top-0 left-full -mt-4 pl-6",
|
|
27
19
|
dropdownTrigger: "group-hover/nested:pointer-events-auto group-hover/nested:opacity-100",
|
|
28
|
-
Icon:
|
|
20
|
+
Icon: f,
|
|
29
21
|
iconClass: ""
|
|
30
22
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
23
|
+
}, t = i ? n.nested : n.topLevel, d = t.Icon;
|
|
24
|
+
if (a) {
|
|
25
|
+
const { dropdownItems: u, label: m } = o;
|
|
26
|
+
return /* @__PURE__ */ r("li", { className: `${t.liClass} `, children: [
|
|
27
|
+
/* @__PURE__ */ r(
|
|
28
|
+
"button",
|
|
29
|
+
{
|
|
30
|
+
className: `text-small flex w-full cursor-pointer items-center justify-between gap-1 font-medium text-nowrap text-neutral-800 transition-colors ${t.triggerClass} `,
|
|
31
|
+
"aria-haspopup": "menu",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ e("span", { className: "text-medium", children: m }),
|
|
34
|
+
/* @__PURE__ */ e(d, { className: t.iconClass, fill: "#000", width: 20, height: 20 })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ e(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: `pointer-events-none absolute z-50 min-w-48 opacity-0 transition-opacity duration-200 ${t.dropdownPosition} ${t.dropdownTrigger} `,
|
|
42
|
+
children: /* @__PURE__ */ e("div", { className: "rounded-md border border-neutral-200 bg-white p-4 shadow-lg", children: /* @__PURE__ */ e("ul", { className: "flex flex-col gap-2", children: u.map((l) => /* @__PURE__ */ e(h, { ...l, isNested: !0 }, l.id)) }) })
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
47
|
+
const { link: c, tag: s, bold: p } = o;
|
|
48
|
+
return /* @__PURE__ */ e("li", { className: `${t.liClass} `, children: /* @__PURE__ */ r(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
className: `text-small relative flex w-full items-center justify-between gap-1 font-medium text-nowrap text-neutral-800 transition-colors ${t.triggerClass} `,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ e("span", { className: `text-medium flex-1 ${p ? "font-bold" : ""} [&_a]:after:absolute [&_a]:after:inset-0`, children: c }),
|
|
54
|
+
s && /* @__PURE__ */ e("span", { className: "bg-secondary-200 text-extra-small rounded px-1 font-bold", children: s })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
59
58
|
};
|
|
60
59
|
export {
|
|
61
60
|
h as NavMenuItem
|