@npm_leadtech/legal-contracts-ui 0.53.5 → 0.53.7

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,27 +1,25 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { PhoneButton as o } from "./PhoneButton.js";
4
- import { FooterNav as h } from "./FooterNav.js";
5
- const v = ({
6
- nav: r,
3
+ import { FooterNav as o } from "./FooterNav.js";
4
+ const N = ({
5
+ nav: x,
7
6
  contactInfo: t,
8
- logoGray: i,
9
- socialLinks: d,
10
- legalLinks: c,
11
- disclaimerText: x,
7
+ logoGray: m,
8
+ socialLinks: c,
9
+ legalLinks: i,
10
+ disclaimerText: d,
12
11
  copyrightText: n,
13
12
  trustPilotWidget: s,
14
- languageSelector: m
13
+ languageSelector: r
15
14
  }) => /* @__PURE__ */ l("footer", { className: "text-neutral-25", children: [
16
15
  /* @__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: [
17
- r.map((a) => /* @__PURE__ */ e(h, { ...a }, a.title)),
16
+ x.map((a) => /* @__PURE__ */ e(o, { ...a }, a.title)),
18
17
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-6 max-sm:w-full md:contents lg:flex", children: [
19
18
  /* @__PURE__ */ l("div", { className: "", children: [
20
- /* @__PURE__ */ e("div", { className: "mb-4 xl:hidden", children: !!m && /* @__PURE__ */ e("div", { className: "language-selector-mobile-container", children: m }) }),
19
+ /* @__PURE__ */ e("div", { className: "mb-8 xl:hidden", children: !!r && /* @__PURE__ */ e("div", { className: "language-selector-mobile-container", children: r }) }),
21
20
  /* @__PURE__ */ l("div", { children: [
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: [
21
+ /* @__PURE__ */ e("p", { className: "text-small font-bold text-white", children: t.phoneNumber }),
22
+ /* @__PURE__ */ l("p", { className: "text-neutral-25 text-center text-[16px] md:text-left md:text-[12px]", children: [
25
23
  t.contactHoursText,
26
24
  " ",
27
25
  t.contactHours
@@ -33,15 +31,15 @@ const v = ({
33
31
  ] }) }),
34
32
  /* @__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: [
35
33
  /* @__PURE__ */ l("div", { className: "flex flex-col items-start gap-6 md:flex-row md:justify-between", children: [
36
- i,
37
- /* @__PURE__ */ e("div", { className: "flex gap-4", children: d?.map((a) => a) })
34
+ m,
35
+ /* @__PURE__ */ e("div", { className: "flex gap-4", children: c?.map((a) => a) })
38
36
  ] }),
39
37
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-600" }),
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 }),
38
+ /* @__PURE__ */ e("div", { className: "text-extra-small flex flex-wrap gap-4", children: i?.map((a) => a) }),
39
+ /* @__PURE__ */ e("p", { className: "text-extra-small text-neutral-400", children: d }),
42
40
  /* @__PURE__ */ e("p", { className: "text-extra-small text-neutral-400", children: n })
43
41
  ] }) })
44
42
  ] });
45
43
  export {
46
- v as Footer
44
+ N as Footer
47
45
  };
@@ -14,15 +14,10 @@ export declare const Header: FC<HeaderProps>;
14
14
  export declare interface HeaderProps {
15
15
  logo: ReactNode;
16
16
  navMenu: NavMenuProps;
17
- seeAll: ReactNode;
18
17
  searchBarProps: SearchBarProps;
19
18
  languageSelectorProps?: LanguageSelectorProps;
20
19
  userActions: ReactNode;
21
- isMobileMenuOpen?: boolean;
22
- onOpenMobileMenu?: () => void;
23
- onCloseMobileMenu?: () => void;
24
- mobileMenuSections?: MobileMenuSection[];
25
- mobileContactInfo?: MobileContactInfo;
20
+ mobileMenu: Omit<MobileMenuProps, 'logo' | 'userActions' | 'searchBarProps'>;
26
21
  }
27
22
 
28
23
  export interface LanguageSelectorProps {
@@ -35,34 +30,57 @@ export interface LanguageSelectorProps {
35
30
 
36
31
  export type LanguageSelectorVariant = 'default' | 'compact';
37
32
 
38
- export declare interface MobileContactInfo {
33
+ export interface MobileContactInfo {
39
34
  phoneNumber: string;
40
35
  contactHoursLabel?: string;
41
36
  contactHours?: string;
42
37
  }
43
38
 
44
- export declare interface MobileMenuSection {
39
+ export interface MobileMenuProps {
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;
45
54
  title?: string;
46
- icon?: ReactNode;
47
- items: {
48
- label: string;
49
- href?: string;
55
+ icon: ReactNode | null;
56
+ items?: {
57
+ id: string;
58
+ link: ReactNode;
50
59
  }[];
51
- seeAll?: ReactNode;
60
+ seeAll?: ReactNode | null;
61
+ content?: ReactNode | null;
52
62
  }
53
63
 
54
- export interface NavMenuItemProps {
64
+ export type NavMenuItemProps = {
65
+ id: string;
55
66
  label: string;
56
- href?: string;
57
- hasDropdown?: boolean;
58
- dropdownItems?: NavMenuItemProps[];
59
- dropdownContent?: ReactNode;
67
+ dropdownItems: (NavMenuItemProps | NavMenuLink)[];
68
+ hasDropdown: true;
69
+ isNested?: boolean;
70
+ };
71
+
72
+ export type NavMenuLink = {
73
+ id: string;
74
+ link: ReactNode;
60
75
  tag?: string;
76
+ hasDropdown: false;
61
77
  isNested?: boolean;
62
- }
78
+ bold?: boolean;
79
+ };
63
80
 
64
81
  export interface NavMenuProps {
65
- navItems: NavMenuItemProps[];
82
+ navItems: (NavMenuItemProps | NavMenuLink)[];
83
+ className?: string;
66
84
  }
67
85
 
68
86
  export interface SearchBarProps {
@@ -1,112 +1,44 @@
1
- import { jsxs as l, Fragment as N, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as r, Fragment as m, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
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,
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,
11
+ searchBarProps: i,
12
+ languageSelectorProps: l,
15
13
  userActions: n,
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 }) })
14
+ 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 })
26
20
  ] }),
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 }) }),
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 }) }),
30
24
  n
