@npm_leadtech/legal-contracts-ui 0.124.0 → 0.124.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.
@@ -96,6 +96,7 @@ export interface FaqSectionProps {
96
96
  export interface ImageWithPreviewProps {
97
97
  small: ReactNode;
98
98
  large: ReactNode;
99
+ onZoomClick?: () => void;
99
100
  }
100
101
 
101
102
  export interface JumboCardProps {
@@ -38,6 +38,7 @@ export interface DefaultSubtypeDocumentProps extends BaseSubtypeDocumentProps {
38
38
  export interface ImageWithPreviewProps {
39
39
  small: ReactNode;
40
40
  large: ReactNode;
41
+ onZoomClick?: () => void;
41
42
  }
42
43
 
43
44
  export interface LinkedProductProps {
@@ -6,5 +6,6 @@ export declare const ImageWithPreview: FC<ImageWithPreviewProps>;
6
6
  export declare interface ImageWithPreviewProps {
7
7
  small: ReactNode;
8
8
  large: ReactNode;
9
+ onZoomClick?: () => void;
9
10
  }
10
11
 
@@ -1,15 +1,17 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
- import { useState as s } from "react";
4
- import { ZoomIcon as a } from "./ZoomIcon.js";
2
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
3
+ import { useState as n } from "react";
4
+ import { ZoomIcon as c } from "./ZoomIcon.js";
5
5
  import { Modal as m } from "./Modal.js";
6
- const u = ({ small: r, large: i }) => {
7
- const [o, t] = s(!1);
8
- return /* @__PURE__ */ l("div", { className: "relative aspect-3/4 w-75 self-center overflow-hidden border border-neutral-200", children: [
9
- /* @__PURE__ */ e("div", { className: "h-full w-full [&_img]:h-full [&_img]:w-full [&_img]:object-cover", children: r }),
10
- /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(m, { trigger: /* @__PURE__ */ e(a, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" }), isOpen: o, setIsOpen: t, children: i }) })
6
+ const b = ({ small: l, large: s, onZoomClick: r }) => {
7
+ const [t, o] = n(!1);
8
+ return /* @__PURE__ */ a("div", { className: "relative aspect-3/4 w-75 self-center overflow-hidden border border-neutral-200", children: [
9
+ /* @__PURE__ */ e("div", { className: "h-full w-full [&_img]:h-full [&_img]:w-full [&_img]:object-cover", children: l }),
10
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(m, { trigger: /* @__PURE__ */ e(c, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" }), isOpen: t, setIsOpen: (i) => {
11
+ o(i), i && r && r();
12
+ }, children: s }) })
11
13
  ] });
12
14
  };
13
15
  export {
14
- u as ImageWithPreview
16
+ b as ImageWithPreview
15
17
  };
@@ -4,6 +4,7 @@ import { ReactNode } from 'react';
4
4
  export interface ImageWithPreviewProps {
5
5
  small: ReactNode;
6
6
  large: ReactNode;
7
+ onZoomClick?: () => void;
7
8
  }
8
9
 
9
10
  export declare const PreviewDownload: FC<PreviewDownloadProps>;
@@ -15,5 +16,6 @@ export declare interface PreviewDownloadProps {
15
16
  footerText: string;
16
17
  pdfDownload: ReactNode;
17
18
  wordDownload: ReactNode;
19
+ onZoomClick?: () => void;
18
20
  }
19
21
 
@@ -1,38 +1,41 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
- import { useState as f } from "react";
4
- import { ZoomIcon as u } from "./ZoomIcon.js";
5
- import { Modal as p } from "./Modal.js";
6
- import { Markdown as x } from "./Markdown.js";
3
+ import { useState as h } from "react";
4
+ import { ZoomIcon as x } from "./ZoomIcon.js";
5
+ import { Modal as b } from "./Modal.js";
6
+ import { Markdown as w } from "./Markdown.js";
7
7
  import { LinkWrapper as r } from "./LinkWrapper.js";
8
- const y = ({
9
- title: t,
10
- footerText: s,
8
+ const k = ({
9
+ title: n,
10
+ footerText: i,
11
11
  preview: a,
12
- cta: n,
13
- pdfDownload: i,
14
- wordDownload: c
12
+ cta: c,
13
+ pdfDownload: m,
14
+ wordDownload: o,
15
+ onZoomClick: t
15
16
  }) => {
16
- const [o, m] = f(!1);
17
+ const [d, f] = h(!1), p = (s) => {
18
+ f(s), s && t && t();
19
+ };
17
20
  if (!a) return;
18
- const d = /* @__PURE__ */ e(u, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" });
21
+ const u = /* @__PURE__ */ e(x, { className: "bg-primary-700 size-8 rounded p-2 opacity-80 hover:opacity-100" });
19
22
  return /* @__PURE__ */ l("div", { className: "bg-neutral-25 relative mt-24 flex flex-col items-center gap-4 rounded border border-neutral-200 p-6 pt-44 lg:max-w-76 xl:max-w-96.5", children: [
20
23
  /* @__PURE__ */ l("div", { className: "absolute -top-24 border border-neutral-200 shadow", children: [
21
24
  /* @__PURE__ */ e("div", { className: "h-full max-h-64.5 w-full max-w-50 overflow-hidden", children: a.small }),
22
- /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(p, { trigger: d, isOpen: o, setIsOpen: m, children: a.large }) })
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 }) })
23
26
  ] }),
24
- /* @__PURE__ */ e(x, { className: "text-medium text-center text-neutral-800 [&_p:last-child]:mb-0", content: t }),
25
- /* @__PURE__ */ e(r, { className: "w-full", variant: "primary-green", children: n }),
27
+ /* @__PURE__ */ e(w, { className: "text-medium text-center text-neutral-800 [&_p:last-child]:mb-0", content: n }),
28
+ /* @__PURE__ */ e(r, { className: "w-full", variant: "primary-green", children: c }),
26
29
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200" }),
27
30
  /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center gap-6", children: [
28
- /* @__PURE__ */ e("p", { className: "text-small text-neutral-800", children: s }),
31
+ /* @__PURE__ */ e("p", { className: "text-small text-neutral-800", children: i }),
29
32
  /* @__PURE__ */ l("div", { className: "flex w-full gap-4", children: [
30
- /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: i }),
31
- /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: c })
33
+ /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: m }),
34
+ /* @__PURE__ */ e(r, { className: "w-full", variant: "secondary-black", children: o })
32
35
  ] })
33
36
  ] })
34
37
  ] });
