@npm_leadtech/legal-contracts-ui 0.53.4 → 0.53.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/Footer.js +19 -17
- package/dist/components/Header.d.ts +20 -45
- package/dist/components/Header.js +98 -30
- package/dist/components/NavMenu.d.ts +7 -21
- package/dist/components/NavMenu.js +5 -19
- package/dist/components/NavMenuItem.d.ts +7 -20
- package/dist/components/NavMenuItem.js +49 -93
- package/dist/components/PhoneButton.d.ts +9 -0
- package/dist/components/PhoneButton.js +16 -0
- package/dist/components/PhoneIcon.d.ts +8 -0
- package/dist/components/PhoneIcon.js +16 -0
- package/dist/components/SearchBar.js +1 -1
- 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 +9 -9
- package/dist/components/MobileMenu.d.ts +0 -55
- package/dist/components/MobileMenu.js +0 -84
- package/dist/components/ScalatorIcon.d.ts +0 -5
- package/dist/components/ScalatorIcon.js +0 -12
- package/dist/components/index.d.ts +0 -863
- /package/dist/node_modules/.pnpm/{unist-util-visit@5.1.0 → unist-util-visit@5.0.0}/node_modules/unist-util-visit/lib/index.js +0 -0
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { PhoneButton as o } from "./PhoneButton.js";
|
|
4
|
+
import { FooterNav as h } from "./FooterNav.js";
|
|
5
|
+
const v = ({
|
|
6
|
+
nav: r,
|
|
6
7
|
contactInfo: t,
|
|
7
|
-
logoGray:
|
|
8
|
-
socialLinks:
|
|
9
|
-
legalLinks:
|
|
10
|
-
disclaimerText:
|
|
8
|
+
logoGray: i,
|
|
9
|
+
socialLinks: d,
|
|
10
|
+
legalLinks: c,
|
|
11
|
+
disclaimerText: x,
|
|
11
12
|
copyrightText: n,
|
|
12
13
|
trustPilotWidget: s,
|
|
13
|
-
languageSelector:
|
|
14
|
+
languageSelector: m
|
|
14
15
|
}) => /* @__PURE__ */ l("footer", { className: "text-neutral-25", children: [
|
|
15
16
|
/* @__PURE__ */ e("div", { className: "bg-primary-900", children: /* @__PURE__ */ l("div", { className: "mx-auto flex w-full max-w-300 flex-col items-start gap-8 px-6 py-10 md:grid md:grid-cols-3 lg:flex lg:flex-row lg:justify-between", children: [
|
|
16
|
-
|
|
17
|
+
r.map((a) => /* @__PURE__ */ e(h, { ...a }, a.title)),
|
|
17
18
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-6 max-sm:w-full md:contents lg:flex", children: [
|
|
18
19
|
/* @__PURE__ */ l("div", { className: "", children: [
|
|
19
|
-
/* @__PURE__ */ e("div", { className: "mb-4 xl:hidden", children: !!
|
|
20
|
+
/* @__PURE__ */ e("div", { className: "mb-4 xl:hidden", children: !!m && /* @__PURE__ */ e("div", { className: "language-selector-mobile-container", children: m }) }),
|
|
20
21
|
/* @__PURE__ */ l("div", { children: [
|
|
21
|
-
/* @__PURE__ */ e("p", { className: "text-small font-bold text-white", children: t.phoneNumber }),
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ e("p", { className: "text-small hidden font-bold text-white sm:block", children: t.phoneNumber }),
|
|
23
|
+
/* @__PURE__ */ e("div", { className: "mb-2 w-full text-center sm:hidden", children: /* @__PURE__ */ e(o, { phoneNumber: t.phoneNumber }) }),
|
|
24
|
+
/* @__PURE__ */ l("p", { className: "text-neutral-25 text-medium md:text-small text-center md:text-left", children: [
|
|
23
25
|
t.contactHoursText,
|
|
24
26
|
" ",
|
|
25
27
|
t.contactHours
|
|
@@ -31,15 +33,15 @@ const N = ({
|
|
|
31
33
|
] }) }),
|
|
32
34
|
/* @__PURE__ */ e("div", { className: "bg-neutral-900 px-6 py-8 text-neutral-400", children: /* @__PURE__ */ l("div", { className: "mx-auto flex w-full max-w-300 flex-col gap-6", children: [
|
|
33
35
|
/* @__PURE__ */ l("div", { className: "flex flex-col items-start gap-6 md:flex-row md:justify-between", children: [
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "flex gap-4", children:
|
|
36
|
+
i,
|
|
37
|
+
/* @__PURE__ */ e("div", { className: "flex gap-4", children: d?.map((a) => a) })
|
|
36
38
|
] }),
|
|
37
39
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-600" }),
|
|
38
|
-
/* @__PURE__ */ e("div", { className: "text-extra-small flex flex-wrap gap-4", children:
|
|
39
|
-
/* @__PURE__ */ e("p", { className: "text-extra-small text-neutral-400", children:
|
|
40
|
+
/* @__PURE__ */ e("div", { className: "text-extra-small flex flex-wrap gap-4", children: c?.map((a) => a) }),
|
|
41
|
+
/* @__PURE__ */ e("p", { className: "text-extra-small text-neutral-400", children: x }),
|
|
40
42
|
/* @__PURE__ */ e("p", { className: "text-extra-small text-neutral-400", children: n })
|
|
41
43
|
] }) })
|
|
42
44
|
] });
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
v as Footer
|
|
45
47
|
};
|
|
@@ -14,10 +14,15 @@ export declare const Header: FC<HeaderProps>;
|
|
|
14
14
|
export declare interface HeaderProps {
|
|
15
15
|
logo: ReactNode;
|
|
16
16
|
navMenu: NavMenuProps;
|
|
17
|
+
seeAll: ReactNode;
|
|
17
18
|
searchBarProps: SearchBarProps;
|
|
18
19
|
languageSelectorProps?: LanguageSelectorProps;
|
|
19
20
|
userActions: ReactNode;
|
|
20
|
-
|
|
21
|
+
isMobileMenuOpen?: boolean;
|
|
22
|
+
onOpenMobileMenu?: () => void;
|
|
23
|
+
onCloseMobileMenu?: () => void;
|
|
24
|
+
mobileMenuSections?: MobileMenuSection[];
|
|
25
|
+
mobileContactInfo?: MobileContactInfo;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
export interface LanguageSelectorProps {
|
|
@@ -30,64 +35,34 @@ export interface LanguageSelectorProps {
|
|
|
30
35
|
|
|
31
36
|
export type LanguageSelectorVariant = 'default' | 'compact';
|
|
32
37
|
|
|
33
|
-
export interface MobileContactInfo {
|
|
38
|
+
export declare interface MobileContactInfo {
|
|
34
39
|
phoneNumber: string;
|
|
35
40
|
contactHoursLabel?: string;
|
|
36
41
|
contactHours?: string;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
|
-
export interface
|
|
40
|
-
isOpen: boolean;
|
|
41
|
-
onOpen: () => void;
|
|
42
|
-
onClose: () => void;
|
|
43
|
-
logo: ReactNode;
|
|
44
|
-
userActions: ReactNode;
|
|
45
|
-
searchBarProps: SearchBarProps;
|
|
46
|
-
sections?: MobileMenuSection[];
|
|
47
|
-
contactInfo?: MobileContactInfo;
|
|
48
|
-
openText: string;
|
|
49
|
-
closeText: string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface MobileMenuSection {
|
|
53
|
-
id?: string;
|
|
44
|
+
export declare interface MobileMenuSection {
|
|
54
45
|
title?: string;
|
|
55
|
-
icon
|
|
56
|
-
items
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
tag?: string;
|
|
46
|
+
icon?: ReactNode;
|
|
47
|
+
items: {
|
|
48
|
+
label: string;
|
|
49
|
+
href?: string;
|
|
60
50
|
}[];
|
|
61
|
-
seeAll?: ReactNode
|
|
62
|
-
content?: ReactNode | null;
|
|
51
|
+
seeAll?: ReactNode;
|
|
63
52
|
}
|
|
64
53
|
|
|
65
|
-
export
|
|
66
|
-
id: string;
|
|
54
|
+
export interface NavMenuItemProps {
|
|
67
55
|
label: string;
|
|
68
|
-
|
|
69
|
-
hasDropdown
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
isOpen?: boolean;
|
|
73
|
-
onToggle?: (open: boolean) => void;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export type NavMenuLink = {
|
|
77
|
-
id: string;
|
|
78
|
-
link: ReactNode;
|
|
56
|
+
href?: string;
|
|
57
|
+
hasDropdown?: boolean;
|
|
58
|
+
dropdownItems?: NavMenuItemProps[];
|
|
59
|
+
dropdownContent?: ReactNode;
|
|
79
60
|
tag?: string;
|
|
80
|
-
hasDropdown: false;
|
|
81
61
|
isNested?: boolean;
|
|
82
|
-
|
|
83
|
-
onItemClick?: () => void;
|
|
84
|
-
isOpen?: boolean;
|
|
85
|
-
onToggle?: (open: boolean) => void;
|
|
86
|
-
};
|
|
62
|
+
}
|
|
87
63
|
|
|
88
64
|
export interface NavMenuProps {
|
|
89
|
-
navItems:
|
|
90
|
-
className?: string;
|
|
65
|
+
navItems: NavMenuItemProps[];
|
|
91
66
|
}
|
|
92
67
|
|
|
93
68
|
export interface SearchBarProps {
|
|
@@ -1,44 +1,112 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { LanguageSelector as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { NavMenu as b } from "./NavMenu.js";
|
|
4
|
+
import { SearchBar as x } from "./SearchBar.js";
|
|
5
|
+
import { LanguageSelector as v } from "./LanguageSelector.js";
|
|
6
|
+
import { HamburgerIcon as y } from "./HamburgerIcon.js";
|
|
7
|
+
import { PhoneTalkIcon as g } from "./PhoneTalkIcon.js";
|
|
8
|
+
import { CloseIcon as j } from "./CloseIcon.js";
|
|
9
|
+
const S = ({
|
|
10
|
+
logo: i,
|
|
11
|
+
navMenu: p,
|
|
12
|
+
seeAll: f,
|
|
13
|
+
searchBarProps: c,
|
|
14
|
+
languageSelectorProps: s,
|
|
13
15
|
userActions: n,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
isMobileMenuOpen: d,
|
|
17
|
+
onOpenMobileMenu: h,
|
|
18
|
+
onCloseMobileMenu: m,
|
|
19
|
+
mobileMenuSections: o = [],
|
|
20
|
+
mobileContactInfo: a
|
|
21
|
+
}) => /* @__PURE__ */ l(N, { children: [
|
|
22
|
+
/* @__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
|
+
/* @__PURE__ */ l("div", { className: "flex flex-1 items-center gap-8", children: [
|
|
24
|
+
i,
|
|
25
|
+
/* @__PURE__ */ e("div", { className: "hidden lg:block", children: /* @__PURE__ */ e(b, { ...p }) })
|
|
20
26
|
] }),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ e(
|
|
23
|
-
|
|
27
|
+
/* @__PURE__ */ l("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
|
|
28
|
+
/* @__PURE__ */ e(x, { ...c }),
|
|
29
|
+
s && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(v, { ...s }) }),
|
|
24
30
|
n
|
|
25
31
|
] }),
|
|
26
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ e(
|
|
27
33
|
"button",
|
|
28
34
|
{
|
|
29
|
-
className: "
|
|
30
|
-
onClick:
|
|
35
|
+
className: "flex cursor-pointer items-center justify-center p-2 lg:hidden",
|
|
36
|
+
onClick: h,
|
|
31
37
|
"aria-label": "Open menu",
|
|
32
|
-
"aria-expanded":
|
|
33
|
-
children:
|
|
34
|
-
t.openText,
|
|
35
|
-
/* @__PURE__ */ e(x, {})
|
|
36
|
-
]
|
|
38
|
+
"aria-expanded": d,
|
|
39
|
+
children: /* @__PURE__ */ e(y, {})
|
|
37
40
|
}
|
|
38
41
|
)
|
|
39
42
|
] }) }),
|
|
40
|
-
/* @__PURE__ */
|
|
43
|
+
d && /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white lg:hidden", children: [
|
|
44
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
45
|
+
i,
|
|
46
|
+
/* @__PURE__ */ e(
|
|
47
|
+
"button",
|
|
48
|
+
{
|
|
49
|
+
className: "flex cursor-pointer items-center justify-center p-2",
|
|
50
|
+
onClick: m,
|
|
51
|
+
"aria-label": "Close menu",
|
|
52
|
+
children: /* @__PURE__ */ e(j, {})
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
|
|
57
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-6", children: [
|
|
58
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-4", children: n }),
|
|
59
|
+
/* @__PURE__ */ e(x, { ...c })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ e("nav", { className: "flex-1", children: o.map((r, u) => /* @__PURE__ */ l(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: `py-4 ${r.icon == null && r.title ? "border-t border-b border-neutral-200" : ""}`,
|
|
65
|
+
children: [
|
|
66
|
+
r.title && /* @__PURE__ */ l("div", { className: `flex items-start px-6 ${r.icon == null ? "py-2" : "bg-neutral-50 py-4"}`, children: [
|
|
67
|
+
r.icon !== null && /* @__PURE__ */ e("span", { className: "text-primary-700 mr-4", children: r.icon }),
|
|
68
|
+
/* @__PURE__ */ e("h4", { className: "text-base font-semibold text-neutral-800", children: r.title })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ l("div", { className: "", children: [
|
|
71
|
+
/* @__PURE__ */ e("ul", { className: "mt-3 flex flex-col", children: r.items.map((t) => /* @__PURE__ */ e("li", { className: "hover:bg-primary-100 py-3 pl-6", children: /* @__PURE__ */ e(
|
|
72
|
+
"a",
|
|
73
|
+
{
|
|
74
|
+
href: t.href ?? "#",
|
|
75
|
+
className: "hover:text-primary-700 text-base transition-colors",
|
|
76
|
+
onClick: m,
|
|
77
|
+
children: t.label
|
|
78
|
+
}
|
|
79
|
+
) }, t.label)) }),
|
|
80
|
+
r.seeAll
|
|
81
|
+
] })
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
r.title ?? u
|
|
85
|
+
)) }),
|
|
86
|
+
/* @__PURE__ */ e("div", { className: "my-4 flex items-center justify-center", children: f }),
|
|
87
|
+
a && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
|
|
88
|
+
/* @__PURE__ */ l(
|
|
89
|
+
"a",
|
|
90
|
+
{
|
|
91
|
+
href: `tel:${a.phoneNumber.replaceAll(" ", "")}`,
|
|
92
|
+
className: "bg-primary-700 flex w-full items-center justify-center gap-2 rounded-md p-3 text-base font-semibold text-white",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ e(g, { fill: "#ffff" }),
|
|
95
|
+
a.phoneNumber
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
a.contactHours && /* @__PURE__ */ l("p", { className: "text-small mt-4 text-base text-neutral-500", children: [
|
|
100
|
+
a.contactHoursLabel != null && /* @__PURE__ */ l("span", { children: [
|
|
101
|
+
a.contactHoursLabel,
|
|
102
|
+
" "
|
|
103
|
+
] }),
|
|
104
|
+
a.contactHours
|
|
105
|
+
] })
|
|
106
|
+
] })
|
|
107
|
+
] })
|
|
108
|
+
] })
|
|
41
109
|
] });
|
|
42
110
|
export {
|
|
43
|
-
|
|
111
|
+
S as Header
|
|
44
112
|
};
|
|
@@ -3,31 +3,17 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export declare const NavMenu: FC<NavMenuProps>;
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
id: string;
|
|
6
|
+
export interface NavMenuItemProps {
|
|
8
7
|
label: string;
|
|
9
|
-
|
|
10
|
-
hasDropdown
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isOpen?: boolean;
|
|
14
|
-
onToggle?: (open: boolean) => void;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type NavMenuLink = {
|
|
18
|
-
id: string;
|
|
19
|
-
link: ReactNode;
|
|
8
|
+
href?: string;
|
|
9
|
+
hasDropdown?: boolean;
|
|
10
|
+
dropdownItems?: NavMenuItemProps[];
|
|
11
|
+
dropdownContent?: ReactNode;
|
|
20
12
|
tag?: string;
|
|
21
|
-
hasDropdown: false;
|
|
22
13
|
isNested?: boolean;
|
|
23
|
-
|
|
24
|
-
onItemClick?: () => void;
|
|
25
|
-
isOpen?: boolean;
|
|
26
|
-
onToggle?: (open: boolean) => void;
|
|
27
|
-
};
|
|
14
|
+
}
|
|
28
15
|
|
|
29
16
|
export declare interface NavMenuProps {
|
|
30
|
-
navItems:
|
|
31
|
-
className?: string;
|
|
17
|
+
navItems: NavMenuItemProps[];
|
|
32
18
|
}
|
|
33
19
|
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const c = ({ navItems: l, className: o = "" }) => {
|
|
6
|
-
const [t, i] = m(null);
|
|
7
|
-
return /* @__PURE__ */ r("nav", { className: o, children: /* @__PURE__ */ r("ul", { className: "text-medium flex flex-wrap items-center gap-4 xl:gap-8", children: l.map((e) => /* @__PURE__ */ r(
|
|
8
|
-
n,
|
|
9
|
-
{
|
|
10
|
-
...e,
|
|
11
|
-
isOpen: t === e.id,
|
|
12
|
-
onToggle: (p) => {
|
|
13
|
-
i(p ? e.id : null);
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
e.id
|
|
17
|
-
)) }) });
|
|
18
|
-
};
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { NavMenuItem as t } from "./NavMenuItem.js";
|
|
4
|
+
const o = ({ navItems: m }) => /* @__PURE__ */ e("nav", { children: /* @__PURE__ */ e("ul", { className: "text-medium flex flex-wrap items-center xl:gap-4", children: m.map((r) => /* @__PURE__ */ e(t, { ...r }, r.label)) }) });
|
|
19
5
|
export {
|
|
20
|
-
|
|
6
|
+
o as NavMenu
|
|
21
7
|
};
|
|
@@ -1,28 +1,15 @@
|
|
|
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>;
|
|
5
5
|
|
|
6
|
-
export declare
|
|
7
|
-
id: string;
|
|
6
|
+
export declare interface NavMenuItemProps {
|
|
8
7
|
label: string;
|
|
9
|
-
|
|
10
|
-
hasDropdown
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isOpen?: boolean;
|
|
14
|
-
onToggle?: (open: boolean) => void;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export declare type NavMenuLink = {
|
|
18
|
-
id: string;
|
|
19
|
-
link: ReactNode;
|
|
8
|
+
href?: string;
|
|
9
|
+
hasDropdown?: boolean;
|
|
10
|
+
dropdownItems?: NavMenuItemProps[];
|
|
11
|
+
dropdownContent?: ReactNode;
|
|
20
12
|
tag?: string;
|
|
21
|
-
hasDropdown: false;
|
|
22
13
|
isNested?: boolean;
|
|
23
|
-
|
|
24
|
-
onItemClick?: () => void;
|
|
25
|
-
isOpen?: boolean;
|
|
26
|
-
onToggle?: (open: boolean) => void;
|
|
27
|
-
};
|
|
14
|
+
}
|
|
28
15
|
|
|
@@ -1,104 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (!s) return;
|
|
15
|
-
const e = (c) => {
|
|
16
|
-
r.current && !r.current.contains(c.target) && n(!1);
|
|
17
|
-
};
|
|
18
|
-
return document.addEventListener("mousedown", e), () => {
|
|
19
|
-
document.removeEventListener("mousedown", e);
|
|
20
|
-
};
|
|
21
|
-
}, [s, n]);
|
|
22
|
-
const m = {
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ChevronDownIcon as m } from "./ChevronDownIcon.js";
|
|
4
|
+
import { ChevronRightIcon as f } from "./ChevronRightIcon.js";
|
|
5
|
+
const v = ({
|
|
6
|
+
label: a,
|
|
7
|
+
href: c,
|
|
8
|
+
hasDropdown: e = !1,
|
|
9
|
+
dropdownItems: r,
|
|
10
|
+
tag: l,
|
|
11
|
+
isNested: p = !1
|
|
12
|
+
}) => {
|
|
13
|
+
const d = e && r != null && r.length > 0, u = e ? "span" : "a", s = {
|
|
23
14
|
topLevel: {
|
|
24
|
-
liClass: "relative
|
|
25
|
-
triggerClass: "hover:text-neutral-600",
|
|
26
|
-
dropdownPosition: "top-full left-0",
|
|
27
|
-
|
|
15
|
+
liClass: "group relative flex items-center gap-1",
|
|
16
|
+
triggerClass: "lg:px-2 px-4 py-1 hover:text-neutral-600",
|
|
17
|
+
dropdownPosition: "top-full left-0 pt-2",
|
|
18
|
+
dropdownTrigger: "group-hover:pointer-events-auto group-hover:opacity-100",
|
|
19
|
+
Icon: m,
|
|
20
|
+
iconClass: "transition-transform duration-200 group-hover:rotate-180"
|
|
28
21
|
},
|
|
29
22
|
nested: {
|
|
30
|
-
liClass: "relative",
|
|
31
|
-
triggerClass: "
|
|
32
|
-
dropdownPosition: "top-0 left-full
|
|
33
|
-
|
|
23
|
+
liClass: "group/nested relative flex items-center gap-1",
|
|
24
|
+
triggerClass: "px-5 py-2 hover:bg-primary-100 w-full",
|
|
25
|
+
dropdownPosition: "top-0 left-full pl-1",
|
|
26
|
+
dropdownTrigger: "group-hover/nested:pointer-events-auto group-hover/nested:opacity-100",
|
|
27
|
+
Icon: f,
|
|
28
|
+
iconClass: ""
|
|
34
29
|
}
|
|
35
|
-
}, o =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, k = () => {
|
|
40
|
-
globalThis.window.matchMedia("(hover: hover)").matches && n(!0);
|
|
41
|
-
}, O = () => {
|
|
42
|
-
globalThis.window.matchMedia("(hover: hover)").matches && n(!1);
|
|
43
|
-
};
|
|
44
|
-
if (g) {
|
|
45
|
-
const { dropdownItems: e, label: c } = l;
|
|
46
|
-
return /* @__PURE__ */ d(
|
|
47
|
-
"li",
|
|
30
|
+
}, o = p ? s.nested : s.topLevel, g = o.Icon;
|
|
31
|
+
return /* @__PURE__ */ n("li", { className: o.liClass, children: [
|
|
32
|
+
/* @__PURE__ */ n(
|
|
33
|
+
u,
|
|
48
34
|
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
href: e ? void 0 : c ?? "#",
|
|
36
|
+
role: e ? "button" : void 0,
|
|
37
|
+
className: `text-small flex w-full items-center justify-between gap-1 font-medium text-neutral-800 transition-colors ${e ? "cursor-pointer" : ""} ${o.triggerClass} `,
|
|
38
|
+
"aria-haspopup": e ? "menu" : void 0,
|
|
39
|
+
"aria-expanded": e ? "false" : void 0,
|
|
53
40
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
"
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"aria-expanded": s,
|
|
60
|
-
onClick: N,
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ t("span", { className: "text-medium", children: c }),
|
|
63
|
-
/* @__PURE__ */ t(b, { fill: "#000", width: 20, height: 20 })
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ t(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
className: `absolute z-50 min-w-48 transition-all duration-200 ${o.dropdownPosition} ${s ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"}`,
|
|
71
|
-
children: /* @__PURE__ */ t("div", { className: "rounded-md border border-neutral-200 bg-white p-4 shadow-lg", children: /* @__PURE__ */ t("ul", { className: "flex flex-col gap-2", children: e.map((a) => /* @__PURE__ */ t(
|
|
72
|
-
R,
|
|
73
|
-
{
|
|
74
|
-
...a,
|
|
75
|
-
isNested: !0,
|
|
76
|
-
onItemClick: f,
|
|
77
|
-
isOpen: I === a.id,
|
|
78
|
-
onToggle: (M) => {
|
|
79
|
-
u(M ? a.id : null);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
a.id
|
|
83
|
-
)) }) })
|
|
84
|
-
}
|
|
85
|
-
)
|
|
41
|
+
/* @__PURE__ */ n("span", { className: "flex items-center gap-1", children: [
|
|
42
|
+
/* @__PURE__ */ t("span", { className: "text-base", children: a }),
|
|
43
|
+
l && /* @__PURE__ */ t("span", { className: "bg-secondary-200 text-extra-small rounded px-1 font-bold", children: l })
|
|
44
|
+
] }),
|
|
45
|
+
e && /* @__PURE__ */ t(g, { className: o.iconClass, fill: "#000", width: 20, height: 20 })
|
|
86
46
|
]
|
|
87
47
|
}
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
h && /* @__PURE__ */ t("span", { className: "bg-secondary-200 text-extra-small flex h-4.5 w-5.25 items-center justify-center rounded align-middle font-bold", children: h })
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
) });
|
|
48
|
+
),
|
|
49
|
+
d && /* @__PURE__ */ t(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: `pointer-events-none absolute z-50 min-w-48 opacity-0 transition-opacity duration-200 ${o.dropdownPosition} ${o.dropdownTrigger} `,
|
|
53
|
+
children: /* @__PURE__ */ t("div", { className: "rounded-md border border-neutral-200 bg-white py-2 shadow-lg", children: /* @__PURE__ */ t("ul", { className: "flex flex-col", children: r.map((i) => /* @__PURE__ */ t(v, { ...i, isNested: !0 }, i.label)) }) })
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] });
|
|
101
57
|
};
|
|
102
58
|
export {
|
|
103
|
-
|
|
59
|
+
v as NavMenuItem
|
|
104
60
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { PhoneIcon as r } from "./PhoneIcon.js";
|
|
3
|
+
const h = ({ phoneNumber: t, className: i = "" }) => /* @__PURE__ */ n(
|
|
4
|
+
"a",
|
|
5
|
+
{
|
|
6
|
+
href: `tel:${t}`,
|
|
7
|
+
className: `bg-primary-700 inline-flex w-full items-center justify-center gap-2 rounded py-2.75 text-[16px] font-bold text-white ${i}`,
|
|
8
|
+
children: [
|
|
9
|
+
/* @__PURE__ */ e(r, { fill: "white", width: 20, height: 20 }),
|
|
10
|
+
/* @__PURE__ */ e("span", { children: t })
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
export {
|
|
15
|
+
h as PhoneButton
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const p = ({
|
|
4
|
+
width: n = 24,
|
|
5
|
+
height: C = 24,
|
|
6
|
+
fill: r = "none"
|
|
7
|
+
}) => /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", width: n, height: C, fill: r, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o("g", { id: "Icon/Symbol/phone_24px", children: /* @__PURE__ */ o(
|
|
8
|
+
"path",
|
|
9
|
+
{
|
|
10
|
+
id: "path",
|
|
11
|
+
d: "M20.01 15.38C18.78 15.38 17.59 15.18 16.48 14.82C16.13 14.7 15.74 14.79 15.47 15.06L13.9 17.03C11.07 15.68 8.42 13.13 7.01 10.2L8.96 8.54C9.23 8.26 9.31 7.87 9.2 7.52C8.83 6.41 8.64 5.22 8.64 3.99C8.64 3.45 8.19 3 7.65 3H4.19C3.65 3 3 3.24 3 3.99C3 13.28 10.73 21 20.01 21C20.72 21 21 20.37 21 19.82V16.37C21 15.83 20.55 15.38 20.01 15.38Z"
|
|
12
|
+
}
|
|
13
|
+
) }) });
|
|
14
|
+
export {
|
|
15
|
+
p as PhoneIcon
|
|
16
|
+
};
|
|
@@ -74,7 +74,7 @@ const w = ({
|
|
|
74
74
|
] })
|
|
75
75
|
] }),
|
|
76
76
|
/* @__PURE__ */ r("div", { className: "block lg:hidden", children: [
|
|
77
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-3 border-b border-neutral-200 bg-white py-
|
|
77
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3 border-b border-neutral-200 bg-white px-4 py-3", children: [
|
|
78
78
|
/* @__PURE__ */ e(
|
|
79
79
|
"input",
|
|
80
80
|
{
|