31
25
  ] }),
32
- /* @__PURE__ */ e(
26
+ /* @__PURE__ */ r(
33
27
  "button",
34
28
  {
35
- className: "flex cursor-pointer items-center justify-center p-2 lg:hidden",
36
- onClick: h,
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,
37
31
  "aria-label": "Open menu",
38
- "aria-expanded": d,
39
- children: /* @__PURE__ */ e(y, {})
32
+ "aria-expanded": t.isOpen,
33
+ children: [
34
+ t.openText,
35
+ /* @__PURE__ */ e(x, {})
36
+ ]
40
37
  }
41
38
  )
42
39
  ] }) }),
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
- ] })
40
+ /* @__PURE__ */ e(c, { ...t, logo: a, userActions: n, searchBarProps: i })
109
41
  ] });
110
42
  export {
111
- S as Header
43
+ v as Header
112
44
  };
@@ -0,0 +1,54 @@
1
+ import { FC } from 'react';
2
+ import * as React_2 from 'react';
3
+ import { ReactNode } from 'react';
4
+
5
+ export declare interface MobileContactInfo {
6
+ phoneNumber: string;
7
+ contactHoursLabel?: string;
8
+ contactHours?: string;
9
+ }
10
+
11
+ export declare const MobileMenu: FC<MobileMenuProps>;
12
+
13
+ export declare interface MobileMenuProps {
14
+ isOpen: boolean;
15
+ onOpen: () => void;
16
+ onClose: () => void;
17
+ logo: ReactNode;
18
+ userActions: ReactNode;
19
+ searchBarProps: SearchBarProps;
20
+ sections?: MobileMenuSection[];
21
+ contactInfo?: MobileContactInfo;
22
+ openText: string;
23
+ closeText: string;
24
+ }
25
+
26
+ export declare interface MobileMenuSection {
27
+ id?: string;
28
+ title?: string;
29
+ icon: ReactNode | null;
30
+ items?: {
31
+ id: string;
32
+ link: ReactNode;
33
+ }[];
34
+ seeAll?: ReactNode | null;
35
+ content?: ReactNode | null;
36
+ }
37
+
38
+ export interface SearchBarProps {
39
+ items: SearchItem[];
40
+ placeholder?: string;
41
+ isOpen?: boolean;
42
+ onToggle?: () => void;
43
+ searchValue?: string;
44
+ onInputChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
45
+ onClear?: () => void;
46
+ noResultsText?: string;
47
+ allDocumentsItem?: SearchItem;
48
+ }
49
+
50
+ export interface SearchItem {
51
+ label: string;
52
+ href: string;
53
+ }
54
+
@@ -0,0 +1,80 @@
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import "react";
3
+ import { SearchBar as x } from "./SearchBar.js";
4
+ import { PhoneTalkIcon as f } from "./PhoneTalkIcon.js";
5
+ import { CloseIcon as h } from "./CloseIcon.js";
6
+ const j = ({
7
+ isOpen: m,
8
+ onClose: n,
9
+ logo: c,
10
+ userActions: d,
11
+ searchBarProps: p,
12
+ sections: o = [],
13
+ contactInfo: t,
14
+ closeText: u
15
+ }) => m ? /* @__PURE__ */ l("div", { className: "fixed inset-0 z-50 flex flex-col overflow-y-auto bg-white text-neutral-800 lg:hidden", children: [
16
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between px-6 py-4", children: [
17
+ c,
18
+ /* @__PURE__ */ l(
19
+ "button",
20
+ {
21
+ className: "text-small text-primary-500 flex cursor-pointer items-center justify-center gap-1 rounded border border-neutral-400 px-2 py-1",
22
+ onClick: n,
23
+ "aria-label": "Close menu",
24
+ children: [
25
+ u,
26
+ /* @__PURE__ */ r(h, { fill: "var(--primary-500)" })
27
+ ]
28
+ }
29
+ )
30
+ ] }),
31
+ /* @__PURE__ */ l("div", { className: "flex flex-1 flex-col pb-6", children: [
32
+ /* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-6", children: [
33
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: d }),
34
+ /* @__PURE__ */ r(x, { ...p })
35
+ ] }),
36
+ /* @__PURE__ */ r("nav", { className: "flex flex-col gap-0", children: o.map((e, i) => {
37
+ const a = e.icon != null;
38
+ return e.content != null ? /* @__PURE__ */ r("div", { className: "flex items-center px-6 pb-8", children: e.content }, e.id ?? `custom-${i.toString()}`) : /* @__PURE__ */ l(
39
+ "div",
40
+ {
41
+ className: e.title !== "" && !a ? "border-t border-b border-neutral-200 pt-4" : "",
42
+ children: [
43
+ e.title && /* @__PURE__ */ l("div", { className: `flex items-center gap-2 px-6 ${a ? "bg-neutral-50 py-4" : ""}`, children: [
44
+ e.icon != null && /* @__PURE__ */ r("span", { className: "text-primary-700", children: e.icon }),
45
+ /* @__PURE__ */ r("h4", { className: "text-medium font-semibold", children: e.title })
46
+ ] }),
47
+ e.items != null && /* @__PURE__ */ l("ul", { className: `flex flex-col gap-4 ${a ? "p-6" : "px-6 py-4"}`, children: [
48
+ e.items.map((s) => /* @__PURE__ */ r("li", { className: "text-medium", children: s.link }, s.id)),
49
+ e.seeAll != null && /* @__PURE__ */ r("li", { className: "font-semibold", children: e.seeAll })
50
+ ] })
51
+ ]
52
+ },
53
+ e.id ?? e.title ?? i.toString()
54
+ );
55
+ }) }),
56
+ t && /* @__PURE__ */ l("div", { className: "mt-auto flex flex-col items-center justify-center border-t border-neutral-100 p-6", children: [
57
+ /* @__PURE__ */ l(
58
+ "a",
59
+ {
60
+ href: `tel:${t.phoneNumber.replaceAll(" ", "")}`,
61
+ className: "bg-primary-700 flex w-full items-center justify-center gap-2 rounded-md p-3 text-base font-semibold text-white",
62
+ children: [
63
+ /* @__PURE__ */ r(f, { fill: "#ffff" }),
64
+ t.phoneNumber
65
+ ]
66
+ }
67
+ ),
68
+ t.contactHours && /* @__PURE__ */ l("p", { className: "text-small mt-4 text-base text-neutral-500", children: [
69
+ t.contactHoursLabel != null && /* @__PURE__ */ l("span", { children: [
70
+ t.contactHoursLabel,
71
+ " "
72
+ ] }),
73
+ t.contactHours
74
+ ] })
75
+ ] })
76
+ ] })
77
+ ] }) : null;
78
+ export {
79
+ j as MobileMenu
80
+ };
@@ -3,17 +3,25 @@ import { ReactNode } from 'react';
3
3
 
