@npm_leadtech/legal-contracts-ui 0.58.0 → 0.58.2
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.
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { InfoIcon as r } from "./InfoIcon.js";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
const o = ({
|
|
5
|
+
contactText: s,
|
|
6
|
+
phoneNumber: l,
|
|
7
|
+
contactHoursText: t,
|
|
8
|
+
contactHours: a,
|
|
9
|
+
isScrolled: i
|
|
10
|
+
}) => /* @__PURE__ */ e(
|
|
11
|
+
"section",
|
|
12
|
+
{
|
|
13
|
+
className: `flex w-full justify-center border-b border-neutral-200 bg-neutral-50 px-4 transition-all duration-500 ease-in-out ${i ? "h-0 py-0" : "h-8.75 py-2"}`,
|
|
14
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center justify-center gap-4 text-center text-neutral-900 md:text-left", children: [
|
|
15
|
+
s && /* @__PURE__ */ e("p", { className: "text-small hidden sm:block", children: s }),
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(r, {}) }),
|
|
17
|
+
l && /* @__PURE__ */ e("a", { href: `tel:${l}`, className: "text-small block font-bold sm:hidden", children: l }),
|
|
18
|
+
l && /* @__PURE__ */ e("p", { className: "text-small hidden font-bold sm:block", children: l }),
|
|
19
|
+
/* @__PURE__ */ n("div", { className: "text-small flex items-center gap-1", children: [
|
|
20
|
+
t && /* @__PURE__ */ e("span", { className: "hidden sm:block", children: t }),
|
|
21
|
+
a && /* @__PURE__ */ e("span", { children: a })
|
|
22
|
+
] })
|
|
23
|
+
] })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
14
26
|
export {
|
|
15
|
-
|
|
27
|
+
o as ContactBanner
|
|
16
28
|
};
|
|
@@ -2,6 +2,14 @@ import { FC } from 'react';
|
|
|
2
2
|
import * as React_2 from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
|
|
5
|
+
export interface ContactBannerProps {
|
|
6
|
+
contactText?: string;
|
|
7
|
+
phoneNumber?: string;
|
|
8
|
+
contactHoursText?: string;
|
|
9
|
+
contactHours?: string;
|
|
10
|
+
isScrolled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
export interface FormattedLanguageItem {
|
|
6
14
|
code: string;
|
|
7
15
|
name: string;
|
|
@@ -18,6 +26,7 @@ export declare interface HeaderProps {
|
|
|
18
26
|
languageSelectorProps?: LanguageSelectorProps;
|
|
19
27
|
userActions: ReactNode;
|
|
20
28
|
mobileMenu: Omit<MobileMenuProps, 'logo' | 'userActions' | 'searchBarProps'>;
|
|
29
|
+
contactBannerProps: Omit<ContactBannerProps, 'isScrolled'>;
|
|
21
30
|
}
|
|
22
31
|
|
|
23
32
|
export interface LanguageSelectorProps {
|
|
@@ -1,44 +1,63 @@
|
|
|
1
|
-
import { jsxs as r,
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useEffect as f } from "react";
|
|
3
|
+
import { ContactBanner as x } from "./ContactBanner.js";
|
|
4
|
+
import { MobileMenu as h } from "./MobileMenu.js";
|
|
5
|
+
import { NavMenu as u } from "./NavMenu.js";
|
|
6
|
+
import { LanguageSelector as w } from "./LanguageSelector.js";
|
|
7
|
+
import { ScalatorIcon as v } from "./ScalatorIcon.js";
|
|
8
|
+
import { SearchBar as g } from "./SearchBar.js";
|
|
9
|
+
const O = ({
|
|
10
|
+
logo: l,
|
|
10
11
|
navMenu: d,
|
|
11
|
-
searchBarProps:
|
|
12
|
-
languageSelectorProps:
|
|
12
|
+
searchBarProps: a,
|
|
13
|
+
languageSelectorProps: i,
|
|
13
14
|
userActions: n,
|
|
14
|
-
mobileMenu: t
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
15
|
+
mobileMenu: t,
|
|
16
|
+
contactBannerProps: c
|
|
17
|
+
}) => {
|
|
18
|
+
const [o, m] = p(!1);
|
|
19
|
+
return f(() => {
|
|
20
|
+
const s = () => {
|
|
21
|
+
m(window.scrollY > 10);
|
|
22
|
+
};
|
|
23
|
+
return window.addEventListener("scroll", s, { passive: !0 }), () => {
|
|
24
|
+
window.removeEventListener("scroll", s);
|
|
25
|
+
};
|
|
26
|
+
}, []), /* @__PURE__ */ r("div", { className: "sticky top-0 z-1000 flex w-full flex-col", children: [
|
|
27
|
+
/* @__PURE__ */ e(x, { isScrolled: o, ...c }),
|
|
28
|
+
/* @__PURE__ */ e(
|
|
29
|
+
"header",
|
|
28
30
|
{
|
|
29
|
-
className:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
31
|
+
className: `transition-colors duration-300 ease-in-out ${o ? "bg-white shadow-md" : "bg-primary-50"}`,
|
|
32
|
+
children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
|
|
33
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-8", children: [
|
|
34
|
+
l,
|
|
35
|
+
/* @__PURE__ */ e(u, { className: "hidden lg:block", ...d })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
|
|
38
|
+
/* @__PURE__ */ e(g, { ...a }),
|
|
39
|
+
i && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(w, { ...i }) }),
|
|
40
|
+
n
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
className: "text-small text-primary-500 flex items-center justify-center gap-1 rounded border border-neutral-400 bg-white px-2 py-1 lg:hidden",
|
|
46
|
+
onClick: t.onOpen,
|
|
47
|
+
"aria-label": "Open menu",
|
|
48
|
+
"aria-expanded": t.isOpen,
|
|
49
|
+
children: [
|
|
50
|
+
t.openText,
|
|
51
|
+
/* @__PURE__ */ e(v, {})
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
37
56
|
}
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ e(h, { ...t, logo: l, userActions: n, searchBarProps: a })
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
42
61
|
export {
|
|
43
|
-
|
|
62
|
+
O as Header
|
|
44
63
|
};
|