@npm_leadtech/legal-contracts-ui 0.136.1 → 0.136.3

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,30 +1,30 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
- import { ImageWithPreview as d } from "./ImageWithPreview.js";
2
+ import { ImageWithPreview as p } from "./ImageWithPreview.js";
3
3
  import { LinkedProducts as h } from "./LinkedProducts.js";
4
4
  import { Markdown as x } from "./Markdown.js";
5
5
  import { LinkWrapper as l } from "./LinkWrapper.js";
6
6
  import { AlternativeSubtypeDocument as u } from "./AlternativeSubtypeDocument.js";
7
7
  import { DefaultSubtypeDocument as w } from "./DefaultSubtypeDocument.js";
8
8
  const j = ({
9
- id: p,
10
- title: t,
9
+ id: d,
10
+ title: a,
11
11
  content: n,
12
12
  linkedProducts: i,
13
13
  sampleImage: m,
14
- cta: s,
15
- comingSoonCta: o,
16
- docsModules: a,
14
+ cta: o,
15
+ comingSoonCta: s,
16
+ docsModules: t,
17
17
  subtypeDocs: c
18
- }) => /* @__PURE__ */ f("div", { id: p, className: "flex min-w-0 scroll-mt-25 flex-col gap-6 text-neutral-900", children: [
19
- t && /* @__PURE__ */ e("h2", { className: "text-super-large font-bold", children: t }),
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
20
  n && /* @__PURE__ */ e(x, { content: n, className: "text-medium [&_p:last-child]:mb-0" }),
21
21
  i.length > 0 && /* @__PURE__ */ e(h, { linkedProducts: i }),
22
- m && /* @__PURE__ */ e(d, { ...m }),
23
- !!s && /* @__PURE__ */ e(l, { className: "w-75 self-center text-center", children: s }),
24
- !!o && /* @__PURE__ */ e(l, { variant: "icon-grey", disabled: !0, className: "w-75 self-center bg-neutral-200 text-center", children: o }),
25
- a && /* @__PURE__ */ f("div", { className: "flex w-75 gap-4 self-center", children: [
26
- /* @__PURE__ */ e(l, { className: "w-full", variant: "secondary-black", children: a.pdfDownload }),
27
- /* @__PURE__ */ e(l, { className: "w-full", variant: "secondary-black", children: a.wordDownload })
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 })
28
28
  ] }),
29
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)) })
30
30
  ] });
@@ -1,43 +1,41 @@
1
1
  "use client";
2
2
  import { jsxs as n, Fragment as u, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
- import { CloseIcon as m } from "./CloseIcon.js";
5
- const h = ({ trigger: l, children: a, isOpen: t, setIsOpen: i, showClose: s, onTrigger: r }) => {
6
- const o = () => {
7
- r && r(), i(!t);
4
+ import { createPortal as m } from "react-dom";
5
+ import { CloseIcon as d } from "./CloseIcon.js";
6
+ const x = ({ trigger: l, children: i, isOpen: o, setIsOpen: c, showClose: s, onTrigger: r }) => {
7
+ const t = () => {
8
+ r && r(), c(!o);
8
9
  };
9
10
  return /* @__PURE__ */ n(u, { children: [
10
- !!l && /* @__PURE__ */ e("button", { "aria-label": "zoom", onClick: o, className: "flex w-full cursor-pointer justify-center", children: l }),
11
- t && /* @__PURE__ */ e(
12
- "button",
13
- {
14
- className: "bg-primary-900/80 fixed inset-0 z-1001 flex items-center justify-center",
15
- onClick: o,
16
- children: /* @__PURE__ */ e("div", { className: "relative flex max-h-screen w-full items-start justify-center overflow-y-auto px-6 py-24", children: /* @__PURE__ */ n(
17
- "div",
18
- {
19
- className: "relative",
20
- onClick: (c) => {
21
- c.stopPropagation();
22
- },
23
- children: [
24
- s && /* @__PURE__ */ e(
25
- "span",
26
- {
27
- className: "absolute top-4 right-4 z-10 cursor-pointer rounded-full p-2 transition-colors hover:bg-neutral-100 focus:outline-none",
28
- onClick: o,
29
- "aria-label": "Close",
30
- children: /* @__PURE__ */ e(m, {})
31
- }
32
- ),
33
- a
34
- ]
35
- }
36
- ) })
37
- }
11
+ !!l && /* @__PURE__ */ e("button", { "aria-label": "zoom", onClick: t, className: "flex w-full cursor-pointer justify-center", children: l }),
12
+ o && m(
13
+ /* @__PURE__ */ e(
14
+ "button",
15
+ {
16
+ className: "bg-primary-900/80 fixed inset-0 z-1001 flex items-center justify-center",
17
+ onClick: (a) => {
18
+ a.target === a.currentTarget && t();
19
+ },
20
+ children: /* @__PURE__ */ e("div", { className: "relative flex max-h-screen w-full items-start justify-center overflow-y-auto px-6 py-24", children: /* @__PURE__ */ n("div", { className: "relative", children: [
21
+ s && /* @__PURE__ */ e(
22
+ "button",
23
+ {
24
+ type: "button",
25
+ className: "absolute top-4 right-4 z-10 cursor-pointer rounded-full p-2 transition-colors hover:bg-neutral-100 focus:outline-none",
26
+ onClick: t,
27
+ "aria-label": "Close",
28
+ children: /* @__PURE__ */ e(d, {})
29
+ }
30
+ ),
31
+ i
32
+ ] }) })
33
+ }
34
+ ),
35
+ document.body
38
36
  )
39
37
  ] });
40
38
  };
41
39
  export {
42
- h as Modal
40
+ x as Modal
43
41
  };
@@ -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
  };
@@ -145,6 +145,7 @@ export interface PreviewSectionProps {
145
145
  title: string;
146
146
  documentPreview: string;
147
147
  cta: ReactNode;
148
+ comingSoonCta: ReactNode | null;
148
149
  onPreviewScroll?: () => void;
149
150
  }
150
151
 
@@ -170,7 +171,7 @@ export declare interface ProductTemplateProps {
170
171
  contentItems: ContentItemProps[];
171
172
  faqSection: FaqSectionProps;
172
173
  previewDownload: PreviewDownloadProps;
173
- previewSection?: PreviewSectionProps;
174
+ previewSection?: PreviewSectionProps | null;
174
175
  tryNowSection?: TryNowSectionProps;
175
176
  freeDocModal?: FreeDocumentModalProps;
176
177
  }
@@ -989,6 +989,7 @@ export declare interface PreviewSectionProps {
989
989
  title: string;
990
990
  documentPreview: string;
991
991
  cta: ReactNode;
992
+ comingSoonCta: ReactNode | null;
992
993
  onPreviewScroll?: () => void;
993
994
  }
994
995
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.136.1",
3
+ "version": "0.136.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",