4
4
  export declare const NavMenu: FC<NavMenuProps>;
5
5
 
6
- export interface NavMenuItemProps {
6
+ export type NavMenuItemProps = {
7
+ id: string;
7
8
  label: string;
8
- href?: string;
9
- hasDropdown?: boolean;
10
- dropdownItems?: NavMenuItemProps[];
11
- dropdownContent?: ReactNode;
9
+ dropdownItems: (NavMenuItemProps | NavMenuLink)[];
10
+ hasDropdown: true;
11
+ isNested?: boolean;
12
+ };
13
+
14
+ export type NavMenuLink = {
15
+ id: string;
16
+ link: ReactNode;
12
17
  tag?: string;
18
+ hasDropdown: false;
13
19
  isNested?: boolean;
14
- }
20
+ bold?: boolean;
21
+ };
15
22
 
16
23
  export declare interface NavMenuProps {
17
- navItems: NavMenuItemProps[];
24
+ navItems: (NavMenuItemProps | NavMenuLink)[];
25
+ className?: string;
18
26
  }
19
27
 
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
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)) }) });
3
+ import { NavMenuItem as a } from "./NavMenuItem.js";
4
+ const o = ({ navItems: m, className: t = "" }) => /* @__PURE__ */ e("nav", { className: t, children: /* @__PURE__ */ e("ul", { className: "text-medium flex flex-wrap items-center gap-4 xl:gap-8", children: m.map((r) => /* @__PURE__ */ e(a, { ...r }, r.id)) }) });
5
5
  export {
6
6
  o as NavMenu
7
7
  };
