@npm_leadtech/legal-contracts-ui 0.58.0 → 0.58.1
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.js +61 -37
- package/dist/globals.css +1 -1
- package/package.json +1 -1
- package/dist/components/index.d.ts +0 -862
|
@@ -1,44 +1,68 @@
|
|
|
1
|
-
import { jsxs as r,
|
|
2
|
-
import "react";
|
|
3
|
-
import { MobileMenu as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useEffect as f } from "react";
|
|
3
|
+
import { MobileMenu as p } from "./MobileMenu.js";
|
|
4
|
+
import { ContactBanner as x } from "./ContactBanner.js";
|
|
5
|
+
import { NavMenu as h } from "./NavMenu.js";
|
|
6
|
+
import { LanguageSelector as u } from "./LanguageSelector.js";
|
|
7
|
+
import { ScalatorIcon as w } from "./ScalatorIcon.js";
|
|
8
|
+
import { SearchBar as v } from "./SearchBar.js";
|
|
9
|
+
const L = ({
|
|
10
|
+
logo: l,
|
|
11
|
+
navMenu: o,
|
|
11
12
|
searchBarProps: i,
|
|
12
|
-
languageSelectorProps:
|
|
13
|
+
languageSelectorProps: a,
|
|
13
14
|
userActions: n,
|
|
14
15
|
mobileMenu: t
|
|
15
|
-
}) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"button",
|
|
16
|
+
}) => {
|
|
17
|
+
const [d, c] = m(!1);
|
|
18
|
+
return f(() => {
|
|
19
|
+
const s = () => {
|
|
20
|
+
c(window.scrollY > 10);
|
|
21
|
+
};
|
|
22
|
+
return window.addEventListener("scroll", s, { passive: !0 }), () => {
|
|
23
|
+
window.removeEventListener("scroll", s);
|
|
24
|
+
};
|
|
25
|
+
}, []), /* @__PURE__ */ r("div", { className: "sticky top-0 z-1000 flex w-full flex-col", children: [
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
"div",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
30
|
-
|
|
31
|
-
"aria-label": "Open menu",
|
|
32
|
-
"aria-expanded": t.isOpen,
|
|
33
|
-
children: [
|
|
34
|
-
t.openText,
|
|
35
|
-
/* @__PURE__ */ e(x, {})
|
|
36
|
-
]
|
|
29
|
+
className: `grid transition-all duration-500 ease-in-out ${d ? "grid-rows-[0fr]" : "grid-rows-[1fr]"}`,
|
|
30
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */ e(x, {}) })
|
|
37
31
|
}
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
"header",
|
|
35
|
+
{
|
|
36
|
+
className: `transition-colors duration-300 ease-in-out ${d ? "bg-white shadow-md" : "bg-primary-50"}`,
|
|
37
|
+
children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
|
|
38
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-8", children: [
|
|
39
|
+
l,
|
|
40
|
+
/* @__PURE__ */ e(h, { className: "hidden lg:block", ...o })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
|
|
43
|
+
/* @__PURE__ */ e(v, { ...i }),
|
|
44
|
+
a && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(u, { ...a }) }),
|
|
45
|
+
n
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ r(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
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",
|
|
51
|
+
onClick: t.onOpen,
|
|
52
|
+
"aria-label": "Open menu",
|
|
53
|
+
"aria-expanded": t.isOpen,
|
|
54
|
+
children: [
|
|
55
|
+
t.openText,
|
|
56
|
+
/* @__PURE__ */ e(w, {})
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] })
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ e(p, { ...t, logo: l, userActions: n, searchBarProps: i })
|
|
64
|
+
] });
|
|
65
|
+
};
|
|
42
66
|
export {
|
|
43
|
-
|
|
67
|
+
L as Header
|
|
44
68
|
};
|