35
38
  };
36
39
  export {
37
- y as PreviewDownload
40
+ k as PreviewDownload
38
41
  };
@@ -7,5 +7,6 @@ export declare interface PreviewSectionProps {
7
7
  title: string;
8
8
  documentPreview: string;
9
9
  cta: ReactNode;
10
+ onPreviewScroll?: () => void;
10
11
  }
11
12
 
@@ -1,13 +1,26 @@
1
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import "react";
3
- import { SectionHeading as a } from "./SectionHeading.js";
4
- import { Markdown as n } from "./Markdown.js";
5
- import { LinkWrapper as s } from "./LinkWrapper.js";
6
- const d = ({ title: t, documentPreview: r, cta: l }) => /* @__PURE__ */ e("section", { className: "bg-secondary-50 px-4 py-10 text-neutral-900 md:px-8 xl:px-30", children: /* @__PURE__ */ o("div", { className: "mx-auto flex w-full max-w-300 flex-col items-center gap-8", children: [
7
- /* @__PURE__ */ e(a, { title: t, titleClass: "text-neutral-800 font-bold font-inter text-large" }),
8
- /* @__PURE__ */ e("div", { className: "flex max-h-89.75 w-full overflow-auto border border-neutral-200 bg-white px-8 py-8 md:py-16", children: /* @__PURE__ */ e(n, { useCustom: !1, className: "select-none", content: r }) }),
9
- /* @__PURE__ */ e(s, { className: "w-full md:w-auto", children: l })
10
- ] }) });
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" }),
11
+ /* @__PURE__ */ e(
12
+ "div",
13
+ {
14
+ className: "flex max-h-89.75 w-full overflow-auto border border-neutral-200 bg-white px-8 py-8 md:py-16",
15
+ onScroll: () => {
16
+ !t.current && r && (t.current = !0, r());
17
+ },
18
+ children: /* @__PURE__ */ e(m, { useCustom: !1, className: "select-none", content: o })
19
+ }
20
+ ),
21
+ /* @__PURE__ */ e(i, { className: "w-full md:w-auto", children: a })
22
+ ] }) });
23
+ };
11
24
  export {
12
- d as PreviewSection
25
+ w as PreviewSection
13
26
  };
@@ -77,6 +77,7 @@ export interface FreeDocumentModalProps {
77
77
  export interface ImageWithPreviewProps {
78
78
  small: ReactNode;
79
79
  large: ReactNode;
80
+ onZoomClick?: () => void;
80
81
  }
81
82
 
82
83
  export type InputFieldData = {
@@ -133,12 +134,14 @@ export interface PreviewDownloadProps {
133
134
  footerText: string;
134
135
  pdfDownload: ReactNode;
135
136
  wordDownload: ReactNode;
137
+ onZoomClick?: () => void;
136
138
  }
137
139
 
138
140
  export interface PreviewSectionProps {
139
141
  title: string;
140
142
  documentPreview: string;
141
143
  cta: ReactNode;
144
+ onPreviewScroll?: () => void;
142
145
  }
143
146
 
144
147
  export interface ProductInfoProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.124.0",
3
+ "version": "0.124.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",