@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.
@@ -1,44 +1,68 @@
1
- import { jsxs as r, Fragment as m, jsx as e } from "react/jsx-runtime";
2
- import "react";
3
- import { MobileMenu as c } from "./MobileMenu.js";
4
- import { NavMenu as p } from "./NavMenu.js";
5
- import { LanguageSelector as s } from "./LanguageSelector.js";
6
- import { ScalatorIcon as x } from "./ScalatorIcon.js";
7
- import { SearchBar as o } from "./SearchBar.js";
8
- const v = ({
9
- logo: a,
10
- navMenu: d,
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: l,
13
+ languageSelectorProps: a,
13
14
  userActions: n,
14
15
  mobileMenu: t
15
- }) => /* @__PURE__ */ r(m, { children: [
16
- /* @__PURE__ */ e("header", { className: "bg-primary-50", children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
17
- /* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-8", children: [
18
- a,
19
- /* @__PURE__ */ e(p, { className: "hidden lg:block", ...d })
20
- ] }),
21
- /* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
22
- /* @__PURE__ */ e(o, { ...i }),
23
- l && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(s, { ...l }) }),
24
- n
25
- ] }),
26
- /* @__PURE__ */ r(
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: "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",
30
- onClick: t.onOpen,
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
- /* @__PURE__ */ e(c, { ...t, logo: a, userActions: n, searchBarProps: i })
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
- v as Header
67
+ L as Header
44
68
  };