@@ -1,15 +1,22 @@
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 | NavMenuLink>;
5
5
 
6
- export declare interface NavMenuItemProps {
6
+ export declare type NavMenuItemProps = {
7
+ id: string;
7
8
  label: string;
8
- href?: string;
9
- hasDropdown?: boolean;
10
- dropdownItems?: NavMenuItemProps[];
11
- dropdownContent?: ReactNode;
9
+ dropdownItems: (NavMenuItemProps | NavMenuLink)[];
10
+ hasDropdown: true;
11
+ isNested?: boolean;
12
+ };
13
+
14
+ export declare type NavMenuLink = {
15
+ id: string;
16
+ link: ReactNode;
12
17
  tag?: string;
18
+ hasDropdown: false;
13
19
  isNested?: boolean;
14
- }
20
+ bold?: boolean;
21
+ };
15
22
 
@@ -1,60 +1,61 @@
1
- import { jsxs as n, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { ChevronDownIcon as m } from "./ChevronDownIcon.js";
3
+ import { ChevronDownIcon as g } from "./ChevronDownIcon.js";
4
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 = {
5
+ const h = (o) => {
6
+ const { hasDropdown: a, isNested: i } = o, n = {
14
7
  topLevel: {
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",
8
+ liClass: "group relative py-2",
9
+ triggerClass: "hover:text-neutral-600",
10
+ dropdownPosition: "top-full left-0",
18
11
  dropdownTrigger: "group-hover:pointer-events-auto group-hover:opacity-100",
19
- Icon: m,
12
+ Icon: g,
20
13
  iconClass: "transition-transform duration-200 group-hover:rotate-180"
21
14
  },
22
15
  nested: {
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",
16
+ liClass: "group/nested relative",
17
+ triggerClass: "p-1 hover:bg-primary-100 w-full rounded min-w-48.5",
18
+ dropdownPosition: "top-0 left-full -mt-4 pl-6",
26
19
  dropdownTrigger: "group-hover/nested:pointer-events-auto group-hover/nested:opacity-100",
27
20
  Icon: f,
28
21
  iconClass: ""
29
22
  }
30
- }, o = p ? s.nested : s.topLevel, g = o.Icon;
31
- return /* @__PURE__ */ n("li", { className: o.liClass, children: [
32
- /* @__PURE__ */ n(
33
- u,
34
- {
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,
40
- children: [
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 })
46
- ]
47
- }
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
- ] });
23
+ }, t = i ? n.nested : n.topLevel, d = t.Icon;
24
+ if (a) {
25
+ const { dropdownItems: u, label: m } = o;
26
+ return /* @__PURE__ */ r("li", { className: t.liClass, children: [
27
+ /* @__PURE__ */ r(
28
+ "button",
29
+ {
30
+ className: `text-small flex w-full cursor-pointer items-center justify-between gap-1 font-medium text-nowrap text-neutral-800 transition-colors ${t.triggerClass} `,
31
+ "aria-haspopup": "menu",
32
+ children: [
33
+ /* @__PURE__ */ e("span", { className: "text-medium", children: m }),
34
+ /* @__PURE__ */ e(d, { className: t.iconClass, fill: "#000", width: 20, height: 20 })
35
+ ]
36
+ }
37
+ ),
38
+ /* @__PURE__ */ e(
39
+ "div",
40
+ {
41
+ className: `pointer-events-none absolute z-50 min-w-48 opacity-0 transition-opacity duration-200 ${t.dropdownPosition} ${t.dropdownTrigger} `,
42
+ children: /* @__PURE__ */ e("div", { className: "rounded-md border border-neutral-200 bg-white p-4 shadow-lg", children: /* @__PURE__ */ e("ul", { className: "flex flex-col gap-2", children: u.map((l) => /* @__PURE__ */ e(h, { ...l, isNested: !0 }, l.id)) }) })
43
+ }
44
+ )
45
+ ] });
46
+ }
47
+ const { link: c, tag: s, bold: p } = o;
48
+ return /* @__PURE__ */ e("li", { className: t.liClass, children: /* @__PURE__ */ r(
49
+ "span",
50
+ {
51
+ className: `text-small relative flex w-full items-center justify-between gap-1 font-medium text-nowrap text-neutral-800 transition-colors ${t.triggerClass} `,
52
+ children: [
53
+ /* @__PURE__ */ e("span", { className: `text-medium flex-1 ${p ? "font-bold" : ""} [&_a]:after:absolute [&_a]:after:inset-0`, children: c }),
54
+ s && /* @__PURE__ */ e("span", { className: "bg-secondary-200 text-extra-small rounded px-1 font-bold", children: s })
55
+ ]
56
+ }
57
+ ) });
57
58
  };
