@npm_leadtech/legal-contracts-ui 0.136.0 → 0.136.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.
@@ -39,6 +39,7 @@ export interface ContentItemProps {
39
39
  linkedProducts: LinkedProductProps[];
40
40
  sampleImage: ImageWithPreviewProps | null;
41
41
  cta: ReactNode | null;
42
+ comingSoonCta: ReactNode | null;
42
43
  docsModules: {
43
44
  pdfDownload: ReactNode;
44
45
  wordDownload: ReactNode;
@@ -22,6 +22,7 @@ export declare interface ContentItemProps {
22
22
  linkedProducts: LinkedProductProps[];
23
23
  sampleImage: ImageWithPreviewProps | null;
24
24
  cta: ReactNode | null;
25
+ comingSoonCta: ReactNode | null;
25
26
  docsModules: {
26
27
  pdfDownload: ReactNode;
27
28
  wordDownload: ReactNode;
@@ -1,31 +1,33 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import { ImageWithPreview as p } from "./ImageWithPreview.js";
3
- import { LinkedProducts as d } from "./LinkedProducts.js";
4
- import { Markdown as h } from "./Markdown.js";
5
- import { LinkWrapper as a } from "./LinkWrapper.js";
6
- import { AlternativeSubtypeDocument as x } from "./AlternativeSubtypeDocument.js";
3
+ import { LinkedProducts as h } from "./LinkedProducts.js";
4
+ import { Markdown as x } from "./Markdown.js";
5
+ import { LinkWrapper as l } from "./LinkWrapper.js";
6
+ import { AlternativeSubtypeDocument as u } from "./AlternativeSubtypeDocument.js";
7
7
  import { DefaultSubtypeDocument as w } from "./DefaultSubtypeDocument.js";
8
- const y = ({
9
- id: c,
10
- title: t,
8
+ const j = ({
9
+ id: d,
10
+ title: a,
11
11
  content: n,
12
- linkedProducts: m,
13
- sampleImage: i,
12
+ linkedProducts: i,
13
+ sampleImage: m,
14
14
  cta: o,
15
- docsModules: l,
16
- subtypeDocs: f
17
- }) => /* @__PURE__ */ s("div", { id: c, className: "flex min-w-0 scroll-mt-25 flex-col gap-6 text-neutral-900", children: [
18
- t && /* @__PURE__ */ e("h2", { className: "text-super-large font-bold", children: t }),
19
- n && /* @__PURE__ */ e(h, { content: n, className: "text-medium [&_p:last-child]:mb-0" }),
20
- m.length > 0 && /* @__PURE__ */ e(d, { linkedProducts: m }),
21
- i && /* @__PURE__ */ e(p, { ...i }),
22
- !!o && /* @__PURE__ */ e(a, { className: "w-75 self-center text-center", children: o }),
23
- l && /* @__PURE__ */ s("div", { className: "flex w-75 gap-4 self-center", children: [
24
- /* @__PURE__ */ e(a, { className: "w-full", variant: "secondary-black", children: l.pdfDownload }),
25
- /* @__PURE__ */ e(a, { className: "w-full", variant: "secondary-black", children: l.wordDownload })
15
+ comingSoonCta: s,
16
+ docsModules: t,
17
+ subtypeDocs: c
18
+ }) => /* @__PURE__ */ f("div", { id: d, className: "flex min-w-0 scroll-mt-25 flex-col gap-6 text-neutral-900", children: [
19
+ a && /* @__PURE__ */ e("h2", { className: "text-super-large font-bold", children: a }),
20
+ n && /* @__PURE__ */ e(x, { content: n, className: "text-medium [&_p:last-child]:mb-0" }),
21
+ i.length > 0 && /* @__PURE__ */ e(h, { linkedProducts: i }),
22
+ m && /* @__PURE__ */ e(p, { ...m }),
23
+ !!o && /* @__PURE__ */ e(l, { className: "w-75 self-center text-center", children: o }),
24
+ !!s && /* @__PURE__ */ e(l, { variant: "icon-grey", disabled: !0, className: "w-75 self-center bg-neutral-200 text-center font-bold", children: s }),
25
+ t && /* @__PURE__ */ f("div", { className: "flex w-75 gap-4 self-center", children: [
26
+ /* @__PURE__ */ e(l, { className: "w-full", variant: "secondary-black", children: t.pdfDownload }),
27
+ /* @__PURE__ */ e(l, { className: "w-full", variant: "secondary-black", children: t.wordDownload })
26
28
  ] }),
27
- f.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: f.map((r) => r.format === "Alternative" ? /* @__PURE__ */ e(x, { ...r }, r.id) : /* @__PURE__ */ e(w, { ...r }, r.id)) })
29
+ c.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: c.map((r) => r.format === "Alternative" ? /* @__PURE__ */ e(u, { ...r }, r.id) : /* @__PURE__ */ e(w, { ...r }, r.id)) })
28
30
  ] });
29
31
  export {
30
- y as ContentItem
32
+ j as ContentItem
31
33
  };
@@ -1,29 +1,29 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { MobileMenu as o } from "./MobileMenu.js";
4
- import { useScroll as s } from "../shared/hooks/useScroll.js";
5
- import { NavMenu as c } from "./NavMenu.js";
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";
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: l,
10
+ logo: t,
11
11
  navMenu: d,
12
12
  searchBarProps: a,
13
13
  languageSelectorProps: i,
14
14
  userActions: n,
15
- mobileMenu: t
15
+ mobileMenu: l
16
16
  }) => {
17
- const m = s(10);
17
+ const o = c(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 ${m ? "bg-white shadow-md" : "bg-primary-50"}`,
22
+ className: `transition-colors duration-300 ease-in-out ${o ? "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
- l,
26
- /* @__PURE__ */ e(c, { className: "hidden lg:block", ...d })
25
+ t,
26
+ /* @__PURE__ */ e(s, { className: "hidden lg:block", ...d })
27
27
  ] }),
28
28
  /* @__PURE__ */ r("div", { className: "text-medium hidden flex-wrap items-center gap-4 lg:flex xl:gap-6", children: [
29
29
  /* @__PURE__ */ e(f, { ...a }),
@@ -33,20 +33,20 @@ const j = ({
33
33
  /* @__PURE__ */ r(
34
34
  "button",
35
35
  {
36
- className: "text-small text-primary-500 flex items-center justify-center gap-1 rounded border border-neutral-400 bg-transparent px-2 py-1 lg:hidden",
37
- onClick: t.onOpen,
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
+ onClick: l.onOpen,
38
38
  "aria-label": "Open menu",
39
- "aria-expanded": t.isOpen,
39
+ "aria-expanded": l.isOpen,
40
40
  children: [
41
- t.openText,
42
- /* @__PURE__ */ e(x, {})
41
+ l.openText,
42
+ /* @__PURE__ */ e(x, { fill: "var(--color-primary-700)" })
43
43
  ]
44
44
  }
45
45
  )
46
46
  ] })
47
47
  }
48
48
  ),
49
- /* @__PURE__ */ e(o, { ...t, logo: l, userActions: n, searchBarProps: a })
49
+ /* @__PURE__ */ e(m, { ...l, logo: t, userActions: n, searchBarProps: a })
50
50
  ] });
51
51
  };
