@npm_leadtech/legal-contracts-ui 0.140.0 → 0.140.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,32 +1,32 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { MobileMenu as m } from "./MobileMenu.js";
4
- import { useScroll as c } from "../shared/hooks/useScroll.js";
5
- import { NavMenu as s } from "./NavMenu.js";
4
+ import { useScroll as s } from "../shared/hooks/useScroll.js";
5
+ import { NavMenu as c } from "./NavMenu.js";
6
6
  import { LanguageSelector as p } from "./LanguageSelector.js";
7
7
  import { ScalatorIcon as x } from "./ScalatorIcon.js";
8
8
  import { SearchBar as f } from "./SearchBar.js";
9
9
  const j = ({
10
- logo: t,
11
- navMenu: d,
12
- searchBarProps: a,
10
+ logo: a,
11
+ navMenu: o,
12
+ searchBarProps: t,
13
13
  languageSelectorProps: i,
14
14
  userActions: n,
15
15
  mobileMenu: l
16
16
  }) => {
17
- const o = c(10);
17
+ const d = s(10);
18
18
  return /* @__PURE__ */ r("div", { className: "sticky top-0 z-1000 flex w-full flex-col", children: [
19
19
  /* @__PURE__ */ e(
20
20
  "header",
21
21
  {
22
- className: `transition-colors duration-300 ease-in-out ${o ? "bg-white shadow-md" : "bg-primary-50"}`,
22
+ className: `transition-colors duration-300 ease-in-out ${d ? "bg-white shadow-md" : "bg-primary-50"}`,
23
23
  children: /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between px-4 py-4 text-neutral-800 md:px-8", children: [
24
24
  /* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-8", children: [
25
- t,
26
- /* @__PURE__ */ e(s, { className: "hidden lg:block", ...d })
25
+ a,
26
+ /* @__PURE__ */ e(c, { className: "hidden lg:block", ...o })
27
27
  ] }),
28
28
  /* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
29
- /* @__PURE__ */ e(f, { ...a }),
29
+ /* @__PURE__ */ e(f, { ...t }),
30
30
  i && /* @__PURE__ */ e("div", { className: "hidden xl:block", children: /* @__PURE__ */ e(p, { ...i }) }),
31
31
  n
32
32
  ] }),
@@ -36,7 +36,8 @@ const j = ({
36
36
  className: "text-small text-primary-700 flex items-center justify-center gap-1 rounded border border-neutral-400 bg-transparent px-2 py-1 lg:hidden",
37
37
  onClick: l.onOpen,
38
38
  "aria-label": "Open menu",
39
- "aria-expanded": l.isOpen,
39
+ "aria-expanded": l.isOpen ? "true" : "false",
40
+ "aria-controls": "mobile-nav",
40
41
  children: [
41
42
  l.openText,
42
43
  /* @__PURE__ */ e(x, { fill: "var(--color-primary-700)" })
@@ -46,7 +47,7 @@ const j = ({
46
47
  ] })
47
48
  }
48
49
  ),
49
- /* @__PURE__ */ e(m, { ...l, logo: t, userActions: n, searchBarProps: a })
50
+ /* @__PURE__ */ e(m, { ...l, logo: a, userActions: n, searchBarProps: t })
50
51
  ] });
51
52
  };