58
59
  export {
59
- v as NavMenuItem
60
+ h as NavMenuItem
60
61
  };
@@ -0,0 +1,5 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+ import * as React_2 from 'react';
3
+
4
+ export declare const ScalatorIcon: ({ fill, ...props }: React_2.SVGProps<SVGSVGElement>) => JSX.Element;
5
+
@@ -0,0 +1,12 @@
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import "react";
3
+ const h = ({ fill: o = "var(--primary-500)", ...r }) => /* @__PURE__ */ C("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r, children: /* @__PURE__ */ C(
4
+ "path",
5
+ {
6
+ d: "M23 17C23.5523 17 24 17.4477 24 18C24 18.5523 23.5523 19 23 19H13C12.4477 19 12 18.5523 12 18C12 17.4477 12.4477 17 13 17H23ZM23 11C23.5523 11 24 11.4477 24 12C24 12.5523 23.5523 13 23 13H7C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11H23ZM23 5C23.5523 5 24 5.44772 24 6C24 6.55228 23.5523 7 23 7H1C0.447715 7 0 6.55228 0 6C0 5.44772 0.447715 5 1 5H23Z",
7
+ fill: o
8
+ }
9
+ ) });
10
+ export {
11
+ h as ScalatorIcon
12
+ };
@@ -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 px-4 py-3", children: [
77
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-3 border-b border-neutral-200 bg-white py-1", children: [
78
78
  /* @__PURE__ */ e(
79
79
  "input",
80
80
  {