52
52
  export {
@@ -19,12 +19,12 @@ const k = ({
19
19
  /* @__PURE__ */ l(
20
20
  "button",
21
21
  {
22
- 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
+ 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
23
  onClick: m,
24
24
  "aria-label": "Close menu",
25
25
  children: [
26
26
  u,
27
- /* @__PURE__ */ r(f, { fill: "var(--color-primary-500)" })
27
+ /* @__PURE__ */ r(f, { fill: "var(--color-primary-700)" })
28
28
  ]
29
29
  }
30
30
  )
@@ -12,7 +12,7 @@ export declare const PreviewDownload: FC<PreviewDownloadProps>;
12
12
  export declare interface PreviewDownloadProps {
13
13
  title: string;
14
14
  preview: ImageWithPreviewProps | null;
15
- cta: ReactNode;
15
+ cta: ReactNode | null;
16
16
  footerText: string;
17
17
  pdfDownload: ReactNode;
18
18
  wordDownload: ReactNode;
@@ -6,16 +6,16 @@ import { Modal as b } from "./Modal.js";
6
6
  import { Markdown as w } from "./Markdown.js";
7
7
  import { LinkWrapper as r } from "./LinkWrapper.js";
8
8
  const k = ({
9
- title: n,
10
- footerText: i,
9
+ title: i,
10
+ footerText: o,
11
11
  preview: a,
12
- cta: c,
13
- pdfDownload: m,
14
- wordDownload: o,
15
- onZoomClick: t
12
+ cta: t,
13
+ pdfDownload: c,
14
+ wordDownload: m,
15
+ onZoomClick: s
16
16
  }) => {
17
- const [d, f] = h(!1), p = (s) => {
18
- f(s), s && t && t();
17
+ const [d, f] = h(!1), p = (n) => {
18
+ f(n), n && s && s();
19
19
  };
20
20
  if (!a) return;
21
21
  const u = /* @__PURE__ */ e(x, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" });
@@ -24,14 +24,14 @@ const k = ({
24
24
  /* @__PURE__ */ e("div", { className: "h-full max-h-64.5 w-full max-w-50 overflow-hidden", children: a.small }),
25
25
  /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(b, { trigger: u, isOpen: d, setIsOpen: p, children: a.large }) })
26
26
  ] }),
27
- /* @__PURE__ */ e(w, { className: "text-medium text-primary-800 text-center [&_p:last-child]:mb-0", content: n }),
28
- /* @__PURE__ */ e(r, { className: "w-full", variant: "primary-green", children: c }),
27
+ /* @__PURE__ */ e(w, { className: "text-medium text-primary-800 text-center [&_p:last-child]:mb-0", content: i }),
28
+ !!t && /* @__PURE__ */ e(r, { className: "w-full", variant: "primary-green", children: t }),
29
29
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200" }),
30
30
  /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center gap-6", children: [
31
- /* @__PURE__ */ e("p", { className: "text-small text-neutral-800", children: i }),
31
+ /* @__PURE__ */ e("p", { className: "text-small text-neutral-800", children: o }),
32
32
  /* @__PURE__ */ l("div", { className: "flex w-full gap-4", children: [
33
- /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: m }),
34
- /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: o })
33
+ /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: c }),
34
+ /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: m })
35
35
  ] })