52
53
  export {
@@ -1,86 +1,92 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
- import { SearchBar as x } from "./SearchBar.js";
3
+ import { SearchBar as u } from "./SearchBar.js";
4
4
  import { CloseIcon as f } from "./CloseIcon.js";
5
5
  import { LinkWrapper as h } from "./LinkWrapper.js";
6
6
  import { PhoneTalkIcon as b } from "./PhoneTalkIcon.js";
7
7
  const k = ({
8
8
  isOpen: s,
9
9
  onClose: m,
10
- logo: c,
11
- userActions: d,
10
+ logo: d,
11
+ userActions: c,
12
12
  searchBarProps: o,
13
13
  sections: p = [],
14
14
  contactInfo: t,
15
- closeText: u
16
- }) => s ? /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white text-neutral-800 lg:hidden", children: [
17
- /* @__PURE__ */ l("div", { className: "flex items-center justify-between px-6 py-4", children: [
18
- c,
19
- /* @__PURE__ */ l(
20
- "button",
21
- {
22
- className: "text-small text-primary-700 flex cursor-pointer items-center justify-center gap-1 rounded border border-neutral-400 px-2 py-1",
23
- onClick: m,
24
- "aria-label": "Close menu",
25
- children: [
26
- u,
27
- /* @__PURE__ */ r(f, { fill: "var(--color-primary-700)" })
28
- ]
29
- }
30
- )
31
- ] }),
32
- /* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
33
- /* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-6", children: [
34
- /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: d }),
35
- /* @__PURE__ */ r(x, { ...o })
36
- ] }),
37
- /* @__PURE__ */ r("nav", { className: "flex flex-col gap-0", children: p.map((e, n) => {
38
- const i = e.icon != null;
39
- return e.content != null ? /* @__PURE__ */ r("div", { className: "flex items-center px-6 pb-8", children: /* @__PURE__ */ r(h, { variant: "secondary-green", children: e.content }) }, e.id ?? `custom-${n.toString()}`) : /* @__PURE__ */ l(
40
- "div",
41
- {
42
- className: e.title !== "" && !i ? "border-t border-b border-neutral-200 pt-4" : "",
43
- children: [
44
- e.title && /* @__PURE__ */ l("div", { className: `flex items-center gap-2 px-6 ${i ? "bg-neutral-50 py-4" : ""}`, children: [
45
- e.icon != null && /* @__PURE__ */ r("span", { className: "text-primary-700", children: e.icon }),
46
- /* @__PURE__ */ r("h4", { className: "text-medium font-semibold", children: e.title })
47
- ] }),
48
- e.items != null && /* @__PURE__ */ l("ul", { className: `flex flex-col gap-4 ${i ? "p-6" : "px-6 py-4"}`, children: [
49
- e.items.map((a) => /* @__PURE__ */ l("li", { className: "text-medium flex items-center gap-1", children: [
50
- a.link,
51
- " ",
52
- a.tag && /* @__PURE__ */ r("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: a.tag })
53
- ] }, a.id)),
54
- e.seeAll != null && /* @__PURE__ */ r("li", { className: "font-semibold", children: e.seeAll })
55
- ] })
56
- ]
57
- },
58
- e.id ?? e.title ?? n.toString()
59
- );
60
- }) }),
61
- t && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
62
- /* @__PURE__ */ l(
63
- "a",
64
- {
65
- "data-qa": "mobile_menu_contact_phone",
66
- href: `tel:${t.phoneNumber.replaceAll(" ", "")}`,
67
- className: "bg-primary-700 flex w-full items-center justify-center gap-2 rounded-md p-3 text-base font-semibold text-white",
68
- children: [
69
- /* @__PURE__ */ r(b, { fill: "#ffff" }),
70
- t.phoneNumber
71
- ]
72
- }
73
- ),
74
- t.contactHours && /* @__PURE__ */ l("p", { className: "text-small mt-4 text-base text-neutral-500", children: [
75
- t.contactHoursLabel != null && /* @__PURE__ */ l("span", { children: [
76
- t.contactHoursLabel,
77
- " "
15
+ closeText: x
16
+ }) => /* @__PURE__ */ l(
17
+ "div",
18
+ {
19
+ className: `fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white text-neutral-800 lg:hidden ${s ? "block" : "hidden"}`,
20
+ children: [
21
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between px-6 py-4", children: [
22
+ d,
23
+ /* @__PURE__ */ l(
24
+ "button",
25
+ {
26
+ className: "text-small text-primary-700 flex cursor-pointer items-center justify-center gap-1 rounded border border-neutral-400 px-2 py-1",
27
+ onClick: m,
28
+ "aria-label": "Close menu",
29
+ children: [
30
+ x,
31
+ /* @__PURE__ */ r(f, { fill: "var(--color-primary-700)" })
32
+ ]
33
+ }
34
+ )
35
+ ] }),
36
+ /* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
37
+ /* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-6", children: [
38
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: c }),
39
+ /* @__PURE__ */ r(u, { ...o })
78
40
  ] }),
79
- t.contactHours
41
+ /* @__PURE__ */ r("nav", { id: "mobile-nav", className: "flex flex-col gap-0", children: p.map((e, n) => {
42
+ const i = e.icon != null;
43
+ return e.content != null ? /* @__PURE__ */ r("div", { className: "flex items-center px-6 pb-8", children: /* @__PURE__ */ r(h, { variant: "secondary-green", children: e.content }) }, e.id ?? `custom-${n.toString()}`) : /* @__PURE__ */ l(
44
+ "div",
45
+ {
46
+ className: e.title !== "" && !i ? "border-t border-b border-neutral-200 pt-4" : "",
47
+ children: [
48
+ e.title && /* @__PURE__ */ l("div", { className: `flex items-center gap-2 px-6 ${i ? "bg-neutral-50 py-4" : ""}`, children: [
49
+ e.icon != null && /* @__PURE__ */ r("span", { className: "text-primary-700", children: e.icon }),
50
+ /* @__PURE__ */ r("h4", { className: "text-medium font-semibold", children: e.title })
51
+ ] }),
52
+ e.items != null && /* @__PURE__ */ l("ul", { className: `flex flex-col gap-4 ${i ? "p-6" : "px-6 py-4"}`, children: [
53
+ e.items.map((a) => /* @__PURE__ */ l("li", { className: "text-medium flex items-center gap-1", children: [
54
+ a.link,
55
+ " ",
56
+ a.tag && /* @__PURE__ */ r("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: a.tag })
57
+ ] }, a.id)),
58
+ e.seeAll != null && /* @__PURE__ */ r("li", { className: "font-semibold", children: e.seeAll })
59
+ ] })
60
+ ]
61
+ },
62
+ e.id ?? e.title ?? n.toString()
63
+ );
64
+ }) }),
65
+ t && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
66
+ /* @__PURE__ */ l(
67
+ "a",
68
+ {
69
+ "data-qa": "mobile_menu_contact_phone",
70
+ href: `tel:${t.phoneNumber.replaceAll(" ", "")}`,
71
+ className: "bg-primary-700 flex w-full items-center justify-center gap-2 rounded-md p-3 text-base font-semibold text-white",
72
+ children: [
73
+ /* @__PURE__ */ r(b, { fill: "#ffff" }),
74
+ t.phoneNumber
75
+ ]
76
+ }
77
+ ),
78
+ t.contactHours && /* @__PURE__ */ l("p", { className: "text-small mt-4 text-base text-neutral-500", children: [
79
+ t.contactHoursLabel != null && /* @__PURE__ */ l("span", { children: [
80
+ t.contactHoursLabel,
81
+ " "
82
+ ] }),
83
+ t.contactHours
84
+ ] })
85
+ ] })
80
86
  ] })
81
- ] })
82
- ] })
83
- ] }) : null;
87
+ ]
88
+ }
89
+ );
84
90
  export {
85
91
  k as MobileMenu
86
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.140.0",
3
+ "version": "0.140.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -809,4 +809,4 @@
809
809
  "prettier --write --ignore-unknown"
810
810
  ]
811
811
  }
812
- }
812
+ }