36
36
  ] })
37
37
  ] });
@@ -7,6 +7,7 @@ export declare interface PreviewSectionProps {
7
7
  title: string;
8
8
  documentPreview: string;
9
9
  cta: ReactNode;
10
+ comingSoonCta: ReactNode | null;
10
11
  onPreviewScroll?: () => void;
11
12
  }
12
13
 
@@ -1,26 +1,33 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
3
- import { useRef as s } from "react";
4
- import { SectionHeading as c } from "./SectionHeading.js";
5
- import { Markdown as m } from "./Markdown.js";
6
- import { LinkWrapper as i } from "./LinkWrapper.js";
7
- const w = ({ title: l, documentPreview: o, cta: a, onPreviewScroll: r }) => {
8
- const t = s(!1);
9
- return /* @__PURE__ */ e("section", { className: "bg-secondary-50 px-4 py-10 text-neutral-900 md:px-8 xl:px-30", children: /* @__PURE__ */ n("div", { className: "mx-auto flex w-full max-w-300 flex-col items-center gap-8", children: [
10
- /* @__PURE__ */ e(c, { title: l, titleClass: "text-neutral-800 font-bold font-inter text-large" }),
2
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
3
+ import { useRef as i } from "react";
4
+ import { SectionHeading as m } from "./SectionHeading.js";
5
+ import { Markdown as d } from "./Markdown.js";
6
+ import { LinkWrapper as a } from "./LinkWrapper.js";
7
+ const b = ({
8
+ title: n,
9
+ documentPreview: s,
10
+ cta: l,
11
+ comingSoonCta: r,
12
+ onPreviewScroll: t
13
+ }) => {
14
+ const o = i(!1);
15
+ return /* @__PURE__ */ e("section", { className: "bg-secondary-50 px-4 py-10 text-neutral-900 md:px-8 xl:px-30", children: /* @__PURE__ */ c("div", { className: "mx-auto flex w-full max-w-300 flex-col items-center gap-8", children: [
16
+ /* @__PURE__ */ e(m, { title: n, titleClass: "text-neutral-800 font-bold font-inter text-large" }),
11
17
  /* @__PURE__ */ e(
12
18
  "div",
13
19
  {
14
20
  className: "flex max-h-89.75 w-full overflow-auto border border-neutral-200 bg-white px-8 py-8 md:py-16",
15
21
  onScroll: () => {
16
- !t.current && r && (t.current = !0, r());
22
+ !o.current && t && (o.current = !0, t());
17
23
  },
18
- children: /* @__PURE__ */ e(m, { useCustom: !1, className: "select-none", content: o })
24
+ children: /* @__PURE__ */ e(d, { useCustom: !1, className: "select-none", content: s })
19
25
  }
20
26
  ),
21
- /* @__PURE__ */ e(i, { className: "w-full md:w-auto", children: a })
27
+ !!l && /* @__PURE__ */ e(a, { className: "w-full md:w-auto", children: l }),
28
+ !!r && /* @__PURE__ */ e(a, { variant: "icon-grey", disabled: !0, className: "w-full bg-neutral-200 font-bold md:w-auto", children: r })
22
29
  ] }) });
23
30
  };
24
31
  export {
25
- w as PreviewSection
32
+ b as PreviewSection
26
33
  };
@@ -35,6 +35,7 @@ export interface ContentItemProps {
35
35
  linkedProducts: LinkedProductProps[];
36
36
  sampleImage: ImageWithPreviewProps | null;
37
37
  cta: ReactNode | null;
38
+ comingSoonCta: ReactNode | null;
38
39
  docsModules: {
39
40
  pdfDownload: ReactNode;
40
41
  wordDownload: ReactNode;
@@ -133,7 +134,7 @@ export interface PreformProps {
133
134
  export interface PreviewDownloadProps {
134
135
  title: string;
135
136
  preview: ImageWithPreviewProps | null;
136
- cta: ReactNode;
137
+ cta: ReactNode | null;
137
138
  footerText: string;
138
139
  pdfDownload: ReactNode;
139
140
  wordDownload: ReactNode;
@@ -144,6 +145,7 @@ export interface PreviewSectionProps {
144
145
  title: string;
145
146
  documentPreview: string;
146
147
  cta: ReactNode;
148
+ comingSoonCta: ReactNode | null;
147
149
  onPreviewScroll?: () => void;
148
150
  }
149
151
 
@@ -169,7 +171,7 @@ export declare interface ProductTemplateProps {
169
171
  contentItems: ContentItemProps[];
170
172
  faqSection: FaqSectionProps;
171
173
  previewDownload: PreviewDownloadProps;
172
- previewSection?: PreviewSectionProps;
174
+ previewSection?: PreviewSectionProps | null;
173
175
  tryNowSection?: TryNowSectionProps;
174
176
  freeDocModal?: FreeDocumentModalProps;
175
177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.136.0",
3
+ "version": "0.136.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -750,7 +750,6 @@
750
750
  "@testing-library/jest-dom": "^6.9.1",
751
751
  "@testing-library/react": "^16.3.2",
752
752
  "@testing-library/user-event": "^14.6.1",
753
- "@types/jest": "^30.0.0",
754
753
  "@types/node": "^22.19.13",
755
754
  "@types/react": "^19.2.14",
756
755
  "@types/react-dom": "^19.2.3",
@@ -772,8 +771,6 @@
772
771
  "glob": "^13.0.6",
773
772
  "globals": "^16.5.0",
774
773
  "husky": "^9.1.7",
775
- "jest": "^30.2.0",
776
- "jest-environment-jsdom": "^30.2.0",
777
774
  "lint-staged": "^16.3.2",
778
775
  "playwright": "^1.58.2",
779
776
  "prettier": "^3.8.1",
@@ -787,7 +784,6 @@
787
784
  "sanitize-html": "2.17.0",
788
785
  "storybook": "^10.2.15",
789
786
  "tailwindcss": "^4.2.1",
790
- "ts-jest": "^29.4.6",
791
787
  "typescript": "~5.8.3",
792
788
  "typescript-eslint": "^8.56.1",
793
789
  "vite": "^7.3.1",